USB2 (USB2_D_N) problem

Hi,

I am struggling to get USB working via the “USB2_D_N/USB2_D_P” pins. This is a custom board. The pins are directly connected to a USB connector. I have connected a USB flash drive to it and powered it via 5V. In the device tree, the usb2-2 node is set to mode=otg. To switch to host mode I enter:

echo host | sudo tee /sys/devices/platform/bus@0/3520000.padctl/usb2-2/usb_role/usb2-2-role-switch/role

Nothing happens… Any idea why?

Thanks!


Jetpack 6.1
Orin NX 16GB

Hi,
Is it a USB2 type-A port? If yes, it is designed to be host mode only and please set to host mode in device tree.

Yes, it is just type-A, pins 121 and 123 directly connected.

image

I assume this USB corresponds to usb2-2?

USB2-0 (recovery) works as expected in OTG mode as device:

Nothing happens when I connect the USB drive. It is 100% powered and connected properly.

Hi,
Please make sure you have:

		pads {
			usb2 {
				lanes {
					usb2-2 {
						nvidia,function = "xusb";
						status = "okay";
					};

......

And usb2-2 is in tegra_xhci, not in tegra_udc.

If yes, device tree looks good. Please then do compliance test.

I have got:

and

(This is with usb3 switched on)

Again, USB0 (recovery) works wellm but USB2 seems dead. No dmesg when I plug in a device.

Hi,
The device tree looks fine. Please do compliance test to check the signal quality.

Hi all,

thanks for confirming. It must be signal integrity or a shot Jetson module.

Thanks for your quick help.

Hi,

Actually, I met the same problem. My usb2-0 also is set to OTG mode, but it is type-C port. And nothing happen when it connected to another PC. Do you think it is a hardware issue about the custom board? But it is so confusing that it works when recovery mode?

Thanks.

usb2-0 (recovery USB) works well in both forced recovery and also in Linux. You need the usb0 g_ether for the ssh in initrd anyways to flash the “external” NVME. Otherwise I think there is no way of flashing via recovery.

This is off-topic and you probably need to open another thread (or you get told off here :p). If it does not work for you, it will be a ID switch problem that switches from device to host. This only applies to usb2-0, not usb2-2.

1 Like

Thanks for your reply. My usb2-0 works well when flashing. But I also want to use it as an connector to communicate with PC. And it maybe a ID switch problem, I have no ides whether it is a dtb issue or a hardware issue. Maybe it is kind of off-topic, I will open a new issue. Thanks again.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.