USB not working in Jetson TX2

Hi,

We have a custom carrier board for Jetson TX2i. We are using jetpack 4.6.3. We are unable to detect USB devices on our custom carrier board. We have followed the procedures mentioned in the forum and modified pinctrl@3520000 and xusb_padctl@3520000/ports/usb2-2 vbus-2-supply from vdd_usb2_5v to battery_reg.

On doing so, we are still not able to detect usb. $lsusb gives no output.
output of grep | -i usb is:

~$ dmesg | grep -i usb
[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2372e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x235840000 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
[ 0.504790] usbcore: registered new interface driver usbfs
[ 0.504821] usbcore: registered new interface driver hub
[ 0.504877] usbcore: registered new device driver usb
[ 0.560182] vdd-usb0-5v: 5000 mV
[ 0.560459] vdd-usb1-5v: 5000 mV
[ 0.935366] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 1.075945] usbcore: registered new interface driver r8152
[ 1.075976] usbcore: registered new interface driver asix
[ 1.076006] usbcore: registered new interface driver ax88179_178a
[ 1.076030] usbcore: registered new interface driver cdc_ether
[ 1.076056] usbcore: registered new interface driver net1080
[ 1.076080] usbcore: registered new interface driver cdc_subset
[ 1.076106] usbcore: registered new interface driver zaurus
[ 1.076141] usbcore: registered new interface driver cdc_ncm
[ 1.077027] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 1.077078] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 1.079331] usbcore: registered new interface driver uas
[ 1.079368] usbcore: registered new interface driver usb-storage
[ 1.079429] usbcore: registered new interface driver usbserial
[ 1.080902] tegra-usb-cd usb_cd: otg phy is not available yet
[ 1.083426] usbcore: registered new interface driver xpad
[ 21.390679] usbcore: registered new interface driver usbhid
[ 21.390681] usbhid: USB HID core driver
[ 21.412253] usbcore: registered new interface driver snd-usb-audio
[ 21.587130] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.589238] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.592749] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.595609] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.599119] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.658310] vdd-usb0-5v: disabling
[ 21.658312] vdd-usb1-5v: disabling
[ 22.336445] tegra-usb-cd usb_cd: otg phy is not available yet
[ 22.343721] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 23.682517] tegra-usb-cd usb_cd: otg phy is not available yet
[ 23.688018] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517

I am attaching the dts file for your reference.

P3489-1000-ucm1.txt (482.3 KB)

Hi,
Please refer to guidance and do USB compliance test to validate the signal quality:
Jetson Download Center | NVIDIA Developer

Hi @DaneLLL ,

We do not have tools at the moment to perform the compliance test immediately, meanwhile we do arrange the tools, can we perform some other checks?

FYI, we have performed SI analysis on our board and found it to be okay.

Also, we have probed both pins A17 and A18 and found that both of them were low.

Some more information:

  1. we are using power monitoring IC ina3221.
  2. We are not using GPIO expander TCA9539PWR

Since we are not using GPIO expander, do we have to make changes somewhere in dts to make the USB enumerate? if so? where do we do those changes?

Hi,
It looks like USB cannot be initialized:

[    0.935366] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517

So your VBUS pin is always on? Seems like it is enabled too early before USB initialization. This design may not be good.

No, the VBUS is not always on. Please see the attached schematics. We are using TPS2001D, on which the Enable comes from A17 pin. We have probed A17 and it is low. Since A17 is low, we do not have an output from TPS2001D and hence, VDD_BUS is also low.

Also the VDD_BUS net is connected to B37 pin of Jetson TX2i SOM.

For your information, we have also disabled status of TCA9539PWR from dts now as below:

gpio@74 {
compatible = “ti,tca9539”;
status = “disabled”;
reg = <0x74>;
gpio-controller;
#gpio-cells = <0x2>;
vcc-supply = <0x26>;
linux,phandle = <0xea>;
phandle = <0xea>;

		touch-rails {
			gpio-hog;
			gpios = <0x1 0x0 0x2 0x0>;
			output-high;
			label = "touch-rail-1", "touch-rail-2";
		};
	};

	gpio@77 {
		compatible = "ti,tca9539";
		status = "disabled";
		reg = <0x77>;
		gpio-controller;
		#gpio-cells = <0x2>;
		vcc-supply = <0x26>;
		linux,phandle = <0x8d>;
		phandle = <0x8d>;

		lcd-bias-rails {
			gpio-hog;
			gpios = <0x4 0x0>;
			output-high;
			label = "lcd-bias-en-rail";
		};
	};





Hi,
If the vbus pin is a GPIO pin, it looks wrong to set to battery_reg. You should set vbus supply to the GPIO control pin

The vbus pin, in our schematics is B37, same as the reference schematics. Then should we keep the default vbus supply in dts?

I forgot to attach schematics in the previous reply, pfa the same.

please make sure if “every” of the thing that is “enabled” in your device tree is really present on your custom board.

For example, your dts enabled usb2-0~2-2 and usb3-0~3-2 in lanes.

Please refer the latest file which has more details on the USB pin mappings, it includes all the nets for the USB which we are using. Please also see the latest dts file that we are using and the summary of the changes we have made.

  • We have enabled only two USBs, similar to what we have on the carrier board.
  • We have also removed all references to tca9539
  • We have ina3321 but we are currently ignoring it and have removed all the references of the same from the dts
  • Changed vbus-2-supply = <&battery_reg> as we do not have the gpio expander in our design.

lsusb does not show us any output and dmesg output is still same as above, copying the same for your reference.

FYI: we are not using the UPHY anywhere and is used only for USB.

tegra186-quill-p3489-1000-a00-ucm1.txt (477.3 KB)

~$ dmesg | grep -i usb
[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2372e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x235840000 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
[ 0.504790] usbcore: registered new interface driver usbfs
[ 0.504821] usbcore: registered new interface driver hub
[ 0.504877] usbcore: registered new device driver usb
[ 0.560182] vdd-usb0-5v: 5000 mV
[ 0.560459] vdd-usb1-5v: 5000 mV
[ 0.935366] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 1.075945] usbcore: registered new interface driver r8152
[ 1.075976] usbcore: registered new interface driver asix
[ 1.076006] usbcore: registered new interface driver ax88179_178a
[ 1.076030] usbcore: registered new interface driver cdc_ether
[ 1.076056] usbcore: registered new interface driver net1080
[ 1.076080] usbcore: registered new interface driver cdc_subset
[ 1.076106] usbcore: registered new interface driver zaurus
[ 1.076141] usbcore: registered new interface driver cdc_ncm
[ 1.077027] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 1.077078] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 1.079331] usbcore: registered new interface driver uas
[ 1.079368] usbcore: registered new interface driver usb-storage
[ 1.079429] usbcore: registered new interface driver usbserial
[ 1.080902] tegra-usb-cd usb_cd: otg phy is not available yet
[ 1.083426] usbcore: registered new interface driver xpad
[ 21.390679] usbcore: registered new interface driver usbhid
[ 21.390681] usbhid: USB HID core driver
[ 21.412253] usbcore: registered new interface driver snd-usb-audio
[ 21.587130] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.589238] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.592749] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.595609] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.599119] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.658310] vdd-usb0-5v: disabling
[ 21.658312] vdd-usb1-5v: disabling
[ 22.336445] tegra-usb-cd usb_cd: otg phy is not available yet
[ 22.343721] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 23.682517] tegra-usb-cd usb_cd: otg phy is not available yet
[ 23.688018] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517

This is from your dts.

Are you sure you really need all the 3 lanes enabled?

Hi @WayneWWW ,

An update, PFB the latest log for dmesg with the above dts:

So the below error is because the PHY lane of USB 2 was enabled in dts? We will modify the dts and check.

dmesg | grep -i USB
[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2372e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x235840000 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
[ 0.509135] usbcore: registered new interface driver usbfs
[ 0.509167] usbcore: registered new interface driver hub
[ 0.509231] usbcore: registered new device driver usb
[ 0.564730] vdd-usb0-5v: 5000 mV
[ 0.565024] vdd-usb1-5v: 5000 mV
[ 0.941873] tegra-xusb-padctl 3520000.xusb_padctl: VBUS over-current detection enabled
[ 1.157200] usbcore: registered new interface driver r8152
[ 1.157230] usbcore: registered new interface driver asix
[ 1.157263] usbcore: registered new interface driver ax88179_178a
[ 1.157292] usbcore: registered new interface driver cdc_ether
[ 1.157318] usbcore: registered new interface driver net1080
[ 1.157347] usbcore: registered new interface driver cdc_subset
[ 1.157374] usbcore: registered new interface driver zaurus
[ 1.157409] usbcore: registered new interface driver cdc_ncm
[ 1.158308] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 1.158348] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 1.163234] tegra-xusb-padctl 3520000.xusb_padctl: no port found for USB2 lane 2
[ 1.170658] tegra-xusb 3530000.xhci: USB2 port 0 has OTG_CAP
[ 1.171800] tegra-xusb-padctl 3520000.xusb_padctl: no port found for USB2 lane 2
[ 1.179206] phy phy-usb2.2: phy init failed → -19
[ 1.184680] tegra-xusb 3530000.xhci: failed to enable PHYs: -19
[ 1.191633] usbcore: registered new interface driver uas
[ 1.191674] usbcore: registered new interface driver usb-storage
[ 1.191739] usbcore: registered new interface driver usbserial
[ 1.198854] usbcore: registered new interface driver xpad
[ 21.392114] usbcore: registered new interface driver usbhid
[ 21.392118] usbhid: USB HID core driver
[ 21.409087] usbcore: registered new interface driver snd-usb-audio
[ 21.643660] vdd-usb0-5v: disabling
[ 21.643663] vdd-usb1-5v: disabling
[ 23.728472] usb0: HOST MAC ce:5b:88:49:81:8e
[ 23.728506] usb0: MAC ce:5b:88:49:81:8f
[ 23.794702] l4tbr0: port 2(usb0) entered blocking state
[ 23.794708] l4tbr0: port 2(usb0) entered disabled state
[ 23.795036] device usb0 entered promiscuous mode
[ 23.812792] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

You have to make sure your dts only enables the thing you need on the custom board.

And if you want to disable something, make sure all of them are disabled fully.