[PATCH v18 0/7] phy: rockchip: usbdp: Fix runtime muxing between USB3 and DP
From: Sebastian Reichel
Date: Thu Nov 19 2026 - 14:40:59 EST
This (final) cleanup part depends on new DWC3 glue driver series:
https://lore.kernel.org/linux-phy/20261114-b4-rockchip-dwc3-rockchip-glue-v19-0-b79fb5f4b42a@xxxxxxxxxxxxx/
Changes in v18:
- Link to v17: https://patch.msgid.link/20261114-b4-rockchip-usbdp-cleanup-part3-v17-0-1af5f566408e@xxxxxxxxxxxxx
- Ignore Sashiko report that rk_udphy_u3_port_disable() is not called
when rk_udphy_usb3_phy_exit() is called. This path ensures dwc3 no
longer accesses registers (Sashiko)
- Ignore Sashiko report that the orientation switch event should also
update the power state for setups with orientation switch enabled, but
mode switch disabled. Currently upstream has two DTs doing that and
both are incorrect (i.e. mode-switch should be added). Considering this
is a pre-existing "bug", it's better to fix these DTs (independent of
this series). The mux is necessary to support 4 lane DP mode anyway.
Basically orientation-switch without mode-switch makes no sense for
this PHY, because orientation-switch already requires that all 4 SS
lanes are routed. DP AltMode also requires the SBU lanes in addition,
but there is no reason not to route them when the other lanes are
already assigned. In the unlikely case a HW vendor failed to route
them, adding the mode-switch is still fine (e.g. it also allows
switching between SAFE and USB) anyway. (Sashiko)
- Fix PHY clock leak for high-speed only mode (Sashiko)
- Ignore errors in rk_udphy_dp_phy_power_off() and
rk_udphy_usb3_phy_exit(); when PHY is powered off, no failures can
happen and when PHY needs a re-init after the exit, the error is
effectively for the other PHY. Thus avoid propagating the error
(Sashiko)
- Default to TYPEC_STATE_SAFE to avoid one extra useless mode change
(Sashiko)
Changes in v17:
- Link to v16: https://patch.msgid.link/20260930-b4-rockchip-usbdp-cleanup-part3-v16-0-bc144f80afc4@xxxxxxxxxxxxx
- Rebase to v7.4-rc1 and v19 of the glue driver series. This drops
the first patch, as the PHY reset notifier has been replaced by
direct calls added in the glue series, which now also introduces
sw_mode.
- Add one more patch to gracefully handle DP lane remuxing after cable
orientation change when the DP controller kept the display output (and
thus PHY) enabled even with HPD=0. This can apparently happen with
some DRM compositors.
Changes in v16:
- Link to v15: https://patch.msgid.link/20260915-b4-rockchip-usbdp-cleanup-part3-v15-0-9ad90a456953@xxxxxxxxxxxxx
- Split out "Disable USB3 port during normal power-on" from first patch
- Collect R-b tags from Mani
Changes in v15:
- Link to v14: https://patch.msgid.link/20260813-rockchip-usbdp-cleanup-v14-0-b5ad9c68fa11@xxxxxxxxxxxxx
- Split the series, no patch changes in this part
Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
Sebastian Reichel (7):
phy: rockchip: usbdp: Disable USB3 port during normal power-on
phy: rockchip: usbdp: Drop -EPROBE_DEFER hack
phy: rockchip: usbdp: Rename mode to hw_mode
phy: rockchip: usbdp: Fix power state handling
phy: rockchip: usbdp: Re-init PHY on mux change
phy: rockchip: usbdp: Add USB-C state without DP enabled
phy: rockchip: usbdp: Add DP lane setup to power state update
drivers/phy/rockchip/phy-rockchip-usbdp.c | 240 +++++++++++++++++-------------
1 file changed, 139 insertions(+), 101 deletions(-)
---
base-commit: bc71431221f5ba8bb33918399552636e059c2c45
change-id: 20260914-b4-rockchip-usbdp-cleanup-part3-cca70383ebe3
prerequisite-message-id: 20261114-b4-rockchip-dwc3-rockchip-glue-v19-0-b79fb5f4b42a@xxxxxxxxxxxxx
prerequisite-patch-id: 4fa3aae8ccfa5383522070179c8777302411082c
prerequisite-patch-id: 0cfab94fd67b6304cd303a9810981aaca328c651
prerequisite-patch-id: c2e1c453454a7589a691fe391dc79e86f09ca7b7
prerequisite-patch-id: dadeaf9e369e04d8b3329493a1a0756ddd6140f0
prerequisite-patch-id: 2c727b8400980c760ca8f1e5fd989a3bf9404020
prerequisite-patch-id: cf4e7d51c77a5eccda6c687730eddd3135d94d91
Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>