Tx1 usb2 port0 with usb3 port 1 as USB3.0 type A host port

Hi,

I have custom board, I am using usb2 port0 and usb3 port1(PEX5) as usb3.0 type A host port.
The original device tree has usb2 port0 as otg so otg drivers takes care of it.
In my case since I want usb2 port0 with usb3 port1 as host port, I have commented otg and udc node in dts file and also in one of the power tree file where it enables usb_vbus, I have disabled it and added as part of xusb node in power tree,

1. Is my approach correct?

Following are the changes i did in these files

diff --git a/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts b/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
index 28d7aef..7ceda27 100644
--- a/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
+++ b/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
@@ -467,7 +467,7 @@
                };
        };
 
-       udc@7d000000 {
+       /*udc@7d000000 {
                nvidia,port-otg;
                nvidia,charging-supported;
                #extcon-cells = <1>;
@@ -477,10 +477,10 @@
         otg@7d000000 {
                #extcon-cells = <1>;
                status = "okay";
-       };
+       };*/
 
        xusb_pad_ctl: xusb_padctl { /* Put common control config here */
-               nvidia,ss_portmap = <0x21>;
+               nvidia,ss_portmap = <0x7701>;
                nvidia,lane_owner = <0xff56>; /* Use 0xF to disable lane assign */
                nvidia,lane-map = <0x14>;
                nvidia,enable-sata-port;
@@ -492,7 +492,7 @@
                /* nvidia,gpio_controls_muxed_ss_lanes; */
                nvidia,gpio_ss1_sata = <0>;
                nvidia,ulpicap = <0>; /* No ulpi support. can we remove */
-               nvidia,portmap = <0x0e03>;
+               nvidia,portmap = <0x0f03>; 
                nvidia,common_padctl = <&xusb_pad_ctl>;
                status = "okay";
        };
diff --git a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-
index 4ee3e3f..892094d 100644
--- a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi
+++ b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi
@@ -329,6 +329,7 @@
                        gpio = <&tca9539_77 10 1>;
                        enable-active-high;
                };
+
        };
 
        host1x {
@@ -353,11 +354,12 @@
                vdd-fan-supply = <&vdd_fan>;
        };
 
-       otg@7d000000 {
+/*     otg@7d000000 {
                usb_vbus-supply = <&usb_vbus1>;
-       };
+       };*/
 
        xusb@70090000 {
+               usb_vbus-supply = <&usb_vbus1>;
                usb_vbus1-supply = <&en_vdd_eth_5v0>;
                usb_vbus2-supply = <&en_usb_vbus2>;
        };

I have also modified the lane_map for xusb and ss_portmap accordingly, as can be seen in above changes

  1. Are my changes to lane_map and ss_portmap are correct according to configuration i have on custom board?

  2. I have issues since with above changes USB3.0 port is not working in host mode, what other changes might be required to make usb2 port 0 as host mode or unbind otg driver from usb2 port0 ?

Thanks,
Prathamesh

Hi patyarahate,
Have you checked oen design guide and adaptation guide?
http://developer.nvidia.com/embedded/dlc/jetson-tx1-oem-product-design-guide

Which is your config #?

Hi Dane,

I have checked the guides,
My Config # is Config#1 or default config.
So what i want is basically, (usb2 port0 + usb3 port1) to work as USB3.0 host port.

Thanks,
Prathamesh

Hi patyarahate,
Looks like you are on r24.2.1. Please follow adaptation guide to configure nvidia,portmap and nvidia,ss_portmap accordingly.