How to change USB 3.0 to USB 2.0 just by changing kernel source? (TX2)

Hello,

Currently, two USB ports are operating with USB 3.0 (SuperSpeed). (TX2)
Is there any way to change to USB 2.0 (HighSpeed) by modifying the kernel source?
(Limitations:

  1. Hardware change is not possible (e.g. insert a USB 2.0 hub))
  2. Modifying the runtime by using the Shell does not matter,
    but it must be permanently applied after rebooting.

thanks

I would have to ask first what your purpose is? Is there a use case?

FYI, any device which is not capable of USB3 would cause the port to self-slow to USB2 (or whatever speed the device is capable of). A USB2 HUB is just one example of this.

I suppose a device tree change would do this (someone from NVIDIA would have to comment, but basically this picks the arguments passed to the driver and picks the driver), but unless there is something unusual going on, whatever you are doing sounds like it might be doing it the hard way. Knowing more about what you want to accomplish could help.

Also, don’t forget to mention which release you are using, and if this is a developer kit carrier board.

Hi,
In general, you need USB2 and USB3 pins to form a USB3 type-A port. You can disable USB3 in device tree. Take this post for example:

usb2-1 and usb3-1 are paired to be USB3 type-A port. To run USB2 only, you can set usb3-1

status = "disabled";

Hello, linuxdev.

It is simply a comparison test of USB3 and USB2 connectivity stability.

We had a problem of being disconnected occasionally when using an intel 3d camera connected to TX2.

I tried several methods, but since it is not 100% solved, I would like to use the method that I want to lower to USB2.

The problem is that we have to assemble and there is no space for the USB2 hub.
Therefore, I tried to check if there is no way to lower it to USB2 using only software.

Thanks

Hello DaneLLL,

Thank you I’ll try it.

Thanks

Hello DaneLLL,

I tested by changing the dts value as instructed. (disabled)
However, it has not changed to USB 2.0.
I am using the r28 version.
I modified “kernel-dts/quill-platforms/tegra186-quill-kernel-4.9.dtsi” and “kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts”, is that correct?

nvidia@tegra-ubuntu:~$ lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
|__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M <— …??
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M


“kernel-dts/quill-platforms/tegra186-quill-kernel-4.9.dtsi”
->
usb3-1 {
nvidia,usb2-companion = <1>;

  •                           status = "okay";
    
  •                           status = "disabled";
                      };
    

kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
->
usb3-std-A-port2 {
nvidia,lanes = “usb3-1”;
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <1>;
status = “disabled”; // ADDED
};


Thanks

Verify that the device tree changes actually made their way in. You could create a dts via:
dtc -I fs -O dts -o extracted.dts /proc/device-tree

Or you could simply browse the content in “/proc/device-tree”.

Hi,
You can check if device tree is correct or not through xxd. Please refer to the example: