[PATCH v2 0/2] Add Rockchip USBPHY DM driver
Johan Jonker
jbx6244 at gmail.com
Sat Apr 4 13:20:01 CEST 2026
The Rockchip SoCs with an USB node and compatible = "snps,dwc2" can be
HOST or OTG while the PHY driver is hard coded and initiated in the
board.c file. Above construction is not very U-boot DM alike.
This is an attempt to decouple the USBPHY into a DM driver.
On older Rockchip SOCs an usbphy DT node is placed under a SYSCOM node.
grf: grf at 20008000 {
usbphy: usbphy {
usbphy0: usb-phy at 17c {
};
usbphy1: usb-phy at 188 {
};
};
};
The usbphy node does not show up in the DM tree to be found by the
generic_phy_get_by_index() function. Only by manual transfer to the DT root
is gets detected.
=> dm tree
Class Seq Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
nop 1 [ + ] rockchip_usbphy |-- usbphy
phy 0 [ + ] rockchip_usbphy_port | |-- usb-phy at 17c
phy 1 [ + ] rockchip_usbphy_port | `-- usb-phy at 188
Changed V2:
Add grf function that binds the usbphy driver to the grf syscom driver.
=> dm tree
Class Seq Probed Driver Name
-----------------------------------------------------------
syscon 9 [ + ] rk3066_syscon |-- grf at 20008000
nop 0 [ + ] rockchip_usbphy | `-- usbphy
phy 0 [ + ] rockchip_usbphy_port | |-- usb-phy at 17c
phy 1 [ + ] rockchip_usbphy_port | `-- usb-phy at 188
Johan Jonker (2):
phy: rockchip: add phy-rockchip-usb2.c
usb: phy: remove rockchip_usb2_phy.c
arch/arm/mach-rockchip/board.c | 28 --
arch/arm/mach-rockchip/rk3066/syscon_rk3066.c | 26 ++
arch/arm/mach-rockchip/rk3188/syscon_rk3188.c | 26 ++
arch/arm/mach-rockchip/rk3288/syscon_rk3288.c | 26 ++
configs/chromebit_mickey_defconfig | 2 +-
configs/chromebook_jerry_defconfig | 2 +-
configs/chromebook_minnie_defconfig | 2 +-
configs/chromebook_speedy_defconfig | 2 +-
configs/evb-rk3288-rk808_defconfig | 2 +-
configs/firefly-rk3288_defconfig | 4 +-
configs/miqi-rk3288_defconfig | 4 +-
configs/mk808_defconfig | 2 +-
configs/phycore-rk3288_defconfig | 3 +-
configs/popmetal-rk3288_defconfig | 3 +-
configs/rock-pi-n8-rk3288_defconfig | 2 +-
configs/rock2_defconfig | 3 +-
configs/rock_defconfig | 3 +-
configs/tinker-rk3288_defconfig | 4 +-
configs/tinker-s-rk3288_defconfig | 4 +-
configs/vyasa-rk3288_defconfig | 2 +-
drivers/phy/rockchip/Kconfig | 28 +-
drivers/phy/rockchip/Makefile | 5 +-
drivers/phy/rockchip/phy-rockchip-usb2.c | 371 ++++++++++++++++++
drivers/usb/phy/Kconfig | 3 -
drivers/usb/phy/Makefile | 1 -
drivers/usb/phy/rockchip_usb2_phy.c | 113 ------
include/usb/dwc2_udc.h | 1 -
27 files changed, 494 insertions(+), 178 deletions(-)
create mode 100644 drivers/phy/rockchip/phy-rockchip-usb2.c
delete mode 100644 drivers/usb/phy/rockchip_usb2_phy.c
--
2.39.5
More information about the U-Boot
mailing list