[PATCH 0/4] [RFC] rk3328 usb3 phy driver
Peter Geis
pgwipeout at gmail.com
Mon Nov 16 10:17:32 EST 2020
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
More information about the Linux-rockchip
mailing list