Usb speed for flash is only 2.0

Hello, NVIDIA engineers and experts,

Would you be so kind as to help me with the usb issue. When using JetPack 7.1 on a custom board, I found that the USB speed during flashing is only 2.0, not 5Gb (3.0). However, I have already enabled USB 3.0 in the device tree. I’m not sure what factors are affecting the negotiation process or if there is a configuration error causing the speed not to reach 3.0. In addition, when forcibly entering recovery mode via the hardware button, the USB speed is also 2.0, and it remains 2.0 when entering initrd. I would greatly appreciate any insights or assistance you could offer regarding this issue.

dmesg_log.txt (52.7 KB)

tegra264-p4071-0000+p3834-0008-nv.zip (35.1 KB)

root@wpces:/home/wpces# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/6p, 480M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 002: Dev 011, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M
    |__ Port 003: Dev 003, If 0, Class=Hub, Driver=hub/7p, 12M
    |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/7p, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M

In which stage did you dump this lsusb result? Is it dumped when you put the board into recovery mode?

Hi,WayneWWW

After push the button in force recovery mode and when booting to initrd when flashing, the rate is the same.

Does this issue also persist after you boot up into kernel?

Hello,WayneWWW

Yes, but my device tree has already enabled usb3-1 and performed the companion. I was able to flash all the boards quickly the first time, but I’m not sure if it’s due to the brand-new NVMe hard drive. When I went to flash again the second time, it took a long time. For the AB system, the size is about 200G, and it was quick, taking about 10 minutes (but at that time I didn’t check if the kernel was 2.0 or 3.0). Now it takes 40 minutes (I confirmed that the kernel is 2.0). Are there any directions I can investigate further?

Hi,

If you suspect this is USB3 problem then we just checked the USB3 problem first.

Please check what is the USB speed detected on your host PC first.

It is not just “my device tree has already enabled usb3-1”, if your hardware design has something wrong, it would downgrade to USB2 too.

Hi,WayneWWW

Well, yes, I confirm that during the entire flashing process—especially when entering the kernel—the speed I saw was always 480M, never 5000M.

Please provide the schematic for us to check.

Hi,WayneWWW

I just tried and wanted to sync the latest results with you. When entering recovery mode using the hardware button, both front and back insertions show 2.0. However, when flashing the kernel initrd, one shows 2.0 and the other shows 3.0, which seems like there might be an issue with the mux. At 3.2, the flashing rate is much faster.

root@wpces:/home/wpces# lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 003 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 003 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 0955:7100 NVIDIA Corp. Tegra Device
root@wpces:/home/wpces# lsusb -v -d 0955:7100 | grep 'bcdUSB'
  bcdUSB               3.20
root@wpces:/home/wpces# 
root@wpces:/home/wpces# 
root@wpces:/home/wpces# lsusb -v -d 0955:7100 | grep 'bcdUSB'
  bcdUSB               3.20
root@wpces:/home/wpces# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/6p, 480M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 003: Dev 003, If 0, Class=Hub, Driver=hub/7p, 12M
    |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/7p, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    |__ Port 001: Dev 002, If 0, Class=Vendor Specific Class, Driver=usbfs, 5000M
root@wpces:/home/wpces# 
root@wpces:/home/wpces# 
root@wpces:/home/wpces# lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 003 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 003 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 003 Device 010: ID 0955:7100 NVIDIA Corp. Tegra Device
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
root@wpces:/home/wpces# lsusb -v -d 0955:7100 | grep 'bcdUSB'
  bcdUSB               2.10
root@wpces:/home/wpces# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/6p, 480M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 002: Dev 010, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M
    |__ Port 003: Dev 003, If 0, Class=Hub, Driver=hub/7p, 12M
    |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/7p, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
root@wpces:/home/wpces# 

don’t know what you are trying to tell here.

What does that mean “one” and “the other”?

Hi,WayneWWW

It refers to the two orientations of the Type-C insertion, both front and back (upside down and right-side up).

If you are talking about same Jetson device with different type C orientation leading to different behaviors, then it sound nothing to check from our side here. It could be specific to your type C solution issue.

Yes, thank you very much for your patient explanation.

Sorry for late post, but since I diffed your dts and my freshly jetpack7.1 flashed thor dev kit, I may as well post it.

hi wpceswpces,

If I see this clearly, wpceswpces.dts, has a logical port usb3-1 enabled, but the physical hardware lane it relies on is disabled.

Thor Dev Kit:   pads -> usb3 -> lanes -> usb3-1 is set to status = "okay".
wpceswpces.dts: pads -> usb3 -> lanes -> usb3-1 is set to status = "okay", but usb3-0, usb3-2, and usb3-3 are all disabled.

And look at usb2 lanes:

Thor Dev Kit: Has usb2-0, usb2-1, usb2-2, and usb2-3 all set to status = "okay".
Custom Board: Has usb2-1, usb2-2, and usb2-3 set to status = "disabled".

USB 3.0 ports are SuperSpeed extensions of USB 2.0 ports. In the ports section of both files usb3-1 port uses the property: nvidia,usb2-companion = <0x00>;

wpceswpces.dts usb3-1 is the only active SuperSpeed port, and disabled most other USB infrastructure. If the hardware routing on your custom carrier board actually wires the Realtek Hub to a different physical pin (like usb3-0), the system will never see it because usb3-0 is explicitly disabled in your pads section.


Thor dev kit live_devicetree.dts

                padctl@a808680000 {
                        reg-names = "padctl\0ao";
                        resets = <0x02 0x4d>;
                        interrupts = <0x02 0x05 0x04>;
                        compatible = "nvidia,tegra264-xusb-padctl";
                        status = "okay";
                        reg = <0xa8 0x8680000 0x00 0x20000 0xa8 0x86a0000 0x00 0x10000>;
                        phandle = <0x157>;
                        reset-names = "padctl";

                        ports {

                                usb3-2 {
                                        nvidia,usb2-companion = <0x03>;
                                        status = "okay";
                                };

                                usb3-0 {
                                        nvidia,usb2-companion = <0x01>;
                                        status = "okay";
                                };

                                usb2-2 {
                                        mode = "host";
                                        status = "okay";
                                };

                                usb2-0 {
                                        usb-role-switch;
                                        mode = "otg";
                                        role-switch-default-mode = "peripheral";
                                        status = "okay";
                                };

                                usb3-3 {
                                        status = "disabled";
                                };

                                usb3-1 {
                                        nvidia,usb2-companion = <0x00>;
                                        status = "okay";
                                };

                                usb2-3 {
                                        mode = "host";
                                        status = "okay";
                                };

                                usb2-1 {
                                        mode = "host";
                                        status = "okay";
                                };
                        };

                        prod-settings {
                                #prod-cells = <0x04>;

                                prod {
                                        prod = <0x00 0x88 0x21fe0000 0x1ba0000 0x00 0x94 0x3c00000 0x1000000 0x00 0xc8 0x21fe0000 0x1ba0000 0x00 0xd4>
                                };
                        };

                        pads {

                                usb3 {

                                        lanes {

                                                usb3-2 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x15e>;
                                                };

                                                usb3-0 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x15d>;
                                                };

                                                usb3-3 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "disabled";
                                                };

                                                usb3-1 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x159>;
                                                };
                                        };
                                };

                                usb2 {

                                        lanes {

                                                usb2-2 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x15b>;
                                                };

                                                usb2-0 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x158>;
                                                };

                                                usb2-3 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x15c>;
                                                };

                                                usb2-1 {
                                                        nvidia,function = "xusb";
                                                        #phy-cells = <0x00>;
                                                        status = "okay";
                                                        phandle = <0x15a>;
                                                };
                                        };
                                };
                        };
                };

wpceswpces.dts

                padctl@a808680000 {
                        compatible = "nvidia,tegra264-xusb-padctl";
                        reg = <0xa8 0x8680000 0x00 0x20000 0xa8 0x86a0000 0x00 0x10000>;
                        reg-names = "padctl\0ao";
                        interrupts = <0x02 0x05 0x04>;
                        resets = <0x02 0x4d>;
                        reset-names = "padctl";
                        status = "okay";
                        phandle = <0x157>;

                        pads {

                                usb2 {

                                        lanes {

                                                usb2-0 {
                                                        nvidia,function = "xusb";
                                                        status = "okay";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x158>;
                                                };

                                                usb2-1 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x15a>;
                                                };

                                                usb2-2 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x15b>;
                                                };

                                                usb2-3 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x15c>;
                                                };
                                        };
                                };
                                usb3 {

                                        lanes {

                                                usb3-0 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x15d>;
                                                };

                                                usb3-1 {
                                                        nvidia,function = "xusb";
                                                        status = "okay";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x159>;
                                                };

                                                usb3-2 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                        phandle = <0x15e>;
                                                };

                                                usb3-3 {
                                                        nvidia,function = "xusb";
                                                        status = "disabled";
                                                        #phy-cells = <0x00>;
                                                };
                                        };
                                };
                        };

                        ports {

                                usb2-0 {
                                        status = "okay";
                                        mode = "otg";
                                        usb-role-switch;
                                        role-switch-default-mode = "peripheral";
                                };

                                usb2-1 {
                                        status = "disabled";
                                        mode = "host";
                                };

                                usb2-2 {
                                        status = "disabled";
                                        mode = "host";
                                };

                                usb2-3 {
                                        status = "disabled";
                                        mode = "host";
                                };

                                usb3-0 {
                                        status = "disabled";
                                        nvidia,usb2-companion = <0x01>;
                                };

                                usb3-1 {
                                        status = "okay";
                                        nvidia,usb2-companion = <0x00>;
                                };

                                usb3-2 {
                                        status = "disabled";
                                        nvidia,usb2-companion = <0x03>;
                                };

                                usb3-3 {
                                        status = "disabled";
                                };
                        };

                        prod-settings {
                                #prod-cells = <0x04>;

                                prod {
                                        prod = <0x00 0x88 0x21fe0000 0x1ba0000 0x00 0x94 0x3c00000 0x1000000 0x00 0xc8 0x21fe0000 0x1ba0000 0x00 0xd4>
                                };
                        };
                };

Hi,whitesscott

Thank you for your attention and response. On my side, there is only one physical USB 2.0 and USB 3.0, so the other ports are disabled since they are not needed.