How do I set the USB port rate to USB3.2-Gen2

Hello!

I used Orin nano module and custom board
I need to use two USB3.2-Gen2 interfaces on my hardware, pins are USB1+USBSS1, USB2+USBSS2
The interface of USB1+USBSS1 is normal, and the rate can reach USB3.2-Gen2
The rate of the other USB2+USBSS2 interface is only USB2.0
I read this document:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html#porting-the-universal-serial-bus
There is some confusion in the document, I am not clear about the correspondence between USB pin, address, port and phy
I am currently using the default configuration of the device tree, can you help me to see how to change?

root@edge-computer:/home/edge# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M

This is the exported device tree:
extracted_proc.dts.txt (326.8 KB)

This is the kernel log:
dmesg.log (132.8 KB)

usb2-0 is mapping to USB0
usb2-1 is mapping to USB1… and so on.

usb3-0 → USBSS0
usb3-1 → USBSS1… and so on.

Thus, I saw you disabled usb3-2… which means your 2nd port won’t have usb3 speed.

I enabled usb3-2, but there are still problems
Both usb ports on my hardware are connected to the USB HUB chip GL3590
I see that the usb interface rate is already 10G, but the USB flash drive I inserted is not recognized
I inserted two flash drives, but I can only identify one

root@edge-computer:/home/edge# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 3: Dev 6, If 0, Class=Hub, Driver=hub/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M

Below is the modified device tree, can you help me look at it again:
extracted_proc.dts.txt (326.9 KB)

Maybe you could share the dmesg. Please remove other USB SSD and only keep the problematic port with device connected.

Hello!
I inserted the USB flash drive after the system was booted
This is the kernel log:

dmesg.log (118.7 KB)

[ 57.768771] usb 2-3.4: Failed to set U1 timeout to 0x0,error code -19
[ 57.769033] usb 2-3.4: Set SEL for device-initiated U1 failed.
[ 57.769279] usb 2-3.4: Set SEL for device-initiated U2 failed.
[ 57.769281] usb 2-3.4: usb_reset_and_verify_device Failed to disable LPM
[ 57.888784] sda: detected capacity change from 60125184 to 0
[ 58.144762] usb 2-3: USB disconnect, device number 5
[ 58.144779] usb 2-3.4: USB disconnect, device number 6
[ 60.341302] usb 2-3: new SuperSpeed Plus Gen 2x1 USB device number 7 using tegra-xusb
[ 60.368454] hub 2-3:1.0: USB hub found
[ 60.369034] hub 2-3:1.0: 4 ports detected
[ 60.596810] hub 2-3:1.0: activate → -19

Is this hub the one that has problem?

Yes, this error will be printed after inserting the USB flash drive

Maybe you should share the schematic for review.

Hello!
This is the schematic diagram of the part of the USB interface in question



Hello!
Do I need to modify UPHY Lane Configuration?
The default values are currently used

ODMDATA="gbe-uphy-config-8,hsstp-lane-map-3,hsio-uphy-config-0";
cat /sys/kernel/debug/bpmp/debug/uphy/config
0x03a00000

@WayneWWW Hello!
I modified the nvidia,usb2-companion properties of usb3-1 and usb3-1 in the device tree to disable usb3-0 because I am not using USBSS0

Two USB hubs are recognized without inserting a USB flash drive

root@edge-computer:/home/edge# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M

After the USB flash drive is inserted, the HUB of the USB2 port disappears:

root@edge-computer:/home/edge# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
root@edge-computer:/home/edge# 

And the kernel has an error log:

[  105.100972] hub 2-3:1.0: activate --> -19
[  109.173253] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[  109.173308] usb 2-3: Failed to suspend device, error -19
[  110.233142] usb 2-3: Device not responding to setup address.
[  110.441140] usb 2-3: Device not responding to setup address.
[  110.648982] usb 2-3: device not accepting address 4, error -71
[  111.805269] usb 2-3: Device not responding to setup address.
[  112.013140] usb 2-3: Device not responding to setup address.
[  112.220971] usb 2-3: device not accepting address 5, error -71
[  112.733142] usb 2-3: Device not responding to setup address.
[  112.941419] usb 2-3: Device not responding to setup address.

This is the current device tree:
extracted_proc.dts.txt (326.8 KB)
This is the kernel log:
dmesg.log (124.7 KB)
Can you help me?

請問這一段到底在講什麼… 聽起來不太正確.

USBSS0對應的是usb3-0. 你沒在用它的話為什麼你要關掉usb3-1…

Sorry, the translation is wrong, I only disabled usb3-0, enabled usb3-1 and usb3-2

我再確認一次 你的usb3-1/usb3-2現在都是接同樣的hub嗎?

是的,都是接的HUB芯片GL3590,下面是原理图:


因為這部份的software設定其實是比較單純的 - 簡單來說你的usb3-1跟usb3-2的device tree就是寫成幾乎一樣 (usb2-x配對部份當然要寫各自的). 如果你的device tree已經寫成一樣了, 但還是有一顆出現-71的錯誤的話, 可能建議從硬體方面去debug… -71基本上都是訊號相關的問題

我看到在设备树默认配置中,这里vbus-supply是vdd_1v1_hub,我需要改都成vdd_1v1_hub还是vdd_5v0_sys?

看你現在的hub硬體上是接什麼就改成用什麼

现在USB速率正确了,但是在插拔U盘时偶尔会出现问题,能识别到USB设备,但不能识别到分区,内核报错如下:


能帮忙分析一下是硬件问题还是软件问题吗?

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks

你能替換其他usb裝置然後測試是不是有類似的錯誤嗎?