public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/6] rockchip: add a functional usb3 phy driver for rk3328
@ 2025-01-15  1:26 Peter Geis
  2025-01-15  1:26 ` [RFC PATCH v1 1/6] clk: rockchip: fix wrong clk_ref_usb3otg parent " Peter Geis
                   ` (8 more replies)
  0 siblings, 9 replies; 44+ messages in thread
From: Peter Geis @ 2025-01-15  1:26 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: zyw, kever.yang, frank.wang, william.wu, wulf, linux-rockchip,
	Peter Geis, Alex Bee, Algea Cao, Arnd Bergmann, Conor Dooley,
	Cristian Ciocaltea, Diederik de Haas, Dragan Simic, Elaine Zhang,
	FUKAUMI Naoki, Johan Jonker, Jonas Karlman,
	Kishon Vijay Abraham I, Krzysztof Kozlowski, Michael Turquette,
	Philipp Zabel, Rob Herring, Sebastian Reichel, Stephen Boyd,
	Trevor Woerner, Vinod Koul, Zhang Yubing, devicetree,
	linux-arm-kernel, linux-clk, linux-kernel, linux-phy


This is my newly reworked phy driver for the rk3328 usb3 phy. It is
based loosely on my original version, but as of now almost nothing of
the original driver remains. The main fix here is the discovery of
BIT(6) in the interrupt enable grf register fixes the usb3 disconnection
detection (mostly). On occasion an unpopulated usb3 hub will take
several seconds to disconnect. However this means all of the hack around
work to reset the usb core manually is no longer required.

I did my best to document all registers I could find. A lot was taken
from emails between myself and Rockchip's engineers, much thanks to
William Wu <wulf@rock-chips.com> for their assistance here. The rest of
the config bits were taken from the rk3328 and rk3228h TRMs and the
downstream driver. Everything that I couldn't find a definition for is
prefixed UNK_ or UNKNOWN_. There's a lot of obviously used configuration
registers with the pipe interface that are also undocumented.

The only major bug I have so far is my AX88179 usb3 gigabit ethernet
adapter (Pluggable brand) crashes out when large amounts of data are
transmitted. I suspect this is related to the RX and TX tuning, as
leaving it at defaults makes things worse. As I am not a USB3 engineer
and I do not have the specialized knowledge and hardware to determine
what is going wrong, I am hoping the mailing list will have an answer
here.

Please test and review.

Very Respectfully,
Peter Geis



Peter Geis (6):
  clk: rockchip: fix wrong clk_ref_usb3otg parent for rk3328
  dt-bindings: phy: rockchip: add rk3328 usb3 phy
  phy: rockchip: add driver for rk3328 usb3 phy
  arm64: dts: rockchip: add rk3328 usb3 phy node
  arm64: dts: rockchip: enable the usb3 phy on rk3328-roc boards
  arm64: dts: rockchip: enable the usb3 phy on remaining rk3328 boards

 .../bindings/phy/rockchip,inno-usb3phy.yaml   | 166 ++++
 .../boot/dts/rockchip/rk3328-nanopi-r2.dtsi   |  12 +
 .../dts/rockchip/rk3328-orangepi-r1-plus.dtsi |  12 +
 arch/arm64/boot/dts/rockchip/rk3328-roc.dtsi  |  12 +
 .../boot/dts/rockchip/rk3328-rock-pi-e.dts    |  12 +
 .../arm64/boot/dts/rockchip/rk3328-rock64.dts |  12 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  39 +
 drivers/clk/rockchip/clk-rk3328.c             |   2 +-
 drivers/phy/rockchip/Kconfig                  |  10 +
 drivers/phy/rockchip/Makefile                 |   1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb3.c | 869 ++++++++++++++++++
 11 files changed, 1146 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip,inno-usb3phy.yaml
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb3.c

-- 
2.39.5


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

end of thread, other threads:[~2025-02-26 19:49 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15  1:26 [RFC PATCH v1 0/6] rockchip: add a functional usb3 phy driver for rk3328 Peter Geis
2025-01-15  1:26 ` [RFC PATCH v1 1/6] clk: rockchip: fix wrong clk_ref_usb3otg parent " Peter Geis
2025-01-15  1:26 ` [RFC PATCH v1 2/6] dt-bindings: phy: rockchip: add rk3328 usb3 phy Peter Geis
2025-01-16 13:08   ` Krzysztof Kozlowski
2025-01-16 13:32     ` Peter Geis
2025-01-16 13:59       ` Peter Geis
2025-01-18  9:06       ` Krzysztof Kozlowski
2025-01-15  1:26 ` [RFC PATCH v1 3/6] phy: rockchip: add driver for " Peter Geis
2025-01-15 11:24   ` Piotr Oniszczuk
2025-01-16 14:09     ` Peter Geis
2025-01-16 12:59   ` Krzysztof Kozlowski
2025-01-16 13:14     ` Peter Geis
2025-01-16 15:26   ` Diederik de Haas
2025-01-16 15:57     ` Peter Geis
2025-01-15  1:26 ` [RFC PATCH v1 4/6] arm64: dts: rockchip: add rk3328 usb3 phy node Peter Geis
2025-01-16 13:01   ` Krzysztof Kozlowski
2025-01-16 16:53     ` Diederik de Haas
2025-01-17  4:10       ` Dragan Simic
2025-01-18  8:46         ` Krzysztof Kozlowski
2025-01-18  9:25           ` Dragan Simic
2025-01-18  9:31             ` Krzysztof Kozlowski
2025-01-18  9:43               ` Dragan Simic
2025-01-18  9:52                 ` Krzysztof Kozlowski
2025-01-18 10:10                   ` Dragan Simic
2025-01-18 10:29                     ` Krzysztof Kozlowski
2025-01-18 10:45                       ` Dragan Simic
2025-01-18 14:22                         ` Peter Geis
2025-01-18  8:41       ` Krzysztof Kozlowski
2025-01-18  9:19         ` Krzysztof Kozlowski
2025-01-18  9:34           ` Dragan Simic
2025-01-18 15:55         ` Diederik de Haas
2025-01-15  1:26 ` [RFC PATCH v1 5/6] arm64: dts: rockchip: enable the usb3 phy on rk3328-roc boards Peter Geis
2025-01-15  1:26 ` [RFC PATCH v1 6/6] arm64: dts: rockchip: enable the usb3 phy on remaining rk3328 boards Peter Geis
2025-01-15 11:22 ` [RFC PATCH v1 0/6] rockchip: add a functional usb3 phy driver for rk3328 Piotr Oniszczuk
2025-01-15 12:25   ` Peter Geis
2025-01-15 12:35     ` Piotr Oniszczuk
2025-01-15 13:15       ` Peter Geis
2025-01-15 13:25         ` Piotr Oniszczuk
2025-01-16 14:02           ` Peter Geis
2025-01-16 14:35             ` Piotr Oniszczuk
2025-01-16 16:00               ` Peter Geis
2025-01-18  9:08 ` Krzysztof Kozlowski
2025-01-18 14:35   ` Peter Geis
2025-02-26 19:49 ` (subset) " Heiko Stuebner

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