public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Johan Jonker <jbx6244@gmail.com>
To: kever.yang@rock-chips.com
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, trini@konsulko.com,
	hl@rock-chips.com, jernej.skrabec@gmail.com, w.egorov@phytec.de,
	jagan@amarulasolutions.com, heiko@sntech.de, jonas@kwiboo.se,
	michael@amarulasolutions.com, marex@denx.de,
	u-boot@lists.denx.de, upstream@lists.phytec.de
Subject: [RFC PATCH v1 0/2] Add Rockchip USBPHY DM driver
Date: Thu, 2 Apr 2026 03:31:14 +0200	[thread overview]
Message-ID: <1e443ab0-129b-42db-b224-253ba8a2f80f@gmail.com> (raw)

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.

Tested on RK3066.
Feedback request for RK3188 and RK3288.

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 {
		};
	};
};

PROBLEM:
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.

REQUEST:
A little bit of help from the U-boot FDT and DM experts.
Locking/bind a driver in the DM model that is not in DT root.
Is this solvable with current DM stack?

=> 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@17c
 phy           1  [ + ]   rockchip_usbphy_port  |   `-- usb-phy@188

Johan Jonker (2):
  phy: rockchip: add phy-rockchip-usb2.c
  usb: phy: remove rockchip_usb2_phy.c

 arch/arm/dts/rk3066a-u-boot.dtsi         |  29 ++
 arch/arm/dts/rk3188-u-boot.dtsi          |  29 ++
 arch/arm/dts/rk3288-u-boot.dtsi          |  40 +++
 arch/arm/mach-rockchip/board.c           |  28 --
 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 | 379 +++++++++++++++++++++++
 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, 522 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


             reply	other threads:[~2026-04-02  1:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02  1:31 Johan Jonker [this message]
2026-04-02  1:32 ` [RFC PATCH v1 1/2] phy: rockchip: add phy-rockchip-usb2.c Johan Jonker
2026-04-02  1:32 ` [RFC PATCH v1 2/2] usb: phy: remove rockchip_usb2_phy.c Johan Jonker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e443ab0-129b-42db-b224-253ba8a2f80f@gmail.com \
    --to=jbx6244@gmail.com \
    --cc=heiko@sntech.de \
    --cc=hl@rock-chips.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=upstream@lists.phytec.de \
    --cc=w.egorov@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox