Lines Matching full:grf
170 * @reg: the address offset of grf for usb-phy config.
230 * @grf: General Register Files regmap.
247 struct regmap *grf; member
264 return rphy->usbgrf == NULL ? rphy->grf : rphy->usbgrf; in get_reg_base()
458 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
462 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_en, en); in rockchip_usb2phy_enable_host_disc_irq()
466 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
470 return property_enable(rphy->grf, &rport->port_cfg->disrise_en, en); in rockchip_usb2phy_enable_host_disc_irq()
485 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
491 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
498 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
504 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
510 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
516 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
539 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
544 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
653 vbus_attach = property_enabled(rphy->grf, in rockchip_usb2phy_otg_sm_work()
827 is_dcd = property_enabled(rphy->grf, in rockchip_chg_detect_work()
845 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
867 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
917 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_sm_work()
925 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_hstdet.offset, &uhd); in rockchip_usb2phy_sm_work()
983 property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_sm_work()
984 property_enable(rphy->grf, &rport->port_cfg->ls_det_en, true); in rockchip_usb2phy_sm_work()
1007 if (!property_enabled(rphy->grf, &rport->port_cfg->ls_det_st)) in rockchip_usb2phy_linestate_irq()
1013 property_enable(rphy->grf, &rport->port_cfg->ls_det_en, false); in rockchip_usb2phy_linestate_irq()
1014 property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_linestate_irq()
1034 if (!property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st)) in rockchip_usb2phy_bvalid_irq()
1038 property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_bvalid_irq()
1051 if (!property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st) && in rockchip_usb2phy_id_irq()
1052 !property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) in rockchip_usb2phy_id_irq()
1056 if (property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st)) in rockchip_usb2phy_id_irq()
1057 property_enable(rphy->grf, &rport->port_cfg->idfall_det_clr, true); in rockchip_usb2phy_id_irq()
1059 if (property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) in rockchip_usb2phy_id_irq()
1060 property_enable(rphy->grf, &rport->port_cfg->idrise_det_clr, true); in rockchip_usb2phy_id_irq()
1062 id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); in rockchip_usb2phy_id_irq()
1083 if (!property_enabled(rphy->grf, &rport->port_cfg->disfall_st) && in rockchip_usb2phy_host_disc_irq()
1084 !property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) in rockchip_usb2phy_host_disc_irq()
1090 if (property_enabled(rphy->grf, &rport->port_cfg->disfall_st)) { in rockchip_usb2phy_host_disc_irq()
1091 property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_host_disc_irq()
1093 } else if (property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) { in rockchip_usb2phy_host_disc_irq()
1094 property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_host_disc_irq()
1312 id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); in rockchip_usb2phy_otg_port_init()
1337 rphy->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf"); in rockchip_usb2phy_probe()
1338 if (IS_ERR(rphy->grf)) { in rockchip_usb2phy_probe()
1340 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
1345 rphy->grf = syscon_node_to_regmap(dev->parent->of_node); in rockchip_usb2phy_probe()
1346 if (IS_ERR(rphy->grf)) in rockchip_usb2phy_probe()
1347 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
1493 return regmap_write_bits(rphy->grf, 0x298, in rk3128_usb2phy_tuning()
1520 ret = regmap_write(rphy->grf, 0x0008, GENMASK(29, 29) | 0x0000); in rk3588_usb2phy_tuning()
1530 ret |= regmap_write(rphy->grf, 0x000c, GENMASK(20, 16) | suspend_cfg); in rk3588_usb2phy_tuning()
1533 ret |= regmap_write(rphy->grf, 0x0004, GENMASK(27, 24) | 0x0900); in rk3588_usb2phy_tuning()
1536 ret |= regmap_write(rphy->grf, 0x0008, GENMASK(20, 19) | 0x0010); in rk3588_usb2phy_tuning()
1542 ret |= regmap_write(rphy->grf, 0x0010, GENMASK(17, 16) | 0x0003); in rk3588_usb2phy_tuning()