TX2 - help w/ USB2_D

Hi, Our carrier board is using the USB configuration listed below. Our hardware design doesn’t use PCIe.

[USB3 typeA]
USB1_D (A38, A39)
USB_SS (F43, F44, C43, C44)

[USB2 MicroUSB3.0]
USB0_D (B39, B40)

[USB3 typeA]
USB2_D (B42, B43)
USB_SS (G42, G43, D42, D43)

We are using Linux tegra-l4t-r32.1 with modification to force OTG to be always host.
With that, we are able to get the first two USBs working. The last (B42,B43/G42,G43,D42,D43) does not seem to be working.

Should we be modifying the dts/software to enable these data lanes, and if so, please can you provide guidance?

Hi,
Please check
https://devtalk.nvidia.com/default/topic/1057885/jetson-tx2/usb-not-working-in-jetson-tx2-r32-2/post/5364464/#5364464

So, tried the following change but had no luck w/ the third USB (USB_SS1_RX (G42/G43), USB_SS1_TX (D42,D43) and USB2_D(B42/B43)

--- a/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
+++ b/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
@@ -72,7 +72,7 @@
        };
 
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
                phy-names = "otg-phy";
                nvidia,xusb-padctl = <&xusb_padctl>;
@@ -86,7 +86,7 @@
                nvidia,boost-cpu-freq = <1200>;
        };
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
                phy-names = "otg-phy";
        };
@@ -143,7 +143,7 @@
                ports {
                        usb2-0 {
                                status = "okay";
-                               mode = "otg";
+                               mode = "host";
                                vbus-supply = <&vdd_usb0_5v>;
                                nvidia,oc-pin = <0>;
                        };
@@ -157,6 +157,10 @@
                                nvidia,usb2-companion = <1>;
                                status = "okay";
                        };
+                       usb3-2 {
+                               nvidia,usb2-companion = <0>;
+                               status = "okay";
+                       };
                };
        };
 #endif
@@ -178,7 +182,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 {
@@ -197,13 +201,13 @@
                                nvidia,lanes = "otg-2";
                                nvidia,function = "xusb";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
-                               status = "disabled";
+                               status = "enabled";
                        };
 
                        e3325-usb3-std-A-SS {
-                               nvidia,lanes = "usb3-0";
+                               nvidia,lanes = "usb3-2";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
-                               status = "disabled";
+                               status = "enabled";
                        };
                };
        };
@@ -211,7 +215,7 @@
         pcie-controller@10003000 {
                status = "okay";
                 pci@1,0 {
-                        nvidia,num-lanes = <4>;
+                        nvidia,num-lanes = <1>;
                         nvidia,disable-clock-request;
                        status = "okay";
                 };
@@ -221,7 +225,7 @@
                 };
                 pci@3,0 {
                         nvidia,num-lanes = <1>;
-                       status = "okay";
+                       status = "disabled";
                 };
         };
 
@@ -375,8 +379,9 @@
        xhci@3530000 {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
                        <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
-                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
-               phy-names = "usb2-0", "usb2-1", "usb3-0";
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
+               phy-names = "usb2-0", "usb2-1", "usb3-0", "usb3-2";
                status = "okay";
 
        };

Do the changes make sense, and, what should we look for? Appreciate your help.

thanks!

Hi,
Do you modify ODMDATA per your USB lane mapping? Please also inspect correctness of device tree via xxd.
Below link shows usage of xxd:
https://devtalk.nvidia.com/default/topic/1058207/jetson-tx2/l4t-32-1-usb-lane-mapping/post/5366515/#5366515

Hi DaneLLL,

Yes, modified ODMDATA; is there a way to verify on the target if the ODMDATA was correct?

/sys/firmware/devicetree/base/chosen/plugin-manager/odm-data has a lot of entries, how do i get the status?

thanks,

Hi,
You can check if the lane is correct to be pcie or xusb

nvidia@nvidia-desktop:~$ ls /proc/device-tree/chosen/plugin-manager/odm-data/
android-build         enable-denver-wdt          enable-xusb-on-uphy-lane0
disable-pmic-wdt      enable-pcie-on-uphy-lane1  name
disable-sdmmc-hwcq    enable-pcie-on-uphy-lane2  no-battery
disable-tegra-wdt     enable-pcie-on-uphy-lane4  normal-flashed
enable-debug-console  enable-sata-on-uphy-lane5

Hi DaneLLL, in the listing, does it mean that lanes 1,2,4 are configured as PCIe whereas lane 0 is configured for xusb and lane 5 is SATA?

Also, in the listing does it mean lane-3 isn’t enabled?

thanks for your help!

Hi DaneLLL,

So applying the changes (R32.1), i have the USB (USB_SS_1/USB2) (G42,G43,D42,D43,B42,B43) working at 480Mbps but not at 5Gbps. There’s no PCIe usage on our carrier board so I disabled it in the dts.

The USB_SS_0/USB1 works at 5Gbps for the same Samsung USB stick.

Please can you let me know if there are changes that need to be made, or, what signals/patterns to probe or look for? Appreciate your help.

DTS changes:

Power-tree:

--- a/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
+++ b/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
@@ -106,7 +106,7 @@
        pinctrl@3520000 {
                vbus-0-supply = <&vdd_usb0_5v>;
                vbus-1-supply = <&vdd_usb1_5v>;
-               vbus-2-supply = <&vdd_usb2_5v>;
+               vbus-2-supply = <&battery_reg>;
                vbus-3-supply = <&battery_reg>;
                vddio-hsic-supply = <&battery_reg>;
                avdd_usb-supply = <&spmic_sd3>;

Mods for USB:

--- a/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
+++ b/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
@@ -72,7 +72,7 @@
        };
 
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
                phy-names = "otg-phy";
                nvidia,xusb-padctl = <&xusb_padctl>;
@@ -86,7 +86,7 @@
                nvidia,boost-cpu-freq = <1200>;
        };
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
                phy-names = "otg-phy";
        };
@@ -143,9 +143,9 @@
                ports {
                        usb2-0 {
                                status = "okay";
-                               mode = "otg";
+                               mode = "host";
                                vbus-supply = <&vdd_usb0_5v>;
-                               nvidia,oc-pin = <0>;
+                               nvidia,oc-pin = <1>;
                        };
                        usb2-1 {
                                status = "okay";
@@ -153,10 +153,20 @@
                                vbus-supply = <&vdd_usb1_5v>;
                                nvidia,oc-pin = <1>;
                        };
+                       usb2-2 {
+                               status = "okay";
+                               mode = "host";
+                               vbus-supply = <&battery_reg>;
+                               nvidia,oc-pin = <0>;
+                       };
                        usb3-0 {
                                nvidia,usb2-companion = <1>;
                                status = "okay";
                        };
+                       usb3-1 {
+                               nvidia,usb2-companion = <2>;
+                               status = "okay";
+                       };
                };
        };
 #endif
@@ -178,7 +188,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 {
@@ -192,12 +202,17 @@
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                                nvidia,oc-pin = <1>;
                        };
-
+                       usb3-std-A-port3 {
+                               nvidia,lanes = "usb3-1";
+                               nvidia,function = "xusb";
+                               nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                               status = "enabled";
+                       };
                        e3325-usb3-std-A-HS {
                                nvidia,lanes = "otg-2";
                                nvidia,function = "xusb";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
-                               status = "disabled";
+                               status = "enabled";
                        };
 
                        e3325-usb3-std-A-SS {
@@ -209,9 +224,9 @@
        };
 
         pcie-controller@10003000 {
-               status = "okay";
+               status = "disabled";
                 pci@1,0 {
-                        nvidia,num-lanes = <4>;
+                        nvidia,num-lanes = <1>;
                         nvidia,disable-clock-request;
                        status = "okay";
                 };
@@ -221,7 +236,7 @@
                 };
                 pci@3,0 {
                         nvidia,num-lanes = <1>;
-                       status = "okay";
+                       status = "disabled";
                 };
         };
 
@@ -375,8 +390,10 @@
        xhci@3530000 {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
                        <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
-                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
-               phy-names = "usb2-0", "usb2-1", "usb3-0";
+                       <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>;
+               phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-1";
                status = "okay";
 
        };

the odm data looks like:

/linuxdev@linuxdev-desktop:~$ ls /proc/device-tree/chosen/plugin-manager/odm-data/
android-build         enable-denver-wdt          enable-xusb-on-uphy-lane2
disable-pmic-wdt      enable-pcie-on-uphy-lane4  name
disable-sdmmc-hwcq    enable-sata-on-uphy-lane5  no-battery
disable-tegra-wdt     enable-xusb-on-uphy-lane0  normal-flashed
enable-debug-console  enable-xusb-on-uphy-lane1

Hi,
vbus-supply of usb2-2 may not be correct.

+                       usb2-2 {
+                               status = "okay";
+                               mode = "host";
+                               vbus-supply = <&battery_reg>;
+                               nvidia,oc-pin = <0>;
+                       };

We have seen enumeration issue when VBUS is on too early. You may configure it to a GPIO and turn it on after booting to kernel.
https://devtalk.nvidia.com/default/topic/1043644/jetson-tx2/usb1-and-installing-kernel-modules-for-lte-modem/post/5294983/#5294983

thanks, Danelll, will look into the vbus. But otherwise do the dts changes seem correct for enabling USB_SS_1/USB2-2? Appreciate your support.

Hi,
The device trees shows usb2-0 is a USB2 type A port. usb2-1 and usb3-0 is a USB3 type A port. usb2-2 and usb3-1 is a USB3 type A port.
One concern is that usb2-2 has ‘vbus-supply = <&battery_reg>;’ battery_reg should be turn on in very early bootloader and can lead to enumeration issue. Suggest re-work the vbus-supply to a GPIO and turn it on after booting to kernel.

Hi DaneLLL, reworked with GPIO and turning it on after kernel’s booted.

However, don’t see any LFP pulses on the oscilloscope for USB3-1 tx line.
USB3-0 trace shows LFP pulses for tx-line as expected.

Are there some pad settings or lane settings i need to double-check?

thanks!
Tarak

Hi,
Please double confirm you see ‘enable-xusb-on-uphy-lane1’ in odm-data. And also remove ‘nvidia,oc-pin = <0>;’ in usb2-2 and try.

Hi DaneLLL,

Thank you for your help, looked up table 34 of the tx2/tx2i System On Module DataSheet and signals USB_SS1_RX/TX+/– connect to USB 3.0 port 2 i.e. USB3_2 in the DTS instead of USB3_1.

Made sure ODMDATA was correct.

We now have all three USBs working and pasting the patches we used below.

thank you for your help!

regards,

diff --git a/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts b/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
index e1b77a5..386bf00 100644
--- a/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
+++ b/kernel-dts/tegra186-quill-p3489-1000-a00-00-base.dts
@@ -72,7 +72,7 @@
        };
 
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
                phy-names = "otg-phy";
                nvidia,xusb-padctl = <&xusb_padctl>;
@@ -86,7 +86,7 @@
                nvidia,boost-cpu-freq = <1200>;
        };
        usb_cd {
-               status = "okay";
+               status = "disabled";
                phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
                phy-names = "otg-phy";
        };
@@ -143,9 +143,9 @@
                ports {
                        usb2-0 {
                                status = "okay";
-                               mode = "otg";
+                               mode = "host";
                                vbus-supply = <&vdd_usb0_5v>;
-                               nvidia,oc-pin = <0>;
+                               nvidia,oc-pin = <1>;
                        };
                        usb2-1 {
                                status = "okay";
@@ -153,10 +153,19 @@
                                vbus-supply = <&vdd_usb1_5v>;
                                nvidia,oc-pin = <1>;
                        };
+                       usb2-2 {
+                               status = "okay";
+                               mode = "host";
+                               vbus-supply = <&battery_reg>;
+                       };
                        usb3-0 {
                                nvidia,usb2-companion = <1>;
                                status = "okay";
                        };
+                       usb3-2 {
+                               nvidia,usb2-companion = <2>;
+                               status = "okay";
+                       };
                };
        };
 #endif
@@ -178,7 +187,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 {
@@ -192,12 +201,16 @@
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                                nvidia,oc-pin = <1>;
                        };
-
+                       usb3-std-A-port3 {
+                               nvidia,lanes = "usb3-2";
+                               nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                               status = "enabled";
+                       };
                        e3325-usb3-std-A-HS {
                                nvidia,lanes = "otg-2";
                                nvidia,function = "xusb";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
-                               status = "disabled";
+                               status = "enabled";
                        };
 
                        e3325-usb3-std-A-SS {
@@ -209,9 +222,9 @@
        };
 
         pcie-controller@10003000 {
-               status = "okay";
+               status = "disabled";
                 pci@1,0 {
-                        nvidia,num-lanes = <4>;
+                        nvidia,num-lanes = <1>;
                         nvidia,disable-clock-request;
                        status = "okay";
                 };
@@ -221,7 +234,7 @@
                 };
                 pci@3,0 {
                         nvidia,num-lanes = <1>;
-                       status = "okay";
+                       status = "disabled";
                 };
         };
 
@@ -375,8 +388,10 @@
        xhci@3530000 {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
                        <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
-                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
-               phy-names = "usb2-0", "usb2-1", "usb3-0";
+                       <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
+                       <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
+               phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-2";
                status = "okay";
 
        };
diff --git a/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi b/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
index a443a02..a61926f 100644
--- a/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
+++ b/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
@@ -106,7 +106,7 @@
        pinctrl@3520000 {
                vbus-0-supply = <&vdd_usb0_5v>;
                vbus-1-supply = <&vdd_usb1_5v>;
-               vbus-2-supply = <&vdd_usb2_5v>;
+               vbus-2-supply = <&battery_reg>;
                vbus-3-supply = <&battery_reg>;
                vddio-hsic-supply = <&battery_reg>;
                avdd_usb-supply = <&spmic_sd3>;