Linux USB
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: qcs6490-rb3gen2: Fix GL3590 USB hub port numbers
@ 2026-11-30 11:30 Chen-Yu Tsai
  2026-11-30 11:36 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2026-11-30 11:30 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa
  Cc: Chen-Yu Tsai, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-arm-msm, linux-arm-kernel, Dmitry Baryshkov,
	Neil Armstrong, linux-usb, stable

Per the USB device DT binding (usb-device.yaml), the reg property of a
child node under a USB host controller specifies the host-controller
port number to which the device is attached. On an xHCI controller,
ports are numbered 1..MaxPorts across both USB 3.0 and USB 2.0
protocols.

According to the Renesas uPD720201 User's Manual (Hardware, Rev. 2.00,
sections 3.4.8, 3.7.2, and 5.2), the controller exposes 8 root hub
ports with USB 3.0 SuperSpeed on ports 1-4 (USB3 Compatible Port
Offset = 1, Count = 4) and USB 2.0 on ports 5-8 (USB2 Compatible Port
Offset = 5, Count = 4), paired across connectors C1-C4 as (1, 5),
(2, 6), (3, 7), and (4, 8).

On RB3 Gen 2, the Genesys Logic GL3590 hub enumerates on port 1 of both
root hubs (connector C1), so its SuperSpeed half (usb5e3,625) is on
port 1 and its High-Speed half (usb5e3,610) is on port 5, rather than
ports 2 and 1. With the current values, usb_alloc_dev() (which resolves
root-hub ports via usb_hcd_find_raw_port_number()) associates the
SuperSpeed hub with gl3590_2_0 (hub@1), leaves the High-Speed hub
(port 5) without an of_node, and leaves gl3590_3_0 (hub@2) pointing at
unused SuperSpeed port 2.

Update the unit addresses and reg properties of gl3590_3_0 and
gl3590_2_0 to hub@1 and hub@5, sorted by unit address. Also copy
reset-gpios, pinctrl-0, and pinctrl-names to gl3590_3_0 so both peer
nodes describe the shared hub reset resources (matching the example in
genesys,gl850g.yaml). This also keeps the board working on kernels
where usb_of_get_device_node() does not yet resolve raw root-hub port
numbers and onboard_dev_create_pdevs() scans unmapped ports 1..4 on the
primary root hub (matching hub@1).

This issue was flagged during a review of USB OF raw-port fixes by an
AI coding agent (Antigravity), and verified against the uPD720201
Hardware User's Manual. The patch and commit message were drafted by
the agent and reviewed by me. DTB build- and dt-validate-tested only;
not tested on actual hardware.

Fixes: cde64269eeb8 ("arm64: dts: qcom: qcs6490-rb3gen2: Enable uPD720201 and GL3590")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
USB OF raw-port fixes have not been posted yet. I'm still working
through corner cases and possible affected platforms / devices.

To test, boot the DTB and verify that both USB 2.0 and 3.0 hubs have
the matching of_node associated with them: hub@5 (usb5e3,610) for the
USB 2.0 hub and hub@1 (usb5e3,625) for the USB 3.0 hub. Onboard USB
device power sequencing should still work as described above, so the
hub should come up correctly. Note that on current kernels without the
USB OF raw-port fix, onboard-usb-dev will probe from hub@1 (usb5e3,625)
and log a harmless dummy-regulator message for vdd12 in addition to vdd.
---
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
index 682bcbc0b466..ad7df957b28f 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
@@ -925,22 +925,26 @@ usb-controller@0,0 {
 				#size-cells = <0>;
 
 				/* Genesys Logic GL3590 USB Hub Controller */
-				gl3590_2_0: hub@1 {
-					compatible = "usb5e3,610";
+				gl3590_3_0: hub@1 {
+					compatible = "usb5e3,625";
 					reg = <1>;
 					reset-gpios = <&tlmm 162 GPIO_ACTIVE_HIGH>;
 
 					pinctrl-0 = <&usb_hub_reset_state>;
 					pinctrl-names = "default";
 
-					peer-hub = <&gl3590_3_0>;
+					peer-hub = <&gl3590_2_0>;
 				};
 
-				gl3590_3_0: hub@2 {
-					compatible = "usb5e3,625";
-					reg = <2>;
+				gl3590_2_0: hub@5 {
+					compatible = "usb5e3,610";
+					reg = <5>;
+					reset-gpios = <&tlmm 162 GPIO_ACTIVE_HIGH>;
 
-					peer-hub = <&gl3590_2_0>;
+					pinctrl-0 = <&usb_hub_reset_state>;
+					pinctrl-names = "default";
+
+					peer-hub = <&gl3590_3_0>;
 				};
 			};
 		};
-- 
2.56.1.839.g22a8290db9-goog


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

* Re: [PATCH] arm64: dts: qcom: qcs6490-rb3gen2: Fix GL3590 USB hub port numbers
  2026-11-30 11:30 [PATCH] arm64: dts: qcom: qcs6490-rb3gen2: Fix GL3590 USB hub port numbers Chen-Yu Tsai
@ 2026-11-30 11:36 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-30 11:36 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: linux-usb

> Per the USB device DT binding (usb-device.yaml), the reg property of a
> child node under a USB host controller specifies the host-controller
> port number to which the device is attached. On an xHCI controller,
> ports are numbered 1..MaxPorts across both USB 3.0 and USB 2.0
> protocols.
> 
> According to the Renesas uPD720201 User's Manual (Hardware, Rev. 2.00,
> sections 3.4.8, 3.7.2, and 5.2), the controller exposes 8 root hub
> ports with USB 3.0 SuperSpeed on ports 1-4 (USB3 Compatible Port
> Offset = 1, Count = 4) and USB 2.0 on ports 5-8 (USB2 Compatible Port
> Offset = 5, Count = 4), paired across connectors C1-C4 as (1, 5),
> (2, 6), (3, 7), and (4, 8).
> 
> On RB3 Gen 2, the Genesys Logic GL3590 hub enumerates on port 1 of both
> root hubs (connector C1), so its SuperSpeed half (usb5e3,625) is on
> [ ... ]
> not tested on actual hardware.
> 
> Fixes: cde64269eeb8 ("arm64: dts: qcom: qcs6490-rb3gen2: Enable uPD720201 and GL3590")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130113021.611298-1-wenst@chromium.org?part=1

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

end of thread, other threads:[~2026-11-30 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 11:30 [PATCH] arm64: dts: qcom: qcs6490-rb3gen2: Fix GL3590 USB hub port numbers Chen-Yu Tsai
2026-11-30 11:36 ` sashiko-bot

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