Skip to content

Add Rockchip USBPHY DM driver

Johan Jonker u-boot 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest10 patches 0 repliesNew
  2. v410 patches 1 replySuperseded
  3. v312 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches0 repliesSuperseded
v1 RFC2 patches0 repliesSuperseded

Changes in v5 from the cover letter

rebase

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10rockchip: configs: compile rk3066 SPL with SPL_OF_REALconfigs/mk808_defconfig+3 -60 replies
2/10usb: Kconfig: add SPL_USB_DWC2drivers/Makefile drivers/usb/common/Makefile drivers/usb/host/Kconfig +1 more+15 -30 replies
3/10phy: rockchip: sort Makefile and Kconfigdrivers/phy/rockchip/Kconfig drivers/phy/rockchip/Makefile+17 -160 replies
4/10rockchip: bind grf syscon usbphy subnodearch/arm/mach-rockchip/rk3066/syscon_rk3066.c arch/arm/mach-rockchip/rk3188/syscon_rk3188.c arch/arm/mach-rockchip/rk3288/syscon_rk3288.c+9 -00 replies
5/10phy: rockchip: add phy-rockchip-usb2.cdrivers/phy/rockchip/Kconfig drivers/phy/rockchip/Makefile drivers/phy/rockchip/phy-rockchip-usb2.c+249 -00 replies
6/10rockchip: configs: use phy-rockchip-usb2 DM driverconfigs/chromebit_mickey_defconfig configs/chromebook_jerry_defconfig configs/chromebook_minnie_defconfig +13 more+16 -160 replies
7/10usb: phy: remove rockchip_usb2_phy.carch/arm/mach-rockchip/board.c drivers/usb/phy/Kconfig drivers/usb/phy/Makefile +2 more+0 -1460 replies
8/10rockchip: spl-boot-order: add usb boot optionarch/arm/mach-rockchip/spl-boot-order.c+3 -00 replies
9/10arm: dts: rockchip: add USB required properties in SPL for mk808arch/arm/dts/rk3066a-mk808-u-boot.dtsi+18 -00 replies
10/10rockchip: configs: enable USB in SPL for mk808configs/mk808_defconfig+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 00/10] Add Rockchip USBPHY DM driver

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@20008000 {
	usbphy: usbphy {

		usbphy0: usb-phy@17c {
		};

		usbphy1: usb-phy@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@20008000
 nop           0  [ + ]   rockchip_usb_phy      |   `-- usbphy
 phy           0  [ + ]   rockchip_usb_phy_por  |       |-- usb-phy@17c
 phy           1  [ + ]   rockchip_usb_phy_por  |       `-- usb-phy@188

Changed V3:
rebase
compile rk3066 SPL with SPL_OF_REAL
add SCLK_OTGPHYx enable and disable
make drivers available in SPL
enable USB in SPL for MK808

Changed V4:
restyle
remove clk patches
remove reset patch
(Jonas)
reword
replaced deprecated help word
call dm_scan_fdt_dev to bind grf child
split Makefile and Kconfig sort
fixup SPL_PHY_ROCKCHIP_USB2
remove DECLARE_GLOBAL_DATA_PTR
add bind rollback
use device_get_supply_regulator
use regulator_set_enable_if_allowed
use reset_assert_bulk functions
init the port in the port probe function
protect against a blank struct
remove of_xlate
remove select RESET_ROCKCHIP
use uclass_find_device_by_of_offset

Changed V5:
rebase

Johan Jonker (10):
rockchip: configs: compile rk3066 SPL with SPL_OF_REAL
usb: Kconfig: add SPL_USB_DWC2
phy: rockchip: sort Makefile and Kconfig
rockchip: bind grf syscon usbphy subnode
phy: rockchip: add phy-rockchip-usb2.c
rockchip: configs: use phy-rockchip-usb2 DM driver
usb: phy: remove rockchip_usb2_phy.c
rockchip: spl-boot-order: add usb boot option
arm: dts: rockchip: add USB required properties in SPL for mk808
rockchip: configs: enable USB in SPL for mk808

 arch/arm/dts/rk3066a-mk808-u-boot.dtsi        |  18 ++
 arch/arm/mach-rockchip/board.c                |  28 ---
 arch/arm/mach-rockchip/rk3066/syscon_rk3066.c |   3 +
 arch/arm/mach-rockchip/rk3188/syscon_rk3188.c |   3 +
 arch/arm/mach-rockchip/rk3288/syscon_rk3288.c |   3 +
 arch/arm/mach-rockchip/spl-boot-order.c       |   3 +
 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              |   2 +-
 configs/miqi-rk3288_defconfig                 |   2 +-
 configs/mk808_defconfig                       |  14 +-
 configs/phycore-rk3288_defconfig              |   2 +-
 configs/popmetal-rk3288_defconfig             |   2 +-
 configs/rock-pi-n8-rk3288_defconfig           |   2 +-
 configs/rock2_defconfig                       |   2 +-
 configs/rock_defconfig                        |   2 +-
 configs/tinker-rk3288_defconfig               |   2 +-
 configs/tinker-s-rk3288_defconfig             |   2 +-
 configs/vyasa-rk3288_defconfig                |   2 +-
 drivers/Makefile                              |   3 +-
 drivers/phy/rockchip/Kconfig                  |  41 ++-
 drivers/phy/rockchip/Makefile                 |   7 +-
 drivers/phy/rockchip/phy-rockchip-usb2.c      | 234 ++++++++++++++++++
 drivers/usb/common/Makefile                   |   2 +-
 drivers/usb/host/Kconfig                      |  11 +
 drivers/usb/host/Makefile                     |   2 +-
 drivers/usb/phy/Kconfig                       |   3 -
 drivers/usb/phy/Makefile                      |   1 -
 drivers/usb/phy/rockchip_usb2_phy.c           | 113 ---------
 include/usb/dwc2_udc.h                        |   1 -
 33 files changed, 333 insertions(+), 187 deletions(-)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-usb2.c
 delete mode 100644 drivers/usb/phy/rockchip_usb2_phy.c

--
2.39.5