This series tries to fix a few USB PHY related issues found while working on RK3528/RK3576 USB OTG support.
The first issue is related to Generic PHY reference counting that is not working correctly for the usbdp or naneng-combphy drivers. Both drivers xlate ops never initialized phy->id so it could initialize with an old value from stack when the dwc3-generic driver was probed, causing two struct phy to be initialized and ending up not sharing same phy->id, resulting in reference counting for init/exit and power on/off not working properly. The second issue is related to the two inno-usb2 and typec drivers improperly used UCLASS_PHY for their glue/wrapper driver. This could cause a crash in very specific scenarios, e.g. missing to enable the otg/host-port node and only leaving the usb2phy node enabled. The last issue is related to supporting using only USB2 PHY for USB OTG purpose without having the USB3 PHY initialized, in such scenario the U3 port needs to be disable, more precisely the usb3otg clock source must change to use UTMI clk instead of the default PIPE clk. Prior to this series it was the usb3-phy related driver that would disable the U3 port in special circumstances, e.g. for DP only mode or when limiting to use high-speed as maximum-speed. With this series the U3 port instead is disabled early, the USBDP PHY driver in both U-Boot and Linux will already enable the U3 port when needed so no changes in behavior is really expected for boards. Finally, this series also moves usb otg related device tree nodes for the Generic RK3588 board from the board u-boot.dtsi to the main board dts. Jonas Karlman (10): phy: rockchip: usbdp: Fix Generic PHY reference counting phy: rockchip: usbdp: Simplify init ops phy: rockchip: naneng-combphy: Fix Generic PHY reference counting phy: rockchip: naneng-combphy: Simplify init ops phy: rockchip: naneng-combphy: Use syscon_regmap_lookup_by_phandle phy: rockchip: inno-usb2: Fix improper use of UCLASS_PHY phy: rockchip: typec: Fix improper use of UCLASS_PHY rockchip: rk3588: Disable USB3OTG U3 ports early rockchip: rk3576: Disable USB3OTG0 U3 port early rockchip: rk3588-generic: Move usb nodes to board dts arch/arm/dts/rk3588-generic-u-boot.dtsi | 18 --- arch/arm/dts/rk3588-generic.dts | 16 +++ arch/arm/mach-rockchip/rk3576/rk3576.c | 6 + arch/arm/mach-rockchip/rk3588/rk3588.c | 8 ++ configs/generic-rk3588_defconfig | 1 - drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- .../rockchip/phy-rockchip-naneng-combphy.c | 119 ++++-------------- drivers/phy/rockchip/phy-rockchip-typec.c | 2 +- drivers/phy/rockchip/phy-rockchip-usbdp.c | 75 ++--------- 9 files changed, 71 insertions(+), 176 deletions(-) -- 2.50.1