public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC/PATCH 0/2] dwc3/rockchip orientation fixes
@ 2025-07-10 15:22 John Keeping
  2025-07-10 15:22 ` [RFC/PATCH 1/2] usb: dwc3: disable for USB_ROLE_NONE John Keeping
  2025-07-10 15:22 ` [RFC/PATCH 2/2] phy: rockchip: usbdp: implement .set_mode John Keeping
  0 siblings, 2 replies; 10+ messages in thread
From: John Keeping @ 2025-07-10 15:22 UTC (permalink / raw)
  To: linux-rockchip
  Cc: John Keeping, Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner,
	Thinh Nguyen, Greg Kroah-Hartman, Sebastian Reichel,
	Nicolas Frattaroli, Neil Armstrong, linux-usb, linux-phy,
	linux-arm-kernel, linux-kernel

This series attempts to fix an issue with using the USB PHY on RK3588 as
an orientation switch.  The phy driver only updates its internal state
and does not write to the hardware when notified of an orientation
switch.

An early patch addressing this issue [1] updated the hardware directly,
but this changes the phy state underneath the USB controller when it is
not expecting the state to change.  That was addressed in [2] but my
testing of that shows runtime PM overflows that cause the device to be
left disabled unexpectedly.

This approach updates the dwc3 driver so that it always signals a phy
mode change when a plug event occurs, allowing the phy to reset safely
at a point when the USB controller expects it to do so.

The dwc3 changes seem to work in my testing, but I have no idea of the
full implications of setting an "unsupported" role.

[1] https://lore.kernel.org/r/20250226103810.3746018-1-heiko@sntech.de
[2] https://lore.kernel.org/r/20250610-rk3576-sige5-usb-v4-0-7e7f779619c1@collabora.com

John Keeping (2):
  usb: dwc3: disable for USB_ROLE_NONE
  phy: rockchip: usbdp: implement .set_mode

 drivers/phy/rockchip/phy-rockchip-usbdp.c | 14 ++++++++++++++
 drivers/usb/dwc3/core.c                   |  3 ---
 drivers/usb/dwc3/drd.c                    |  5 +----
 3 files changed, 15 insertions(+), 7 deletions(-)

-- 
2.50.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-08-07  1:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 15:22 [RFC/PATCH 0/2] dwc3/rockchip orientation fixes John Keeping
2025-07-10 15:22 ` [RFC/PATCH 1/2] usb: dwc3: disable for USB_ROLE_NONE John Keeping
2025-07-12  0:11   ` Thinh Nguyen
2025-07-14 15:15     ` John Keeping
2025-07-29 22:10       ` Thinh Nguyen
2025-08-06 17:10         ` John Keeping
2025-08-07  0:58           ` Thinh Nguyen
2025-07-10 15:22 ` [RFC/PATCH 2/2] phy: rockchip: usbdp: implement .set_mode John Keeping
2025-07-15 10:35   ` Heiko Stuebner
2025-07-16 19:14     ` John Keeping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox