Xavier NX - USB Issues with custom carrier board

We have designed our own custom carrier board for Jetson Xavier NX module. There is no hub present. On board USB is directly connected to the Xavier NX module as follows.

  1. USB Type A port (USB2.0 host) pins USB1_D_P and USB1_D_N directly connected to pins 117 and 115 respectively. Refer the schematics.

  2. USB Type C connector pins USB2_D_P and USB2_D_N directly connected to pins 123 and 121 respectively. The type C connector supports both USB 2.0 and USB 3.0. Refer the schematics.

In the Linux Kernel based 5.10.104-tegra. Getting below dmesg when usb keyboard is connected to USB Type A port (USB2.0 host)

[ 587.923383] irq: IRQ270: trimming hierarchy from :pmc@c360000
[ 602.720912] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 603.085174] usb 1-2: new full-speed USB device number 2 using tegra-xusb
[ 603.213444] usb 1-2: device descriptor read/64, error -71
[ 603.449257] usb 1-2: device descriptor read/64, error -71
[ 603.685143] usb 1-2: new full-speed USB device number 3 using tegra-xusb
[ 603.813321] usb 1-2: device descriptor read/64, error -71
[ 604.049335] usb 1-2: device descriptor read/64, error -71
[ 604.157907] usb usb1-port2: attempt power cycle
[ 604.569095] usb 1-2: new full-speed USB device number 4 using tegra-xusb
[ 604.569612] usb 1-2: Device not responding to setup address.
[ 604.777617] usb 1-2: Device not responding to setup address.
[ 604.985351] usb 1-2: device not accepting address 4, error -71
[ 605.113083] usb 1-2: new full-speed USB device number 5 using tegra-xusb
[ 605.113581] usb 1-2: Device not responding to setup address.
[ 605.321575] usb 1-2: Device not responding to setup address.
[ 605.529180] usb 1-2: device not accepting address 5, error -71
[ 605.529921] usb usb1-port2: unable to enumerate USB device
[ 605.535419] tegra-xusb 3610000.xhci: entering ELPG done

I tried modifying the hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi “xusb_padctl” and “tegra_xhci” but no luck.
I have attached complete dmesg log of kernel boot.
dmesg_kernel_5.10.txt (65.0 KB)
I might be doing something wrong, kindly help me to get it right.

With Regards,
Ashwath B N

please refer to document.

https://docs.nvidia.com/jetson/archives/r35.2.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?highlight=universal%20serial%20bus#porting-the-universal-serial-bus

Also, try other usb devices as well.

Thanks for the reply. Below is the behavior at my end for the custom board.

2.USB Type C connector pins USB2_D_P and USB2_D_N directly connected to pins 123 and 121 respectively. The type C connector supports both USB 2.0 and USB 3.0. Refer the schematics.

Followed the suggested document. In the above schematics of USB type C connector, the signals usb3 tx and usb3 rx are used when in usb3 mode, but if connect to a usb2 device, usb2_d is used. That means in our design USB3 is paired with USB2-2 (i.e USB2 port 2), so in DTSI usb2 companion should be changed, it should be “nvidia,usb2-companion = <2>;”.
Modified the tegra194-p3668-common.dtsi file as above.
If I connect the USB mouse and USB keyboard (using type C converter) to type C port both are detected but giving error for DELL Keyboard (tried two different DELL keyboards) below is the kernel log.

Dell Keyboard error - kernel log
nx@ubuntu:~$ sudo dmesg
[ 1148.144576] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 1148.508829] usb 1-3: new low-speed USB device number 20 using tegra-xusb
[ 1148.665184] usb 1-3: New USB device found, idVendor=413c, idProduct=2107, bcdDevice= 1.15
[ 1148.665258] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1148.669134] usb 1-3: can’t set config #1, error -71
[ 1148.906692] usb 1-3: USB disconnect, device number 20
[ 1150.352905] usb 1-3: new low-speed USB device number 21 using tegra-xusb
[ 1150.503633] usb 1-3: device descriptor read/all, error -71
[ 1150.632823] usb 1-3: new low-speed USB device number 22 using tegra-xusb
[ 1150.789637] usb 1-3: New USB device found, idVendor=413c, idProduct=2107, bcdDevice= 1.15
[ 1150.789670] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1150.789682] usb 1-3: Product: Dell USB Entry Keyboard
[ 1150.789690] usb 1-3: Manufacturer: Dell
[ 1150.804512] input: Dell Dell USB Entry Keyboard as /devices/platform/3610000.xhci/usb1/1-3/1-3:1.0/0003:413C:2107.0006/input/input10
[ 1150.867404] hid-generic 0003:413C:2107.0006: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Entry Keyboard] on usb-3610000.xhci-3/input0
[ 1152.197894] usb 1-3: reset low-speed USB device number 22 using tegra-xusb
[ 1152.488718] usb 1-3: device firmware changed
[ 1152.489152] usb 1-3: USB disconnect, device number 22
[ 1152.684828] usb 1-3: new low-speed USB device number 23 using tegra-xusb
[ 1152.841559] usb 1-3: New USB device found, idVendor=413c, idProduct=2107, bcdDevice= 1.15
[ 1152.841652] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1152.850356] usb 1-3: can’t set config #1, error -71
[ 1153.097318] usb 1-3: USB disconnect, device number 23
[ 1153.245659] tegra-xusb 3610000.xhci: entering ELPG done
[ 1154.318295] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 1154.680863] usb 1-3: new low-speed USB device number 24 using tegra-xusb
[ 1154.838136] usb 1-3: New USB device found, idVendor=413c, idProduct=2107, bcdDevice= 1.15
[ 1154.838168] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1154.838179] usb 1-3: Product: Dell USB Entry Keyboard
[ 1154.838190] usb 1-3: Manufacturer: Dell
[ 1154.847838] usb 1-3: can’t set config #1, error -71
[ 1166.944945] usb 1-3: USB disconnect, device number 24
[ 1167.099185] tegra-xusb 3610000.xhci: entering ELPG done
[ 1168.706985] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 1168.940824] usb 1-3: new low-speed USB device number 25 using tegra-xusb
[ 1169.100961] usb 1-3: unable to read config index 0 descriptor/start: -71
[ 1169.101285] usb 1-3: can’t read configurations, error -71
[ 1169.228845] usb 1-3: new low-speed USB device number 26 using tegra-xusb
[ 1169.385616] usb 1-3: unable to read config index 0 descriptor/start: -71
[ 1169.385920] usb 1-3: can’t read configurations, error -71
[ 1169.386772] usb usb1-port3: attempt power cycle

1.USB Type A port (USB2.0 host) pins USB1_D_P and USB1_D_N directly connected to pins 117 and 115 respectively. Refer the schematics.

Connected multiple devices to the USB Type A port (USB2.0 host) none of the device got detected and still getting below errors.

[ 587.923383] irq: IRQ270: trimming hierarchy from :pmc@c360000
[ 602.720912] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 603.085174] usb 1-2: new full-speed USB device number 2 using tegra-xusb
[ 603.213444] usb 1-2: device descriptor read/64, error -71
[ 603.449257] usb 1-2: device descriptor read/64, error -71
[ 603.685143] usb 1-2: new full-speed USB device number 3 using tegra-xusb
[ 603.813321] usb 1-2: device descriptor read/64, error -71
[ 604.049335] usb 1-2: device descriptor read/64, error -71
[ 604.157907] usb usb1-port2: attempt power cycle
[ 604.569095] usb 1-2: new full-speed USB device number 4 using tegra-xusb
[ 604.569612] usb 1-2: Device not responding to setup address.
[ 604.777617] usb 1-2: Device not responding to setup address.
[ 604.985351] usb 1-2: device not accepting address 4, error -71
[ 605.113083] usb 1-2: new full-speed USB device number 5 using tegra-xusb
[ 605.113581] usb 1-2: Device not responding to setup address.
[ 605.321575] usb 1-2: Device not responding to setup address.
[ 605.529180] usb 1-2: device not accepting address 5, error -71
[ 605.529921] usb usb1-port2: unable to enumerate USB device
[ 605.535419] tegra-xusb 3610000.xhci: entering ELPG done

What is puzzling me why USB2-1 is not working, while it is direct connection between USB-A port to the pins 117 and 115 respectively?
Attaching schematics of USB A port in connection with pins 117 and 115.

It would be appreciated if you could help.

with Regards,
Ashwath B N

Hi WayneWWW,

Did you got a chance to look into the reply and any update on it.

With Regards,
Ashwath B N

What is your device tree setup right now?

Please find the attached DTSI file.
tegra194-p3668-common.dtsi (13.4 KB)

xusb_padctl: xusb_padctl@3520000 {
status = “okay”;

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

ports {
usb2-0 {
mode = “otg”;
status = “okay”;
#if TEGRA_XUSB_DT_VERSION >= DT_VERSION_3
usb-role-switch;
connector {
compatible = “usb-b-connector”, “gpio-usb-b-connector”;
label = “micro-USB”;
type = “micro”;
vbus-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
};
endif
};
usb2-1 {
mode = “host”;
status = “okay”;
};
usb2-2 {
mode = “host”;
vbus-supply = <&battery_reg>;
status = “okay”;
};
usb3-2 {
nvidia,usb2-companion = <2>;
status = “okay”;
};
};
};

tegra_xudc: xudc@3550000 {
#if TEGRA_XUSB_DT_VERSION < DT_VERSION_3
extcon-cables = <&vbus_id_extcon 0>;
extcon-cable-names = “vbus”;
#extcon-cells = <1>;
endif
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
#if TEGRA_XUSB_DT_VERSION >= DT_VERSION_3
phy-names = “usb2-0”;
else
phy-names = “usb2”;
endif
nvidia,xusb-padctl = <&xusb_padctl>;
nvidia,boost_cpu_freq = <1200>;
status = “okay”;
};

tegra_xhci: xhci@3610000 {
#if TEGRA_XUSB_DT_VERSION < DT_VERSION_3
extcon-cables = <&vbus_id_extcon 1>;
extcon-cable-names = “id”;
#extcon-cells = <1>;
endif
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
phy-names = “usb2-0”, “usb2-1”, “usb2-2”, “usb3-2”;
nvidia,xusb-padctl = <&xusb_padctl>;
status = “okay”;
};
/* Below node can be moved to cvb to make decision about enabling/disabling */
arm-pmu {
status = “okay”;
};
power-domain {
status = “okay”;
};
interrupt-controller {
status = “okay”;
};
mods-simple-bus {
status = “okay”;
};
cpuidle {
compatible = “nvidia,tegra19x-cpuidle”;
status = “okay”;
};
thermal-zones {
status = “okay”;
};
reserved-memory {
ramoops_carveout {
status = “okay”;
};
};

Please give vbus-supply to the ports also to match your hardware design.

You are talking about 2.0 (i.e. USB2-1 in my case and it is USB type A Port) right? Below is the schematics.

You mean for USB2-1 the “vbus-supply =<>” entry should be added? What it should be? I understand <&battery_reg> is dummy right.
In the schematics USB1_VBUS is drive by USB1_EN signal. The USB1_EN which is set to one after boot up with following commands
jetson@ubuntu:~$ echo 319 > /sys/class/gpio/export
jetson@ubuntu:~$ echo out > /sys/class/gpio/PCC.02/direction
jetson@ubuntu:~$ echo 1 > /sys/class/gpio/PCC.02/value

image

image

Hi,

Yes, battery_reg is a dummy one.

If your design is not a dummy one, then you need to write your own regulator and should include your gpio in that regulator.
Then, assign the regulator to the vbus-supply.

As you suggested based on our design, if required I need to add it as part of tegra194-fixed-regulator-p3668.dtsi right not as part of tegra194-fixed-regulator-p3509-0000-a00.dtsi.

I’ll check with our hardware team at my end and let you know.

As suggested added our own regulator details to the DTSI file, and it includes our gpio control information. Below is the fixed regulator info added for USB2-1 (i.e., USB A port on our custom carrier board). Added as part of tegra194-fixed-regulator-p3668.dtsi

p3668_vdd_5v0_usb2_1: usb2_1: regulator-5v0_usb2_1 {
compatible = “regulator-fixed”;
regulator-name = “vdd_5v0_usb2_1”;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tegra_aon_gpio TEGRA194_AON_GPIO(CC, 2) 0>;
enable-active-high;
};

Regulator is assigned to vbus supply as below in the tegra194-p3668-common.dtsi

usb2-1 {
mode = “host”;
vbus-supply = <&usb2_1>;
status = “okay”;
};

Now no need to run below manual commands, since it taken care by DTSI to power the vbus.

jetson@ubuntu:~$ echo 319 > /sys/class/gpio/export
jetson@ubuntu:~$ echo out > /sys/class/gpio/PCC.02/direction
jetson@ubuntu:~$ echo 1 > /sys/class/gpio/PCC.02/value

Still getting same error as earlier

nx@ubuntu:~$ sudo dmesg
[ 57.598095] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
[ 57.962163] usb 1-2: new low-speed USB device number 2 using tegra-xusb
[ 58.090299] usb 1-2: device descriptor read/64, error -71
[ 58.326228] usb 1-2: device descriptor read/64, error -71
[ 58.562096] usb 1-2: new low-speed USB device number 3 using tegra-xusb
[ 58.690268] usb 1-2: device descriptor read/64, error -71
[ 58.926240] usb 1-2: device descriptor read/64, error -71
[ 59.034708] usb usb1-port2: attempt power cycle
[ 59.446087] usb 1-2: new low-speed USB device number 4 using tegra-xusb
[ 59.447311] usb 1-2: Device not responding to setup address.
[ 59.655373] usb 1-2: Device not responding to setup address.
[ 59.862181] usb 1-2: device not accepting address 4, error -71
[ 59.990105] usb 1-2: new low-speed USB device number 5 using tegra-xusb
[ 59.991540] usb 1-2: Device not responding to setup address.
[ 60.199289] usb 1-2: Device not responding to setup address.
[ 60.410469] usb 1-2: device not accepting address 5, error -71
[ 60.411865] usb usb1-port2: unable to enumerate USB device
[ 60.426643] tegra-xusb 3610000.xhci: entering ELPG done
nx@ubuntu:~$

Then it could be SI issue. Or try other kind of usb device too.

I have tried two devices at my end USB mouse and USB mass storage both are not working. I’ll try few more devices at my end.

I have one more question regarding USB type C connector. In our custom board we have one USB type C port and type C cable can be connected either way. How to drive USB3_FLIP signal via DTSI so board can detect the device connected either way
Below is the schematics which give details about USB3_FLIP signal GPIO_02(pin 124) connected to USB3.0 MUX.

Now both USB2-1 (USB A port) and USB2-2/USB3-2 type C port working properly at our end.

  • Resolved the USB2-1 issue at our end. After having proper having DTSI changes, we were facing issue at our end. Later after discussion with HW team and proprely checking each and every component found that USB A connector D_N and D_P were wrongly repesented in the schematics compared to the actual slot.

The HW team confirmed that there is a mistake in the usb-a connector symbol.
It is not clearly explained in the datasheet of the manufacturer But pins D_P and D_N need to be swapped.
After swapping USB2-1 (USB A Port) properly works.

  • USB2-2 and USB3-2 type C port properly works with necessary changes in the DTSI file.
1 Like

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