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: Signed-off-by: Chen-Yu Tsai --- 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