USB Hub problem on TX2-4GB

Hi nvidia,

I have a problem about usb on my custom board of tx2-4gb.

If I plug the usb-hub into usb2-0 port(typeA interface) after the system boot up, everthing comes good: mouse, keyboard and udisk connected to the hub are all works well.
But If I plug the usb-hub into usb2-0 port before the board power on, the hub can’t work, even if I pull it out, any usb device plugging in can’t work .

The above problem only occured when the hub is plugged in, but not when the mouse and keyboard are plugged in.

The normal and error logs are:

Normal(mousepluggen in before power on):
nvidia@tztek-desktop:~$ dmesg | grep usb
[    0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnam 
[    0.430542] usb_oc_init: usb_oc gpio init
[    0.530626] usbcore: registered new interface driver usbfs
[    0.530717] usbcore: registered new interface driver hub
[    0.530855] usbcore: registered new device driver usb
[    0.837674] vdd-usb0-5v: 5000 mV 
[    0.837968] vdd-usb1-5v: 5000 mV 
[    0.841382] vdd-usb2-5v: 5000 mV 
[    4.184015] usbcore: registered new interface driver r8152
[    4.184595] usbcore: registered new interface driver asix
[    4.185078] usbcore: registered new interface driver ax88179_178a
[    4.185246] usbcore: registered new interface driver cdc_ether
[    4.185348] usbcore: registered new interface driver net1080
[    4.185423] usbcore: registered new interface driver cdc_subset
[    4.185492] usbcore: registered new interface driver zaurus
[    4.185689] usbcore: registered new interface driver cdc_ncm
[    4.205161] tegra-xusb 3530000.xhci: No USB port has OTG_CAP
[    4.207489] tegra-xusb 3530000.xhci: Direct firmware load for tegra18x_xusb_firmware failed with error -2
[    4.207495] tegra-xusb 3530000.xhci: Falling back to user helper
[    4.208069] usbcore: registered new interface driver uas
[    4.208131] usbcore: registered new interface driver usb-storage
[    4.208268] usbcore: registered new interface driver usbserial
[    4.216427] usbcore: registered new interface driver xpad
[    4.406077] usbcore: registered new interface driver usbhid
[    4.406078] usbhid: USB HID core driver
[    4.444419] usbcore: registered new interface driver snd-usb-audio
[    4.735465] vdd-usb0-5v: disabling
[    4.735467] vdd-usb1-5v: disabling
[    4.735488] vdd-usb2-5v: disabling
[   11.126219] tegra-xusb 3530000.xhci: cannot find firmware....retry after 1 second
[   12.162317] tegra-xusb 3530000.xhci: Firmware timestamp: 2018-12-26 10:30:04 UTC, Version: 55.12 release
[   12.164408] tegra-xusb 3530000.xhci: xHCI Host Controller
[   12.164430] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 1
[   12.165262] tegra-xusb 3530000.xhci: hcc params 0x0184fd25 hci version 0x100 quirks 0x00050810
[   12.165300] tegra-xusb 3530000.xhci: irq 69, io mem 0x03530000
[   12.165437] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   12.165441] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.165444] usb usb1: Product: xHCI Host Controller
[   12.165446] usb usb1: Manufacturer: Linux 4.9.140-tegra xhci-hcd
[   12.165449] usb usb1: SerialNumber: 3530000.xhci
[   12.166247] tegra-xusb 3530000.xhci: xHCI Host Controller
[   12.166254] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 2
[   12.166379] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[   12.166382] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.166385] usb usb2: Product: xHCI Host Controller
[   12.166387] usb usb2: Manufacturer: Linux 4.9.140-tegra xhci-hcd
[   12.166390] usb usb2: SerialNumber: 3530000.xhci
[   12.368220] tegra-usb-cd usb_cd: notification status (0x0, 0x6)
[   12.368222] tegra-usb-cd usb_cd: connected to DCP
[   12.372358] usb usb1: usb_suspend_both: status 0
[   13.724169] usb 1-1: new low-speed USB device number 2 using tegra-xusb
[   13.749054] usb 1-1: New USB device found, idVendor=03f0, idProduct=134a
[   13.749059] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   13.749063] usb 1-1: Product: HP USB Optical Mouse
[   13.749067] usb 1-1: Manufacturer: PixArt
[   13.751945] input: PixArt HP USB Optical Mouse as /devices/3530000.xhci/usb1/1-1/1-1:1.0/0003:03F0:134A.0001/input/input4
[   13.752152] hid-generic 0003:03F0:134A.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-3530000.xhci-1/input0
[   15.284678] tegra-xusb 3530000.xhci: Upgrade port 0 to USB3.0
[   15.284682] tegra-xusb 3530000.xhci: Upgrade port 1 to USB3.0
[   15.388419] usb usb2: usb_suspend_both: status 0
[   16.395365] usb0: HOST MAC ee:b5:38:41:d3:f2
[   16.395388] usb0: MAC ee:b5:38:41:d3:f3
[   16.423501] l4tbr0: port 2(usb0) entered blocking state
[   16.423582] l4tbr0: port 2(usb0) entered disabled state
[   16.423793] device usb0 entered promiscuous mode
[   16.435335] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready


Error(hub pluggen in before power on):
nvidia@tztek-desktop:~$ dmesg | grep usb
[    0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnam 
[    0.430552] usb_oc_init: usb_oc gpio init
[    0.530368] usbcore: registered new interface driver usbfs
[    0.530456] usbcore: registered new interface driver hub
[    0.530584] usbcore: registered new device driver usb
[    0.837284] vdd-usb0-5v: 5000 mV 
[    0.837587] vdd-usb1-5v: 5000 mV 
[    0.840578] vdd-usb2-5v: 5000 mV 
[    4.052765] usbcore: registered new interface driver r8152
[    4.052845] usbcore: registered new interface driver asix
[    4.052925] usbcore: registered new interface driver ax88179_178a
[    4.053002] usbcore: registered new interface driver cdc_ether
[    4.053080] usbcore: registered new interface driver net1080
[    4.053158] usbcore: registered new interface driver cdc_subset
[    4.053235] usbcore: registered new interface driver zaurus
[    4.053321] usbcore: registered new interface driver cdc_ncm
[    4.061750] tegra-xusb 3530000.xhci: No USB port has OTG_CAP
[    4.063715] tegra-xusb 3530000.xhci: Direct firmware load for tegra18x_xusb_firmware failed with error -2
[    4.063721] tegra-xusb 3530000.xhci: Falling back to user helper
[    4.064297] usbcore: registered new interface driver uas
[    4.064390] usbcore: registered new interface driver usb-storage
[    4.064559] usbcore: registered new interface driver usbserial
[    4.071927] usbcore: registered new interface driver xpad
[    4.985678] usbcore: registered new interface driver usbhid
[    4.991314] usbhid: USB HID core driver
[    5.106763] usbcore: registered new interface driver snd-usb-audio
[    5.360993] vdd-usb0-5v: disabling
[    5.360995] vdd-usb1-5v: disabling
[    5.361016] vdd-usb2-5v: disabling
[   10.873121] tegra-xusb 3530000.xhci: cannot find firmware....retry after 1 second
[   11.904282] tegra-xusb 3530000.xhci: Firmware timestamp: 2018-12-26 10:30:04 UTC, Version: 55.12 release
[   11.906419] tegra-xusb 3530000.xhci: xHCI Host Controller
[   11.906447] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 1
[   11.907289] tegra-xusb 3530000.xhci: hcc params 0x0184fd25 hci version 0x100 quirks 0x00050810
[   11.907330] tegra-xusb 3530000.xhci: irq 69, io mem 0x03530000
[   11.907481] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   11.907485] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.907488] usb usb1: Product: xHCI Host Controller
[   11.907491] usb usb1: Manufacturer: Linux 4.9.140-tegra xhci-hcd
[   11.907493] usb usb1: SerialNumber: 3530000.xhci
[   11.908244] tegra-xusb 3530000.xhci: xHCI Host Controller
[   11.908252] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 2
[   11.908369] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[   11.908372] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.908375] usb usb2: Product: xHCI Host Controller
[   11.908377] usb usb2: Manufacturer: Linux 4.9.140-tegra xhci-hcd
[   11.908380] usb usb2: SerialNumber: 3530000.xhci
[   12.174218] tegra-usb-cd usb_cd: notification status (0x0, 0x1)
[   12.174221] tegra-usb-cd usb_cd: connected to SDP
[   12.234109] usb 1-1: new full-speed USB device number 2 using tegra-xusb
[   12.234615] usb 1-1: Device not responding to setup address.
[   12.442516] usb 1-1: Device not responding to setup address.
[   12.650064] usb 1-1: device not accepting address 2, error -71
[   12.770083] usb 1-1: new full-speed USB device number 3 using tegra-xusb
[   12.770565] usb 1-1: Device not responding to setup address.
[   12.978555] usb 1-1: Device not responding to setup address.
[   13.186061] usb 1-1: device not accepting address 3, error -71
[   13.186155] usb usb1-port1: attempt power cycle
[   15.026512] tegra-xusb 3530000.xhci: Upgrade port 0 to USB3.0
[   15.026516] tegra-xusb 3530000.xhci: Upgrade port 1 to USB3.0
[   15.130279] usb usb2: usb_suspend_both: status 0
[   15.286330] usb usb1: usb_suspend_both: status 0
[   16.991310] usb0: HOST MAC ee:b5:38:41:d3:f2
[   16.991948] usb0: MAC ee:b5:38:41:d3:f3
[   17.017636] l4tbr0: port 2(usb0) entered blocking state
[   17.017640] l4tbr0: port 2(usb0) entered disabled state
[   17.017795] device usb0 entered promiscuous mode
[   17.023301] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   17.034096] tegra-xusb 3530000.xhci: entering ELPG
[   17.037380] tegra-xusb 3530000.xhci: entering ELPG done
[   19.002252] tegra-usb-cd usb_cd: notification status (0x1, 0xa)
[   19.002259] tegra-usb-cd usb_cd: connected to non-standard charger


Plug  out and Plug in again(after the error occurs)
[   29.670957] tegra-xusb 3530000.xhci: exiting ELPG
[   29.674825] tegra-xusb 3530000.xhci: Firmware timestamp: 2018-12-26 10:30:04 UTC, Version: 55.12 release
[   29.675916] tegra-xusb 3530000.xhci: exiting ELPG done
[   32.085597] tegra-xusb 3530000.xhci: entering ELPG
[   32.089248] tegra-xusb 3530000.xhci: entering ELPG done
[   34.193937] tegra-xusb 3530000.xhci: exiting ELPG
[   34.197638] tegra-xusb 3530000.xhci: Firmware timestamp: 2018-12-26 10:30:04 UTC, Version: 55.12 release
[   34.198768] tegra-xusb 3530000.xhci: exiting ELPG done
[   36.949597] tegra-xusb 3530000.xhci: entering ELPG
[   36.953207] tegra-xusb 3530000.xhci: entering ELPG done
[  302.342925] tegra-xusb 3530000.xhci: exiting ELPG
[  302.348552] tegra-xusb 3530000.xhci: Firmware timestamp: 2018-12-26 10:30:04 UTC, Version: 55.12 release
[  302.349946] tegra-xusb 3530000.xhci: exiting ELPG done
[  304.981631] tegra-xusb 3530000.xhci: entering ELPG
[  304.986603] tegra-xusb 3530000.xhci: entering ELPG done

I enable the usb2-0/2-1/3-2 in devicetree:

diff --git a/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3489-1000-a00-plugin-manager.dtsi b/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3489-1000-a00-plugin-manager.dtsi
index d745d00ac..e3e195275 100644
--- a/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3489-1000-a00-plugin-manager.dtsi
+++ b/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3489-1000-a00-plugin-manager.dtsi
@@ -89,8 +89,9 @@
 #if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
 				_overlay_ {
 					phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
-						<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>;
-					phy-names = "usb2-0", "usb2-1";
+						<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
+						<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
+					phy-names = "usb2-0", "usb2-1", "usb3-2";
 				};
 #else
 				_overlay_ {
@@ -100,24 +101,24 @@
 				};
 #endif
 			};
-			override@1 {
-				target = <&tegra_xusb_padctl_pinmux_default>;
-#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
-				_overlay_ {
-					ports {
-						usb3-0 {
-							status = "disabled";
-						};
-					};
-				};
-#else
-				_overlay_ {
-					usb3-std-A-port2 {
-						status = "disabled";
-					};
-				};
-#endif
-			};
+//			override@1 {
+//				target = <&tegra_xusb_padctl_pinmux_default>;
+//#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
+//				_overlay_ {
+//					ports {
+//						usb3-0 {
+//							status = "disabled";
+//						};
+//					};
+//				};
+//#else
+//				_overlay_ {
+//					usb3-std-A-port2 {
+//						status = "disabled";
+//					};
+//				};
+//#endif
+//			};
 
 			override@2 {
 				target = <&tegra_main_gpio>;
diff --git a/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-0888-a00-00-base.dts b/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-0888-a00-00-base.dts
index 0bf1d1cb0..6601a87dd 100644
--- a/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-0888-a00-00-base.dts
+++ b/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-0888-a00-00-base.dts
@@ -153,7 +153,7 @@
 		ports {
 			usb2-0 {
 				status = "okay";
-				mode = "otg";
+				mode = "host";
 				vbus-supply = <&vdd_usb0_5v>;
 				nvidia,oc-pin = <0>;
 			};
@@ -167,7 +167,7 @@
 				status = "okay";
 				mode = "host";
 				vbus-supply = <&battery_reg>;
-				nvidia,oc-pin = <1>;
+				nvidia,oc-pin = <2>;
 			};
 
 			usb3-0 {
@@ -203,7 +203,7 @@
 			usb2-micro-AB {
 				nvidia,lanes = "otg-0";
 				nvidia,function = "xusb";
-				nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
 				nvidia,oc-pin = <0>;
 			};
 			usb2-std-A-port2 {

And the oc-pins of the usb are pull up after my custom board power on.

Because there is only one usb-interface on the board, I can’t avoid the problem about usb-hub.
Thanks.

Hi,
It looks to be an issue in signal quality. Please refer to tuning and compliance testing guide and adjust signals.
http://developer.nvidia.com/embedded/dlc/tx2-series-interface-tuning-compliance-testing-guide

1 Like