Lines Matching refs:port_cfg

299 	const struct	rockchip_usb2phy_port_cfg *port_cfg;  member
626 ret = property_enable(rphy->grf, &rport->port_cfg->idfall_det_clr, true); in rockchip_usb2phy_enable_id_irq()
630 ret = property_enable(rphy->grf, &rport->port_cfg->idfall_det_en, en); in rockchip_usb2phy_enable_id_irq()
634 ret = property_enable(rphy->grf, &rport->port_cfg->idrise_det_clr, true); in rockchip_usb2phy_enable_id_irq()
638 ret = property_enable(rphy->grf, &rport->port_cfg->idrise_det_en, en); in rockchip_usb2phy_enable_id_irq()
650 ret = property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_enable_vbus_irq()
654 ret = property_enable(rphy->grf, &rport->port_cfg->bvalid_det_en, en); in rockchip_usb2phy_enable_vbus_irq()
665 ret = property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_enable_line_irq()
669 ret = property_enable(rphy->grf, &rport->port_cfg->ls_det_en, en); in rockchip_usb2phy_enable_line_irq()
680 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
684 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_en, en); in rockchip_usb2phy_enable_host_disc_irq()
688 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
692 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_en, en); in rockchip_usb2phy_enable_host_disc_irq()
701 const struct usb2phy_reg *iomux = &rport->port_cfg->bypass_iomux; in rockchip_usb_bypass_uart()
707 if (en == property_enabled(base, &rport->port_cfg->bypass_sel)) { in rockchip_usb_bypass_uart()
727 ret |= property_enable(base, &rport->port_cfg->bypass_sel, in rockchip_usb_bypass_uart()
729 ret |= property_enable(base, &rport->port_cfg->bypass_dm_en, in rockchip_usb_bypass_uart()
737 ret |= property_enable(base, &rport->port_cfg->bypass_sel, in rockchip_usb_bypass_uart()
739 ret |= property_enable(base, &rport->port_cfg->bypass_dm_en, in rockchip_usb_bypass_uart()
764 iddig = property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig); in rockchip_usb_bypass_uart_work()
767 vbus = property_enabled(rphy->grf, &rport->port_cfg->utmi_avalid); in rockchip_usb_bypass_uart_work()
769 vbus = property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid); in rockchip_usb_bypass_uart_work()
801 &rport->port_cfg->pipe_phystatus, true); in rockchip_usb2phy_init()
832 if (rport->port_cfg->disfall_en.offset) { in rockchip_usb2phy_init()
833 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_init()
836 ul_mask = GENMASK(rport->port_cfg->utmi_ls.bitend, in rockchip_usb2phy_init()
837 rport->port_cfg->utmi_ls.bitstart); in rockchip_usb2phy_init()
890 ret = property_enable(base, &rport->port_cfg->phy_sus, false); in rockchip_usb2phy_power_on()
941 ret = property_enable(base, &rport->port_cfg->phy_sus, true); in rockchip_usb2phy_power_off()
1058 rphy->phy_cfg->vbus_detect(rphy, &rport->port_cfg->vbus_det_en, in rockchip_usb2phy_set_mode()
1061 ret = property_enable(rphy->grf, &rport->port_cfg->vbus_det_en, in rockchip_usb2phy_set_mode()
1165 property_enable(base, &rport->port_cfg->iddig_output, false); in otg_mode_store()
1166 property_enable(base, &rport->port_cfg->iddig_en, true); in otg_mode_store()
1170 property_enable(base, &rport->port_cfg->iddig_output, true); in otg_mode_store()
1171 property_enable(base, &rport->port_cfg->iddig_en, true); in otg_mode_store()
1175 property_enable(base, &rport->port_cfg->iddig_output, false); in otg_mode_store()
1176 property_enable(base, &rport->port_cfg->iddig_en, false); in otg_mode_store()
1213 if (rport->port_cfg->bvalid_grf_con.enable && rport->typec_vbus_det) in rockchip_usb2phy_otg_sm_work()
1215 property_enabled(rphy->grf, &rport->port_cfg->bvalid_grf_con); in rockchip_usb2phy_otg_sm_work()
1218 property_enabled(rphy->grf, &rport->port_cfg->utmi_avalid); in rockchip_usb2phy_otg_sm_work()
1221 property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid); in rockchip_usb2phy_otg_sm_work()
1444 phy_sus_reg = &rport->port_cfg->phy_sus; in rockchip_chg_detect_work()
1533 rport->port_cfg->phy_sus.offset) in rockchip_chg_detect_work()
1537 phy_sus_reg = &rport->port_cfg->phy_sus; in rockchip_chg_detect_work()
1585 if (!rport->port_cfg->utmi_ls.offset || in rockchip_usb2phy_sm_work()
1586 (!rport->port_cfg->utmi_hstdet.offset && in rockchip_usb2phy_sm_work()
1587 !rport->port_cfg->disfall_en.offset)) { in rockchip_usb2phy_sm_work()
1594 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_sm_work()
1598 ul_mask = GENMASK(rport->port_cfg->utmi_ls.bitend, in rockchip_usb2phy_sm_work()
1599 rport->port_cfg->utmi_ls.bitstart); in rockchip_usb2phy_sm_work()
1601 if (rport->port_cfg->utmi_hstdet.offset) { in rockchip_usb2phy_sm_work()
1602 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_hstdet.offset, &uhd); in rockchip_usb2phy_sm_work()
1606 uhd_mask = GENMASK(rport->port_cfg->utmi_hstdet.bitend, in rockchip_usb2phy_sm_work()
1607 rport->port_cfg->utmi_hstdet.bitstart); in rockchip_usb2phy_sm_work()
1609 sh = rport->port_cfg->utmi_hstdet.bitend - in rockchip_usb2phy_sm_work()
1610 rport->port_cfg->utmi_hstdet.bitstart + 1; in rockchip_usb2phy_sm_work()
1612 state = ((uhd & uhd_mask) >> rport->port_cfg->utmi_hstdet.bitstart) | in rockchip_usb2phy_sm_work()
1613 (((ul & ul_mask) >> rport->port_cfg->utmi_ls.bitstart) << sh); in rockchip_usb2phy_sm_work()
1615 state = ((ul & ul_mask) >> rport->port_cfg->utmi_ls.bitstart) << 1 | in rockchip_usb2phy_sm_work()
1696 if (!property_enabled(rphy->grf, &rport->port_cfg->ls_det_st) || in rockchip_usb2phy_linestate_irq()
1697 !property_enabled(rphy->grf, &rport->port_cfg->ls_det_en)) in rockchip_usb2phy_linestate_irq()
1712 if (rport->port_id == USB2PHY_PORT_HOST && rport->port_cfg->disfall_en.offset) in rockchip_usb2phy_linestate_irq()
1733 if (!property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st)) in rockchip_usb2phy_bvalid_irq()
1739 property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_bvalid_irq()
1760 if (!property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st) && in rockchip_usb2phy_id_irq()
1761 !property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) in rockchip_usb2phy_id_irq()
1767 if (property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st)) { in rockchip_usb2phy_id_irq()
1768 property_enable(rphy->grf, &rport->port_cfg->idfall_det_clr, in rockchip_usb2phy_id_irq()
1771 if (!property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig)) in rockchip_usb2phy_id_irq()
1773 } else if (property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) { in rockchip_usb2phy_id_irq()
1774 property_enable(rphy->grf, &rport->port_cfg->idrise_det_clr, in rockchip_usb2phy_id_irq()
1797 if (!property_enabled(rphy->grf, &rport->port_cfg->disfall_st) && in rockchip_usb2phy_host_disc_irq()
1798 !property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) in rockchip_usb2phy_host_disc_irq()
1804 if (property_enabled(rphy->grf, &rport->port_cfg->disfall_st)) { in rockchip_usb2phy_host_disc_irq()
1805 property_enable(rphy->grf, &rport->port_cfg->disfall_clr, in rockchip_usb2phy_host_disc_irq()
1808 } else if (property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) { in rockchip_usb2phy_host_disc_irq()
1809 property_enable(rphy->grf, &rport->port_cfg->disrise_clr, in rockchip_usb2phy_host_disc_irq()
1848 rport->port_cfg->disfall_en.offset) in rockchip_usb2phy_irq()
1870 &rport->port_cfg->iddig_en); in rockchip_usb2phy_irq()
1995 const struct rockchip_usb2phy_port_cfg *cfg = rport->port_cfg; in rockchip_usb2phy_usb_bvalid_enable()
2054 rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_HOST]; in rockchip_usb2phy_host_port_init()
2074 ret = property_enable(base, &rport->port_cfg->phy_sus, true); in rockchip_usb2phy_host_port_init()
2107 rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG]; in rockchip_usb2phy_otg_port_init()
2160 iddig = property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig); in rockchip_usb2phy_otg_port_init()
2201 if (rport->port_cfg->bvalid_grf_sel.enable != 0) { in rockchip_usb2phy_otg_port_init()
2203 property_enable(base, &rport->port_cfg->bvalid_grf_sel, true); in rockchip_usb2phy_otg_port_init()
2205 property_enable(base, &rport->port_cfg->bvalid_grf_sel, false); in rockchip_usb2phy_otg_port_init()
2243 ret = property_enable(base, &rport->port_cfg->phy_sus, true); in rockchip_usb2phy_otg_port_init()
2473 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_bc, in rockchip_usb2phy_low_power_enable()
2478 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_otg, in rockchip_usb2phy_low_power_enable()
2483 ret = property_enable(rphy->grf, &rport->port_cfg->vbus_det_en, in rockchip_usb2phy_low_power_enable()
2489 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_host, in rockchip_usb2phy_low_power_enable()
3004 if (rport->port_cfg->port_ls_filter_con.enable) { in rockchip_usb2phy_pm_suspend()
3006 rport->port_cfg->port_ls_filter_con.offset, in rockchip_usb2phy_pm_suspend()
3007 rport->port_cfg->port_ls_filter_con.enable); in rockchip_usb2phy_pm_suspend()
3016 &rport->port_cfg->utmi_iddig); in rockchip_usb2phy_pm_suspend()
3088 if (rport->port_cfg->port_ls_filter_con.disable) { in rockchip_usb2phy_pm_resume()
3090 rport->port_cfg->port_ls_filter_con.offset, in rockchip_usb2phy_pm_resume()
3091 rport->port_cfg->port_ls_filter_con.disable); in rockchip_usb2phy_pm_resume()
3100 &rport->port_cfg->utmi_iddig); in rockchip_usb2phy_pm_resume()
3140 if (property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid)) in rockchip_usb2phy_pm_resume()