linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] [RFC] rk3328 usb3 phy driver
@ 2020-11-16 15:17 Peter Geis
  2020-11-16 15:17 ` [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon " Peter Geis
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Peter Geis @ 2020-11-16 15:17 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Heiko Stuebner
  Cc: frank.wang, zyw, linux-usb, kever.yang, linux-rockchip,
	Peter Geis, william.wu, wulf, linux-arm-kernel

Good Day,

This is an RFC requesting feedback on a driver for the bugged usb3 phy used in the rk3328 soc.

The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling.
The following erata have been observed:
 - usb3 device disconnect events are not detected by the controller
 - usb2 hubs with no devices attached do not trigger disconnect events when removed
 - interrupts are not reliable

To work around these issues we implement polling of the usb2 and usb3 status.
On usb3 disconnection we reset the usb3 phy which triggers the disconnect event.
On usb2 disconnection we have to force reset the whole controller.
This requires a handoff to a special dwc3 device driver.

I wanted to be able to implement the usb2 fix completely in the phy driver.
Unfortunately I was unable to find a fix for it.
I also was unable to find a method for the phy driver to trigger a controller reset without the special glue.
If anyone has any suggestions for this, please let me know.

This has been tested on the rk3328-roc-cc board with the following devices:
 - usb2 only device
 - usb3 only device
 - usb2 only hub without devices
 - usb3 hub without devices
 - usb2 hub with devices
 - usb3 hub with devices

Peter Geis (4):
  phy: rockchip: add rockchip usb3 innosilicon phy driver
  usb: dwc3: add rockchip innosilicon usb3 glue layer
  arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes
  arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board

 .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts |  21 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  65 +++
 drivers/phy/rockchip/Kconfig                  |   9 +
 drivers/phy/rockchip/Makefile                 |   1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb3.c | 425 ++++++++++++++++++
 drivers/usb/dwc3/Kconfig                      |  10 +
 drivers/usb/dwc3/Makefile                     |   1 +
 drivers/usb/dwc3/dwc3-rockchip-inno.c         | 271 +++++++++++
 8 files changed, 803 insertions(+)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb3.c
 create mode 100644 drivers/usb/dwc3/dwc3-rockchip-inno.c

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-07-19 23:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 15:17 [PATCH 0/4] [RFC] rk3328 usb3 phy driver Peter Geis
2020-11-16 15:17 ` [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon " Peter Geis
2021-07-19 14:29   ` Alex Bee
2021-07-19 23:19     ` Peter Geis
2020-11-16 15:17 ` [PATCH 2/4] usb: dwc3: add rockchip innosilicon usb3 glue layer Peter Geis
2020-11-16 15:17 ` [PATCH 3/4] arm64: dts: rockchip: add rk3328 usb3 and usb3phy nodes Peter Geis
2020-11-16 16:07   ` Johan Jonker
2020-11-16 16:25     ` Peter Geis
2020-11-16 15:17 ` [PATCH 4/4] arm64: dts: rockchip: enable usb3 on rk3328-roc-cc board Peter Geis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).