Third USB on custom board not working with JetPack 4.2

On our custom carrier board we have added a third USB port. With JetPack 3.3/L4T 28.2.1 if I patch the devicetree as mentioned on https://elinux.org/Jetson/TX2_USB and the linked forum post then the third USB works. When I upgrade to JetPack 4.2/L4T 32.1 and apply the patch the third usb does not work.

The patch is:

pinctrl@3520000 {
     - vbus-2-supply = <&vdd_usb2_5v>;
     + vbus-2-supply = <&battery_reg>; 
  };

Any ideas?

Hi,
USB lane mapping is different on r32.1. We are working on the document. Will update.

Hi @DaneLLL - I also have this issue and it’s currently blocking our development under JetPack 4.2. Do you have an estimate on when the documents will be ready? Thanks

I’m also having issues with the 3rd USB lane when using JP 4.2… waiting for the pending document on this one…

Not too sure if this is related, but why does the plugin-manager get disabled on boot (c-boot appear to set the status to disabled). Just wondering if this is contributing to the issue

[0005.561] I> Disable plugin-manager status in FDT

EDIT::: Note, Rebuilding c-boot from source has fixed the disabling of plugin-manager (not too sure why the SDKManager includes a different c-boot?)… Unfortunately, this does not fix the 3rd USB (usb-2-2) issue

Thanks

Hi all,

I managed to get this working.

It seems like the new L4T sets the vbus-supply within the xusb_padctl@3520000 node as well as the power tree?

I’ve rolled my changes into the patch below

Index: hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
<+>UTF-8
===================================================================
--- hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts	(date 1552067277000)
+++ hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts	(date 1555438723000)
@@ -131,8 +131,9 @@
         xhci@3530000 {
 		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_UTMI_P(2)>,
 			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>;
-		phy-names = "utmi-0", "utmi-1", "usb3-0";
+		phy-names = "utmi-0", "utmi-1",  "utmi-2", "usb3-0";
 	};
 
 	pinctrl@3520000 {
Index: hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
<+>UTF-8
===================================================================
--- hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts	(date 1552067277000)
+++ hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts	(date 1555438771000)
@@ -120,22 +120,24 @@
 		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", "usb3-1";
+		phy-names = "usb2-0", "usb2-1",  "usb2-2", "usb3-1";
 	};
 #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_UTMI_P(2)>,
 			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
-		phy-names = "utmi-0", "utmi-1", "usb3-1";
+		phy-names = "utmi-0", "utmi-1", "utmi-2", "usb3-1";
 		nvidia,boost_cpu_freq = <800>;
 	};
 #endif
 
 #if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
-	xusb_padctl@3520000 {
+xusb_padctl@3520000	 {
 		status = "okay";
 		pinctrl-0 = <&vbus_en0_default_state>;
 		pinctrl-1 = <&vbus_en1_default_state>;
@@ -195,6 +197,12 @@
 				vbus-supply = <&vdd_usb1_5v>;
 				nvidia,oc-pin = <1>;
 			};
+			usb2-2 {
+				status = "okay";
+				mode = "host";
+				vbus-supply = <&battery_reg>;
+				nvidia,oc-pin = <1>;
+			};
 			usb3-1 {
 				nvidia,usb2-companion = <1>;
 				status = "okay";
@@ -239,7 +247,7 @@
 				nvidia,lanes = "otg-2";
 				nvidia,function = "xusb";
 				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
-				status = "disabled";
+				status = "okay";
 			};
 
 			e3325-usb3-std-A-SS {
Index: hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
<+>UTF-8
===================================================================
--- hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi	(date 1552067056000)
+++ hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi	(date 1555438825000)
@@ -214,8 +214,9 @@
 				_overlay_ {
 					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-0}>;
-					phy-names = "usb2-0", "usb2-1", "usb3-0";
+					phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0";
 				};
 #else
 				_overlay_ {
Index: hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
<+>UTF-8
===================================================================
--- hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi	(date 1552067056000)
+++ hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi	(date 1555419663000)
@@ -106,8 +106,8 @@
 	pinctrl@3520000 {
 		vbus-0-supply = <&vdd_usb0_5v>;
 		vbus-1-supply = <&vdd_usb1_5v>;
-		vbus-2-supply = <&vdd_usb2_5v>;
-		vbus-3-supply = <&battery_reg>;
+		vbus-2-supply = <&battery_reg>;
+		vbus-3-supply = <&vdd_usb2_5v>;
 		vddio-hsic-supply = <&battery_reg>;
 		avdd_usb-supply = <&spmic_sd3>;
 		vclamp_usb-supply = <&spmic_sd2>;

Awesome! I’ll give it try. Thanks!

Thank you very much, I was getting mad and saw your post. That works like a charm!

I ran into a problem that I thought was the same as above. I’m sharing it here to hopefully save developers some trouble.

If plugin-manager is disabled on R32.1 the USB3 port will not work. It will look very much like the problem in this post but the patches above will not fix the problem. I’m not sure if it affects the other USB ports on the Tx2 but it likely does.

We were facing same issue when work on custom board. After apply #4 patch able to communicate using USB.

We are using USB 2.0 as gadgetFS device(OTG) mode in Jetson TX2(Jetpack 4.2.1) and communicate with Windows Host PC using with libUSB driver. In our application, we transfer separately a .bmp image and JSON string in bytes on one of endpoint generated using tegra-xudc node.

After number of successful transmission of Image and Text files, one of Image or Text data is not received on Windows Host PC but on Linux application we can see number of write byte as return value of write system call function and because of that application gone into halt state.

At initialisation with help of open system call create a FD for write endpoint and and that FD is use in write system call function to transfer bytes of array to Windows Host PC.

Can anyone know, what issue is this? Any debug step is there other then USB Analyzer(usbmon - is not able to capture data of USB device mode). Or is there any USB endpoint flush technique?

Hi pranay.joshi,
This topic is about device tree of USB lane mapping. Your issue looks different. Suggest you start a new topic.

I update my version to Jetpack4.3. I reference the path to modify my dts files,the OTG port work well,but why my USB3.0 cannot work?

Hi,

Some valid examples in the posts:
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
For more detail of device tree programming, suggest you look at adaptation guide.

Hi
I have usb2-2 enable problem on R32.1.which document can help me?

Hi @suchb
Please look at adaptation guide:


and the valid examples.