USB problem on custom board with R32.1

Hi,

On my custom board, I wanted to enable the usb2-0(micro-usb) & usb3-1. With the L4T-R32.1, the usb2-0 worked. But if I modified the device-tree as https://devtalk.nvidia.com/default/topic/1049988/jetson-tx2/third-usb-on-custom-board-not-working-with-jetpack-4-2/post/5330117/#5330117:

--- a/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
+++ b/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
@@ -106,7 +106,8 @@
        pinctrl@3520000 {
                vbus-0-supply = <&vdd_usb0_5v>;
                vbus-1-supply = <&vdd_usb1_5v>;
-               vbus-2-supply = <&vdd_usb2_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>;



--- a/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
+++ b/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
@@ -263,8 +263,11 @@
 #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/usb2/lanes/usb2-2}>,
+                                               <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
+                                               <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>,
+                                               <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
+                                       phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-1", "usb3-2
                                };
 #else
                                _overlay_ {
@@ -279,7 +282,7 @@
                                target = <&tegra_xusb_padctl_pinmux_default>;
                                _overlay_ {
                                        usb3-std-A-port2 {
-                                               status = "disabled";
+                                               status = "okay";
                                        };
                                };
                        };




--- a/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
+++ b/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
 #if TEGRA_BOOTARGUMENT_VERSION >= DT_VERSION_2
@@ -196,10 +219,25 @@
                                vbus-supply = <&vdd_usb1_5v>;
                                nvidia,oc-pin = <1>;
                        };
+                       usb2-2 {
+                               status = "okay";
+                               mode = "host";
+                               vbus-supply = <&battery_reg>;
+                               nvidia,oc-pin = <2>;
+                       };
+
+                       usb3-0 {
+                               nvidia,usb2-companion = <0>;
+                               status = "okay";
+                       };
                        usb3-1 {
                                nvidia,usb2-companion = <1>;
                                status = "okay";
                        };
+                       usb3-2 {
+                               nvidia,usb2-companion = <2>;
+                               status = "okay";
+                       };
                };
        };
 #endif
@@ -230,10 +268,17 @@
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                                nvidia,oc-pin = <1>;
                        };
+                       usb3-std-A-port1 {
+                               nvidia,lanes = "usb3-0";
+                               nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                               nvidia,oc-pin = <0>;
+                               status = "okay";
+                       };
                        usb3-std-A-port2 {
                                nvidia,lanes = "usb3-1";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                                nvidia,oc-pin = <1>;
+                               status = "okay";
                        };
 
                        e3325-usb3-std-A-HS {
@@ -244,7 +289,7 @@
                        };
 
                        e3325-usb3-std-A-SS {
-                               nvidia,lanes = "usb3-0";
+                               nvidia,lanes = "usb3-2";
                                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                                status = "disabled";
                        };



--- a/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
+++ b/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
@@ -138,12 +138,12 @@
        pinctrl@3520000 {
                pinmux {
                        usb3-std-A-port2 {
-                               nvidia,lanes = "usb3-0";
+                               nvidia,lanes = "usb3-1";
                        };
                };
        };
The usb3-1 didn't work, and the usb2-0 didn't work either. If I removed “usb3-1” as:
--- a/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
+++ b/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
@@ -263,8 +263,11 @@
 #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/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
                                };

The usb2-0 would be fine.

Any ideas? Thanks in advance!

Hi,
Please check adaptation guide for device tree programming in detail:
https://developer.nvidia.com/embedded/dlc/Tegra_Linux_Driver_Package_TX2_Adaptation_Guide

Also some other examples:
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

“pinctrl@3520000” is deprecated after rel-32. You don’t need to modify this part for any usb configuration. xusb_padctl@3520000 has replaced it.