USB 2.0 Functionality

Hi,

Thanks for your support. We have successfully tested OTG mode in Jetson Nano and the problem was that the SOM we were using had some problem with the Nano SOM we were using,(we are yet to diagnose the issue) which caused it to not even work in device mode. So with the current OTG changes as I have specified below, we switched the SOMs and found OTG mode to be perfectly working.

To summarise i have provided the changes performed below.

Software Changes:

diff --git a/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-extcon-p3448-0000-a00.dtsi b/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-extcon-p3448-0000-a00.dtsi
index 3f29b58..32dc259 100644
--- a/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-extcon-p3448-0000-a00.dtsi
+++ b/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-extcon-p3448-0000-a00.dtsi
@@ -18,27 +18,38 @@
                vbus_id_gpio_extcon: extcon@1 {
                        compatible = "extcon-gpio-states";
                        reg = <0x1>;
-                       extcon-gpio,name = "VBUS";
-                       extcon-gpio,cable-states = <
-                                               0x0 0x1
-                                               0x1 0x0>;
-                       gpios = <&gpio TEGRA_GPIO(CC, 4) 0>;
+                       extcon-gpio,name = "VBUS_ID";
+                       extcon-gpio,wait-for-gpio-scan = <0>;
+            extcon-gpio,cable-states = <0x3 0x0
+                                        0x0 0x2
+                                        0x1 0x2
+                                        0x2 0x1>;
+
+                       gpios = <&gpio TEGRA_GPIO(CC, 4) 0
+                     &gpio TEGRA_GPIO(S, 7) 0 >;
                        extcon-gpio,out-cable-names = <EXTCON_USB EXTCON_USB_HOST EXTCON_NONE>;
-                       wakeup-source;
+                       //wakeup-source;
                        #extcon-cells = <1>;
-                       nvidia,pmc-wakeup = <&tegra_pmc
-                               PMC_WAKE_TYPE_GPIO 54 PMC_TRIGGER_TYPE_NONE>;
+                       //nvidia,pmc-wakeup = <&tegra_pmc
+                       //      PMC_WAKE_TYPE_GPIO 54 PMC_TRIGGER_TYPE_NONE>;
                };
        };
 
        xusb@70090000 {
                extcon-cables = <&vbus_id_gpio_extcon 1>;
                extcon-cable-names = "id";
+        //phys = <&{/xusb_padctl@7009f000/pads/usb2/lanes/usb2-0}>;
+        phy-names = "usb2-0";
+        nvidia,xusb-padctl = <&xusb_padctl>;
+        status = "okay";
+
        };
 
        xudc@700d0000 {
-               extcon-cables = <&vbus_id_gpio_extcon 0>;
-               extcon-cable-names = "vbus";
+        extcon-cables = <&vbus_id_gpio_extcon 0>;
+        extcon-cable-names = "vbus";
+        #extcon-cells = <1>;
+        status = "okay";
        };
 
 };
diff --git a/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi b/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
index 6acdc55..0354eb0 100755
--- a/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
+++ b/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
@@ -62,7 +62,6 @@
                                TEGRA_GPIO(CC, 4)
                                >;
                        gpio-output-low = <
-                               TEGRA_GPIO(S, 7)
                                TEGRA_GPIO(T, 0)
                                TEGRA_GPIO(Z, 3)
                                TEGRA_GPIO(H, 0)
diff --git a/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi b/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
index 6bb1a4d..d57d338 100644
--- a/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
+++ b/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
@@ -664,7 +664,8 @@
 
                                lanes {
                                        usb2-0 {
-                                               status = "disabled";
+                                               status = "okay";
+                        nvidia,function = "xusb";
                                                #phy-cells = <0>;
                                        };
                                        usb2-1 {
@@ -752,7 +753,9 @@
 
                ports {
                        usb2-0 {
-                               status = "disabled";
+                               status = "okay";
+                mode = "otg";
+                vbus-supply = <&p3449_vdd_usb_vbus>;
                        };
                        usb2-1 {
                                status = "disabled";

Hardware Change:

wired the ID pin (pin 4 from Micro-B connector available in devkit) to the CAM0_PWDN pin and pulled the pin-up to 1.8V, so that when the OTG device is connected the pin will be pulled low. We have connected 5V to the “VDD_5V_USB” domain in the Nano devkit.

Thank you for your time.

2 Likes