Lines Matching refs:rphy
176 int (*phy_tuning)(struct rockchip_usb2phy *rphy);
258 static inline struct regmap *get_reg_base(struct rockchip_usb2phy *rphy) in get_reg_base() argument
260 return rphy->usbgrf == NULL ? rphy->grf : rphy->usbgrf; in get_reg_base()
290 static int rockchip_usb2phy_reset(struct rockchip_usb2phy *rphy) in rockchip_usb2phy_reset() argument
294 ret = reset_control_assert(rphy->phy_reset); in rockchip_usb2phy_reset()
300 ret = reset_control_deassert(rphy->phy_reset); in rockchip_usb2phy_reset()
311 struct rockchip_usb2phy *rphy = in rockchip_usb2phy_clk480m_prepare() local
313 struct regmap *base = get_reg_base(rphy); in rockchip_usb2phy_clk480m_prepare()
317 if (!property_enabled(base, &rphy->phy_cfg->clkout_ctl)) { in rockchip_usb2phy_clk480m_prepare()
318 ret = property_enable(base, &rphy->phy_cfg->clkout_ctl, true); in rockchip_usb2phy_clk480m_prepare()
331 struct rockchip_usb2phy *rphy = in rockchip_usb2phy_clk480m_unprepare() local
333 struct regmap *base = get_reg_base(rphy); in rockchip_usb2phy_clk480m_unprepare()
336 property_enable(base, &rphy->phy_cfg->clkout_ctl, false); in rockchip_usb2phy_clk480m_unprepare()
341 struct rockchip_usb2phy *rphy = in rockchip_usb2phy_clk480m_prepared() local
343 struct regmap *base = get_reg_base(rphy); in rockchip_usb2phy_clk480m_prepared()
345 return property_enabled(base, &rphy->phy_cfg->clkout_ctl); in rockchip_usb2phy_clk480m_prepared()
364 struct rockchip_usb2phy *rphy = data; in rockchip_usb2phy_clk480m_unregister() local
366 of_clk_del_provider(rphy->dev->of_node); in rockchip_usb2phy_clk480m_unregister()
367 clk_unregister(rphy->clk480m); in rockchip_usb2phy_clk480m_unregister()
371 rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy) in rockchip_usb2phy_clk480m_register() argument
373 struct device_node *node = rphy->dev->of_node; in rockchip_usb2phy_clk480m_register()
385 if (rphy->clk) { in rockchip_usb2phy_clk480m_register()
386 clk_name = __clk_get_name(rphy->clk); in rockchip_usb2phy_clk480m_register()
394 rphy->clk480m_hw.init = &init; in rockchip_usb2phy_clk480m_register()
397 rphy->clk480m = clk_register(rphy->dev, &rphy->clk480m_hw); in rockchip_usb2phy_clk480m_register()
398 if (IS_ERR(rphy->clk480m)) { in rockchip_usb2phy_clk480m_register()
399 ret = PTR_ERR(rphy->clk480m); in rockchip_usb2phy_clk480m_register()
403 ret = of_clk_add_provider(node, of_clk_src_simple_get, rphy->clk480m); in rockchip_usb2phy_clk480m_register()
407 return devm_add_action_or_reset(rphy->dev, rockchip_usb2phy_clk480m_unregister, rphy); in rockchip_usb2phy_clk480m_register()
410 clk_unregister(rphy->clk480m); in rockchip_usb2phy_clk480m_register()
415 static int rockchip_usb2phy_extcon_register(struct rockchip_usb2phy *rphy) in rockchip_usb2phy_extcon_register() argument
418 struct device_node *node = rphy->dev->of_node; in rockchip_usb2phy_extcon_register()
422 edev = extcon_get_edev_by_phandle(rphy->dev, 0); in rockchip_usb2phy_extcon_register()
425 dev_err(rphy->dev, "Invalid or missing extcon\n"); in rockchip_usb2phy_extcon_register()
430 edev = devm_extcon_dev_allocate(rphy->dev, in rockchip_usb2phy_extcon_register()
436 ret = devm_extcon_dev_register(rphy->dev, edev); in rockchip_usb2phy_extcon_register()
438 dev_err(rphy->dev, "failed to register extcon device\n"); in rockchip_usb2phy_extcon_register()
443 rphy->edev = edev; in rockchip_usb2phy_extcon_register()
448 static int rockchip_usb2phy_enable_host_disc_irq(struct rockchip_usb2phy *rphy, in rockchip_usb2phy_enable_host_disc_irq() argument
454 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
458 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_en, en); in rockchip_usb2phy_enable_host_disc_irq()
462 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
466 return property_enable(rphy->grf, &rport->port_cfg->disrise_en, en); in rockchip_usb2phy_enable_host_disc_irq()
472 struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent); in rockchip_usb2phy_init() local
481 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
487 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
494 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
500 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
515 ret = rockchip_usb2phy_enable_host_disc_irq(rphy, rport, true); in rockchip_usb2phy_init()
517 dev_err(rphy->dev, "failed to enable disconnect irq\n"); in rockchip_usb2phy_init()
523 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
528 ret = property_enable(rphy->grf, in rockchip_usb2phy_init()
544 struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent); in rockchip_usb2phy_power_on() local
545 struct regmap *base = get_reg_base(rphy); in rockchip_usb2phy_power_on()
553 ret = clk_prepare_enable(rphy->clk480m); in rockchip_usb2phy_power_on()
559 clk_disable_unprepare(rphy->clk480m); in rockchip_usb2phy_power_on()
571 ret = rockchip_usb2phy_reset(rphy); in rockchip_usb2phy_power_on()
585 struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent); in rockchip_usb2phy_power_off() local
586 struct regmap *base = get_reg_base(rphy); in rockchip_usb2phy_power_off()
599 clk_disable_unprepare(rphy->clk480m); in rockchip_usb2phy_power_off()
632 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_otg_sm_work() local
637 vbus_attach = property_enabled(rphy->grf, in rockchip_usb2phy_otg_sm_work()
653 if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) > 0) { in rockchip_usb2phy_otg_sm_work()
660 switch (rphy->chg_state) { in rockchip_usb2phy_otg_sm_work()
665 switch (rphy->chg_type) { in rockchip_usb2phy_otg_sm_work()
698 rphy->chg_state = USB_CHG_STATE_UNDEFINED; in rockchip_usb2phy_otg_sm_work()
699 rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN; in rockchip_usb2phy_otg_sm_work()
705 if (notify_charger && rphy->edev) { in rockchip_usb2phy_otg_sm_work()
706 extcon_set_state_sync(rphy->edev, in rockchip_usb2phy_otg_sm_work()
709 extcon_set_state_sync(rphy->edev, in rockchip_usb2phy_otg_sm_work()
718 rphy->chg_state = USB_CHG_STATE_UNDEFINED; in rockchip_usb2phy_otg_sm_work()
719 rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN; in rockchip_usb2phy_otg_sm_work()
727 if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) == 0) { in rockchip_usb2phy_otg_sm_work()
755 static void rockchip_chg_enable_dcd(struct rockchip_usb2phy *rphy, in rockchip_chg_enable_dcd() argument
758 struct regmap *base = get_reg_base(rphy); in rockchip_chg_enable_dcd()
760 property_enable(base, &rphy->phy_cfg->chg_det.rdm_pdwn_en, en); in rockchip_chg_enable_dcd()
761 property_enable(base, &rphy->phy_cfg->chg_det.idp_src_en, en); in rockchip_chg_enable_dcd()
764 static void rockchip_chg_enable_primary_det(struct rockchip_usb2phy *rphy, in rockchip_chg_enable_primary_det() argument
767 struct regmap *base = get_reg_base(rphy); in rockchip_chg_enable_primary_det()
769 property_enable(base, &rphy->phy_cfg->chg_det.vdp_src_en, en); in rockchip_chg_enable_primary_det()
770 property_enable(base, &rphy->phy_cfg->chg_det.idm_sink_en, en); in rockchip_chg_enable_primary_det()
773 static void rockchip_chg_enable_secondary_det(struct rockchip_usb2phy *rphy, in rockchip_chg_enable_secondary_det() argument
776 struct regmap *base = get_reg_base(rphy); in rockchip_chg_enable_secondary_det()
778 property_enable(base, &rphy->phy_cfg->chg_det.vdm_src_en, en); in rockchip_chg_enable_secondary_det()
779 property_enable(base, &rphy->phy_cfg->chg_det.idp_sink_en, en); in rockchip_chg_enable_secondary_det()
790 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_chg_detect_work() local
791 struct regmap *base = get_reg_base(rphy); in rockchip_chg_detect_work()
796 rphy->chg_state); in rockchip_chg_detect_work()
797 switch (rphy->chg_state) { in rockchip_chg_detect_work()
802 property_enable(base, &rphy->phy_cfg->chg_det.opmode, false); in rockchip_chg_detect_work()
804 rockchip_chg_enable_dcd(rphy, true); in rockchip_chg_detect_work()
805 rphy->chg_state = USB_CHG_STATE_WAIT_FOR_DCD; in rockchip_chg_detect_work()
806 rphy->dcd_retries = 0; in rockchip_chg_detect_work()
811 is_dcd = property_enabled(rphy->grf, in rockchip_chg_detect_work()
812 &rphy->phy_cfg->chg_det.dp_det); in rockchip_chg_detect_work()
813 tmout = ++rphy->dcd_retries == CHG_DCD_MAX_RETRIES; in rockchip_chg_detect_work()
818 rockchip_chg_enable_dcd(rphy, false); in rockchip_chg_detect_work()
820 rockchip_chg_enable_primary_det(rphy, true); in rockchip_chg_detect_work()
822 rphy->chg_state = USB_CHG_STATE_DCD_DONE; in rockchip_chg_detect_work()
829 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
830 &rphy->phy_cfg->chg_det.cp_det); in rockchip_chg_detect_work()
831 rockchip_chg_enable_primary_det(rphy, false); in rockchip_chg_detect_work()
834 rockchip_chg_enable_secondary_det(rphy, true); in rockchip_chg_detect_work()
836 rphy->chg_state = USB_CHG_STATE_PRIMARY_DONE; in rockchip_chg_detect_work()
838 if (rphy->dcd_retries == CHG_DCD_MAX_RETRIES) { in rockchip_chg_detect_work()
840 rphy->chg_type = POWER_SUPPLY_TYPE_USB_DCP; in rockchip_chg_detect_work()
841 rphy->chg_state = USB_CHG_STATE_DETECTED; in rockchip_chg_detect_work()
844 rphy->chg_type = POWER_SUPPLY_TYPE_USB; in rockchip_chg_detect_work()
845 rphy->chg_state = USB_CHG_STATE_DETECTED; in rockchip_chg_detect_work()
851 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
852 &rphy->phy_cfg->chg_det.dcp_det); in rockchip_chg_detect_work()
854 rockchip_chg_enable_secondary_det(rphy, false); in rockchip_chg_detect_work()
856 rphy->chg_type = POWER_SUPPLY_TYPE_USB_DCP; in rockchip_chg_detect_work()
858 rphy->chg_type = POWER_SUPPLY_TYPE_USB_CDP; in rockchip_chg_detect_work()
861 rphy->chg_state = USB_CHG_STATE_DETECTED; in rockchip_chg_detect_work()
865 property_enable(base, &rphy->phy_cfg->chg_det.opmode, true); in rockchip_chg_detect_work()
868 chg_to_string(rphy->chg_type)); in rockchip_chg_detect_work()
894 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_sm_work() local
901 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_sm_work()
909 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_hstdet.offset, &uhd); in rockchip_usb2phy_sm_work()
967 property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_sm_work()
968 property_enable(rphy->grf, &rport->port_cfg->ls_det_en, true); in rockchip_usb2phy_sm_work()
989 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_linestate_irq() local
991 if (!property_enabled(rphy->grf, &rport->port_cfg->ls_det_st)) in rockchip_usb2phy_linestate_irq()
997 property_enable(rphy->grf, &rport->port_cfg->ls_det_en, false); in rockchip_usb2phy_linestate_irq()
998 property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_linestate_irq()
1016 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_bvalid_irq() local
1018 if (!property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st)) in rockchip_usb2phy_bvalid_irq()
1022 property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_bvalid_irq()
1032 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_id_irq() local
1035 if (!property_enabled(rphy->grf, &rport->port_cfg->id_det_st)) in rockchip_usb2phy_id_irq()
1039 property_enable(rphy->grf, &rport->port_cfg->id_det_clr, true); in rockchip_usb2phy_id_irq()
1041 id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); in rockchip_usb2phy_id_irq()
1042 extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !id); in rockchip_usb2phy_id_irq()
1060 struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent); in rockchip_usb2phy_host_disc_irq() local
1062 if (!property_enabled(rphy->grf, &rport->port_cfg->disfall_st) && in rockchip_usb2phy_host_disc_irq()
1063 !property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) in rockchip_usb2phy_host_disc_irq()
1069 if (property_enabled(rphy->grf, &rport->port_cfg->disfall_st)) { in rockchip_usb2phy_host_disc_irq()
1070 property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_host_disc_irq()
1072 } else if (property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) { in rockchip_usb2phy_host_disc_irq()
1073 property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_host_disc_irq()
1084 struct rockchip_usb2phy *rphy = data; in rockchip_usb2phy_irq() local
1089 for (index = 0; index < rphy->phy_cfg->num_ports; index++) { in rockchip_usb2phy_irq()
1090 rport = &rphy->ports[index]; in rockchip_usb2phy_irq()
1113 static int rockchip_usb2phy_port_irq_init(struct rockchip_usb2phy *rphy, in rockchip_usb2phy_port_irq_init() argument
1123 if (rphy->irq > 0) in rockchip_usb2phy_port_irq_init()
1130 dev_err(rphy->dev, "no linestate irq provided\n"); in rockchip_usb2phy_port_irq_init()
1134 ret = devm_request_threaded_irq(rphy->dev, rport->ls_irq, NULL, in rockchip_usb2phy_port_irq_init()
1139 dev_err(rphy->dev, "failed to request linestate irq handle\n"); in rockchip_usb2phy_port_irq_init()
1151 ret = devm_request_threaded_irq(rphy->dev, rport->otg_mux_irq, in rockchip_usb2phy_port_irq_init()
1158 dev_err(rphy->dev, in rockchip_usb2phy_port_irq_init()
1165 dev_err(rphy->dev, "no vbus valid irq provided\n"); in rockchip_usb2phy_port_irq_init()
1170 ret = devm_request_threaded_irq(rphy->dev, rport->bvalid_irq, in rockchip_usb2phy_port_irq_init()
1177 dev_err(rphy->dev, in rockchip_usb2phy_port_irq_init()
1184 dev_err(rphy->dev, "no otg-id irq provided\n"); in rockchip_usb2phy_port_irq_init()
1189 ret = devm_request_threaded_irq(rphy->dev, rport->id_irq, in rockchip_usb2phy_port_irq_init()
1196 dev_err(rphy->dev, in rockchip_usb2phy_port_irq_init()
1209 static int rockchip_usb2phy_host_port_init(struct rockchip_usb2phy *rphy, in rockchip_usb2phy_host_port_init() argument
1216 rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_HOST]; in rockchip_usb2phy_host_port_init()
1222 ret = rockchip_usb2phy_port_irq_init(rphy, rport, child_np); in rockchip_usb2phy_host_port_init()
1224 dev_err(rphy->dev, "failed to setup host irq\n"); in rockchip_usb2phy_host_port_init()
1242 static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, in rockchip_usb2phy_otg_port_init() argument
1249 rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG]; in rockchip_usb2phy_otg_port_init()
1273 ret = rockchip_usb2phy_port_irq_init(rphy, rport, child_np); in rockchip_usb2phy_otg_port_init()
1275 dev_err(rphy->dev, "failed to init irq for host port\n"); in rockchip_usb2phy_otg_port_init()
1279 if (!IS_ERR(rphy->edev)) { in rockchip_usb2phy_otg_port_init()
1282 ret = devm_extcon_register_notifier(rphy->dev, rphy->edev, in rockchip_usb2phy_otg_port_init()
1285 dev_err(rphy->dev, "register USB HOST notifier failed\n"); in rockchip_usb2phy_otg_port_init()
1289 if (!of_property_read_bool(rphy->dev->of_node, "extcon")) { in rockchip_usb2phy_otg_port_init()
1291 id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); in rockchip_usb2phy_otg_port_init()
1292 extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !id); in rockchip_usb2phy_otg_port_init()
1306 struct rockchip_usb2phy *rphy; in rockchip_usb2phy_probe() local
1311 rphy = devm_kzalloc(dev, sizeof(*rphy), GFP_KERNEL); in rockchip_usb2phy_probe()
1312 if (!rphy) in rockchip_usb2phy_probe()
1316 rphy->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf"); in rockchip_usb2phy_probe()
1317 if (IS_ERR(rphy->grf)) { in rockchip_usb2phy_probe()
1319 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
1324 rphy->grf = syscon_node_to_regmap(dev->parent->of_node); in rockchip_usb2phy_probe()
1325 if (IS_ERR(rphy->grf)) in rockchip_usb2phy_probe()
1326 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
1330 rphy->usbgrf = in rockchip_usb2phy_probe()
1333 if (IS_ERR(rphy->usbgrf)) in rockchip_usb2phy_probe()
1334 return PTR_ERR(rphy->usbgrf); in rockchip_usb2phy_probe()
1336 rphy->usbgrf = NULL; in rockchip_usb2phy_probe()
1354 rphy->dev = dev; in rockchip_usb2phy_probe()
1356 rphy->chg_state = USB_CHG_STATE_UNDEFINED; in rockchip_usb2phy_probe()
1357 rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN; in rockchip_usb2phy_probe()
1358 rphy->irq = platform_get_irq_optional(pdev, 0); in rockchip_usb2phy_probe()
1359 platform_set_drvdata(pdev, rphy); in rockchip_usb2phy_probe()
1364 ret = rockchip_usb2phy_extcon_register(rphy); in rockchip_usb2phy_probe()
1372 rphy->phy_cfg = &phy_cfgs[index]; in rockchip_usb2phy_probe()
1379 if (!rphy->phy_cfg) { in rockchip_usb2phy_probe()
1384 rphy->phy_reset = devm_reset_control_get_optional(dev, "phy"); in rockchip_usb2phy_probe()
1385 if (IS_ERR(rphy->phy_reset)) in rockchip_usb2phy_probe()
1386 return PTR_ERR(rphy->phy_reset); in rockchip_usb2phy_probe()
1388 rphy->clk = devm_clk_get_optional_enabled(dev, "phyclk"); in rockchip_usb2phy_probe()
1389 if (IS_ERR(rphy->clk)) { in rockchip_usb2phy_probe()
1390 return dev_err_probe(&pdev->dev, PTR_ERR(rphy->clk), in rockchip_usb2phy_probe()
1394 ret = rockchip_usb2phy_clk480m_register(rphy); in rockchip_usb2phy_probe()
1400 if (rphy->phy_cfg->phy_tuning) { in rockchip_usb2phy_probe()
1401 ret = rphy->phy_cfg->phy_tuning(rphy); in rockchip_usb2phy_probe()
1408 struct rockchip_usb2phy_port *rport = &rphy->ports[index]; in rockchip_usb2phy_probe()
1428 ret = rockchip_usb2phy_host_port_init(rphy, rport, in rockchip_usb2phy_probe()
1433 ret = rockchip_usb2phy_otg_port_init(rphy, rport, in rockchip_usb2phy_probe()
1441 if (++index >= rphy->phy_cfg->num_ports) { in rockchip_usb2phy_probe()
1449 if (rphy->irq > 0) { in rockchip_usb2phy_probe()
1450 ret = devm_request_threaded_irq(rphy->dev, rphy->irq, NULL, in rockchip_usb2phy_probe()
1454 rphy); in rockchip_usb2phy_probe()
1456 dev_err(rphy->dev, in rockchip_usb2phy_probe()
1469 static int rk3588_usb2phy_tuning(struct rockchip_usb2phy *rphy) in rk3588_usb2phy_tuning() argument
1479 if (rphy->phy_cfg->reg == 0x0000 || rphy->phy_cfg->reg == 0x4000) { in rk3588_usb2phy_tuning()
1483 } else if (rphy->phy_cfg->reg == 0x8000 || rphy->phy_cfg->reg == 0xc000) { in rk3588_usb2phy_tuning()
1491 ret = regmap_write(rphy->grf, 0x0008, GENMASK(29, 29) | 0x0000); in rk3588_usb2phy_tuning()
1496 ret = rockchip_usb2phy_reset(rphy); in rk3588_usb2phy_tuning()
1501 ret |= regmap_write(rphy->grf, 0x000c, GENMASK(20, 16) | suspend_cfg); in rk3588_usb2phy_tuning()
1504 ret |= regmap_write(rphy->grf, 0x0004, GENMASK(27, 24) | 0x0900); in rk3588_usb2phy_tuning()
1507 ret |= regmap_write(rphy->grf, 0x0008, GENMASK(20, 19) | 0x0010); in rk3588_usb2phy_tuning()
1513 ret |= regmap_write(rphy->grf, 0x0010, GENMASK(17, 16) | 0x0003); in rk3588_usb2phy_tuning()