Porting TX2 to own HW - USB0 OTG failure

Hi guys,

Trying to make the TX2’s USB0 USB 2.0 OTG work on our own circuit board is an ongoing headache. We have tried to follow the Platform Adaption and Bring-Up Guide to no avail.

Could you please enlighten us on the complete and comprihensive way to do this, not just link to disconnected forum posts and pdf documents? I know we are not the only team driven to despair over how to configure USB0 for USB 2.0 OTG.

Our hardware has USB 2.0 OTG on the USB0 port. We have verified USB functionality by flashing the module through this port. There is no other USB functionality (no USB 3.0 and no other USB ports in use.) We don’t use PCIe. We have followed the OEM Product Design Guide and grounded the unused signals PEX0_RX+/-, PEX1_RX+/-, PEX2_RX+/- and PEX_RFU_RX+/-. These signals float on the development board when no USB3.0 or PCIe device is plugged in.

The baseline dts from Nvidia works, in that the development kit turns VBUS0 high when an OTG adapter is plugged in. Our hardware remains incapable of this. We seriously consider giving up on dts configuration and spin another version of our PCB where we let the RX pins float like on the development kit.

Struggling to find overarching documentation on the subject (Platform Adaption guide including), we have unsuccessfully tried one edit at the time. Thus far we have seen that:

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-commonplatforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi: vbus-2-supply = <&battery_reg>;
ID=0 -> VBUS=5 works on dev-kit, not on our PCB

pcie0_lane2_mux { … “okay”
ID=0 -> VBUS=5 works on dev-kit, not on our PCB

pads, ports usb3 … “disabled”
ID=0 -> VBUS=5 fails on both dev-kit and our PCB

Our todo list includes:

  • Find out where the ODMDATA is defined and what string could possibly be the inverse of “enable-xusb-on-uphy-lane0”

  • Experiment further with xhci@3530000 {…

  • Bypass hardware USB 2.0 OTG in our product given the complexity of this stuff

Any help welcome. Qualified help very welcome!

Thanks,
Børge

Hi,
There are tow versions of adaptation guide:
[r28]
https://developer.nvidia.com/embedded/dlc/l4t-driver-package-tx2-adaptation-guide
[r32]
https://developer.nvidia.com/embedded/dlc/Tegra_Linux_Driver_Package_TX2_Adaptation_Guide

Please get correct verion.

For r28, please also check
https://elinux.org/Jetson/TX2_USB
For r32, please check
https://devtalk.nvidia.com/default/topic/1057885/jetson-tx2/usb-not-working-in-jetson-tx2-r32-2/post/5364464/#5364464
https://devtalk.nvidia.com/default/topic/1066610/jetson-tx2/jetson-tx2-usb-2-3-connection-/post/5402116/#5402116

Better sharing what you’ve done to your dts as a patch and your schematics. Also current boot up log.

Thanks guys!

We’ve been parsing pdfs and forum posts like there is no tomorrow. And today it works! Here is our patch. We’d appreciate your comments on whether all the changes we made are indeed needed for a system where:

  • USB0 OTG USB 2.0 is the only USB port
  • There are no PCIe ports
  • There is no USB 3.0 functionality
  • PEXn_RX+/- are all grounded

Cheers,
Børge

— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
@@ -60,7 +60,7 @@
gpios = <TEGRA_MAIN_GPIO(R, 3) 0>;
output-low;
label = “pcie-lane2-mux”;

  •   	status = "disabled";
    
  •   	status = "okay";
      };
      e3325_sdio_rst {
      	gpio-hog;
    

diff --git a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
index f604a600be56…7f2bc9a36c0e 100644
— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-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>;
    

diff --git a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
index ed560d3de52d…6c0380c48dad 100644
— a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
+++ b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
@@ -118,19 +118,14 @@
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
status = “okay”;

  •   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-1}>;
    
  •   phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-1";
    
  •   phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    
  •   phy-names = "usb2-0";
    
    };
    #else
    xhci@3530000 {
    status = “okay”;
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
    
  •   phy-names = "utmi-0", "utmi-1", "usb3-1";
    
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
    
  •   phy-names = "utmi-0";
      nvidia,boost_cpu_freq = <800>;
    
    };
    #endif
    @@ -157,11 +152,11 @@
    };
    usb2-1 {
    nvidia,function = “xusb”;
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb2-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -169,15 +164,15 @@
lanes {
usb3-0 {
nvidia,function = “xusb”;

  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-1 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -191,22 +186,24 @@
nvidia,oc-pin = <0>;
};
usb2-1 {

  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
      		vbus-supply = <&vdd_usb1_5v>;
      		nvidia,oc-pin = <1>;
      	};
      	usb2-2 {
    
  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
    
  •   		vbus-supply = <&vdd_usb2_5v>;
    
  •   		vbus-supply = <&battery_reg>;
    
  •                            nvidia,oc-pin = <1>;
      	};
      	usb3-0 {
      		nvidia,usb2-companion = <2>;
    
  •   		status = "disabled";
      	};
      	usb3-1 {
      		nvidia,usb2-companion = <1>;
    
  •   		status = "okay";
    
  •   		status = "disabled";
      	};
      };
    
    };

Thanks guys!

We’ve been parsing pdfs and forum posts like there is no tomorrow. And today it works! Here is our patch. We’d appreciate your comments on whether all the changes we made are indeed needed for a system where:

  • USB0 OTG USB 2.0 is the only USB port
  • There are no PCIe ports
  • There is no USB 3.0 functionality
  • PEXn_RX+/- are all grounded

Cheers,
Børge

— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
@@ -60,7 +60,7 @@
gpios = <TEGRA_MAIN_GPIO(R, 3) 0>;
output-low;
label = “pcie-lane2-mux”;

  •   	status = "disabled";
    
  •   	status = "okay";
      };
      e3325_sdio_rst {
      	gpio-hog;
    

diff --git a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
index f604a600be56…7f2bc9a36c0e 100644
— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-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>;
    

diff --git a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
index ed560d3de52d…6c0380c48dad 100644
— a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
+++ b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
@@ -118,19 +118,14 @@
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
status = “okay”;

  •   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-1}>;
    
  •   phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-1";
    
  •   phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    
  •   phy-names = "usb2-0";
    
    };
    #else
    xhci@3530000 {
    status = “okay”;
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
    
  •   phy-names = "utmi-0", "utmi-1", "usb3-1";
    
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
    
  •   phy-names = "utmi-0";
      nvidia,boost_cpu_freq = <800>;
    
    };
    #endif
    @@ -157,11 +152,11 @@
    };
    usb2-1 {
    nvidia,function = “xusb”;
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb2-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -169,15 +164,15 @@
lanes {
usb3-0 {
nvidia,function = “xusb”;

  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-1 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -191,22 +186,24 @@
nvidia,oc-pin = <0>;
};
usb2-1 {

  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
      		vbus-supply = <&vdd_usb1_5v>;
      		nvidia,oc-pin = <1>;
      	};
      	usb2-2 {
    
  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
    
  •   		vbus-supply = <&vdd_usb2_5v>;
    
  •   		vbus-supply = <&battery_reg>;
    
  •                            nvidia,oc-pin = <1>;
      	};
      	usb3-0 {
      		nvidia,usb2-companion = <2>;
    
  •   		status = "disabled";
      	};
      	usb3-1 {
      		nvidia,usb2-companion = <1>;
    
  •   		status = "okay";
    
  •   		status = "disabled";
      	};
      };
    
    };

Thanks guys!

We’ve been parsing pdfs and forum posts like there is no tomorrow. And today it works! Here is our patch. We’d appreciate your comments on whether all the changes we made are indeed needed for a system where:

  • USB0 OTG USB 2.0 is the only USB port
  • There are no PCIe ports
  • There is no USB 3.0 functionality
  • PEXn_RX+/- are all grounded

Cheers,
Børge

ODMDATA 0x00090000

— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi
@@ -60,7 +60,7 @@
gpios = <TEGRA_MAIN_GPIO(R, 3) 0>;
output-low;
label = “pcie-lane2-mux”;

  •   	status = "disabled";
    
  •   	status = "okay";
      };
      e3325_sdio_rst {
      	gpio-hog;
    

diff --git a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
index f604a600be56…7f2bc9a36c0e 100644
— a/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
+++ b/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-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>;
    

diff --git a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
index ed560d3de52d…6c0380c48dad 100644
— a/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
+++ b/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
@@ -118,19 +118,14 @@
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
status = “okay”;

  •   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-1}>;
    
  •   phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-1";
    
  •   phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    
  •   phy-names = "usb2-0";
    
    };
    #else
    xhci@3530000 {
    status = “okay”;
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
    
  •   	<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
    
  •   phy-names = "utmi-0", "utmi-1", "usb3-1";
    
  •   phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
    
  •   phy-names = "utmi-0";
      nvidia,boost_cpu_freq = <800>;
    
    };
    #endif
    @@ -157,11 +152,11 @@
    };
    usb2-1 {
    nvidia,function = “xusb”;
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb2-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -169,15 +164,15 @@
lanes {
usb3-0 {
nvidia,function = “xusb”;

  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-1 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      			usb3-2 {
      				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   				status = "disabled";
      			};
      		};
      	};
    

@@ -191,22 +186,24 @@
nvidia,oc-pin = <0>;
};
usb2-1 {

  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
      		vbus-supply = <&vdd_usb1_5v>;
      		nvidia,oc-pin = <1>;
      	};
      	usb2-2 {
    
  •   		status = "okay";
    
  •   		status = "disabled";
      		mode = "host";
    
  •   		vbus-supply = <&vdd_usb2_5v>;
    
  •   		vbus-supply = <&battery_reg>;
    
  •                            nvidia,oc-pin = <1>;
      	};
      	usb3-0 {
      		nvidia,usb2-companion = <2>;
    
  •   		status = "disabled";
      	};
      	usb3-1 {
      		nvidia,usb2-companion = <1>;
    
  •   		status = "okay";
    
  •   		status = "disabled";
      	};
      };
    
    };