Usb lane mapping for config 4 on TX2 r28.2

Hi Sir/Madam,
We want to set config 4 our carrier board and we try it. But we could not make it.

We follow the https://elinux.org/Jetson/TX2_USB and https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code instructions to use config#4 USB lane mapping. But we could not do it. The steps are that we follow;

  1. After installation, we download the kernel source code as said in https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code. We get the sources folder that contain dts files.
  2. We set ODMDATA=0x7090000 in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/p2771-0000.conf.common
  3. We apply the instructions that are given https://devtalk.nvidia.com/default/topic/1030635/jetson-tx2/tx2-config-4-for-usb-lane-mapping/post/5243174/#5243174 We mean;
    • Apply
      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)>,
                  <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
                  <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
          phy-names = "utmi-0", "utmi-1","utmi-2", "usb3-0", "usb3-1", "usb3-2";
      	};
      
      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dtstegra186-quill-p3310-1000-c03-00-base.dts
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi</li>
      
    • Apply
      pinctrl@3520000 {
      pinmux {
              usb2-micro {
                  nvidia,lanes = "otg-0";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
              };
              usb3-micro {
                  nvidia,lanes = "usb3-0";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
              };
              usb2-1 {
                  nvidia,lanes = "otg-1";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
              };
              usb2-2 {
                  nvidia,lanes = "otg-2";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
              };
              usb3-1 {
                  nvidia,lanes = "usb3-1";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
              };
              usb3-2 {
                  nvidia,lanes = "usb3-2";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
              };
          };
      };
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      pcie-controller@10003000 {
      		status = "okay";
      		pci@1,0 {
      			nvidia,num-lanes = <1>;
      			status = "okay";
      		};
      		pci@2,0 {
      			nvidia,num-lanes = <1>;
      			status = "okay";
      		};
      		pci@3,0 {
      			nvidia,num-lanes = <1>;
      			status = "disabled";
      		};
      	};
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      usb_cd {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
          phy-names = "otg-phy";
      };
      
      xotg {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
          phy-names = "otg-usb2";
      };
       
      xudc@3550000 {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
              <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>;
          phy-names = "usb2", "usb3";
          emc-frequency = <150000000>;
      };
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      gpio@2200000 {
      		status = "okay";
      
      		sdmmc-wake-support-input {
      			status = "okay";
      		};
      
      		sdmmc-wake-support-output {
      			status = "okay";
      		};
      
      		pcie0_lane2_mux {
      			status = "disabled";
      		};
      	};
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts

    • We clean pcie-controller@10003000 and pinctrl@3520000 in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
    • We set vbus-2-supply to <&battery_reg> in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
    • We comment out "fragment-500-pcie-config", "fragment-500-xusb-config" and "fragment-500-e3325-pcie" in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
  4. Then we follow build kernel section in https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code step by step.
  5. Finally we apply all steps in flashing tegra title in https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code. We flash by sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1.

For the default installation, the result of lsusb -t as follows;

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 2: Dev 8, If 0, Class=Hub, Driver=hub/4p, 480M

After we apply the changes that we mentioned above, the result of lsusb -t on development board as follows;

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

The result of lsusb -t on our carrier board as follows;

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

We wonder about can we see the changes on tx2 development board either the changes on our designed carrier board?

What are we missing? What are we doing wrong?

Also, we attach all files that we changed.
tegra186-quill-p3310-1000-c03-00-base.dts.txt (2.87 KB)
tegra186-quill-power-tree-p3310-1000-a00-00.dtsi.txt (8.81 KB)
tegra186-quill-p3310-1000-a00-00-base.dts.txt (5.93 KB)
p2771-0000.conf.common.txt (8.34 KB)
bootlog_flashing.txt (30.5 KB)
tegra186-quill-p3310-1000-a00-plugin-manager.dtsi.txt (6.89 KB)

My apology here. There is an error in adaptation guide.

For config #3 and config #4, you need to configure the pcie lane num to 2,1,1 instead of 1,1,1. It is not straightforward as what you might think.

Except for the pcie lane num, the rest of work should be just same as what you’ve done.

The document would be updated in next release.

BTW, I think you might need to share the kernel log if you want us to debug.

Hi again,
We apply

pcie-controller@10003000 {
		status = "okay";
		pci@1,0 {
			nvidia,num-lanes = <2>;
			status = "okay";
		};
		pci@2,0 {
			nvidia,num-lanes = <1>;
			status = "okay";
		};
		pci@3,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
	};

to
/JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

  1. If it is not straightforward, how can we do it?
  2. We wonder about can we see the changes on tx2 development board either the changes on our designed carrier board?
  3. What do you mean with kernel log exactly, we cant be sure about it.

Anyway, we attach the result of the followed steps.
make_zImage.txt (138 KB)
make_dtbs.txt (7.27 KB)
make_modules.txt (61 KB)
make_modules_install.txt (5.76 KB)
apply_binaries.txt (2.39 KB)
flashing_Image_and_c03-base.txt (30.4 KB)
flashing_kernel-dtb.txt (26.3 KB)

To check the configuration on your device, dumping kernel message and check run-time device tree is necessary.

For the run-time device tree, please check below node in target device.
/proc/device-tree/

For the kernel log. You can dump it through “dmesg” command on your target device.

Hi again,
We notice in dmesg tegra186-padctl 3520000.pinctrl: invalid group “usb3-0” for function “xusb”. Therefore, we remove xusb for all usb3. And we add status=okay for all usb.
We change

pinctrl@3520000 {
pinmux {
        usb2-micro {
            nvidia,lanes = "otg-0";
            nvidia,function = "xusb";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
            status = "okay;
        };
        usb3-micro {
            nvidia,lanes = "usb3-0";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
            status = "okay;
        };
        usb2-1 {
            nvidia,lanes = "otg-1";
            nvidia,function = "xusb";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay;
        };
        usb2-2 {
            nvidia,lanes = "otg-2";
            nvidia,function = "xusb";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay;
        };
        usb3-1 {
            nvidia,lanes = "usb3-1";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay;
        };
        usb3-2 {
            nvidia,lanes = "usb3-2";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay;
        };
    };
};

to
/JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

Then we again apply all procedure that we mentioned above and flash the target device.
Also we apply the command sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree. The result is attached. We check our modification in this file and see that all change that we made.

Moreover, dmesg result is also at the attachment.
extracted_proc.dts.txt (389 KB)
dmesgNvidia.txt (62.6 KB)

If lsusb has result, it means some ports are working. Could you tell us which usb3 ports are working?

Yes lsusb -t has result on our designed carrier board.

Firstly, we have seen following when we plug in 3 usb3 storage device.

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

We expect that the numbers of bus are increased, but 3 usb3 ports are used the same bus. We didnot understand why? Any idea?

If we do not plug any device we see,

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

If we can open all 3 usb3 port succesfully, do they appear in lsusb -t, right.

After some time, by using the same devices in same ports, we have seen

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 1: Dev 11, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 3: Dev 18, If 0, Class=Mass Storage, Driver=usb-storage, 480M

We tried again,

nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 3: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M

Occasionally we need to restart the tx2 to see device is connected.
What can cause them? Why we see different result under the same conditions.

Also, dmesg we see the following. Is it normal?

[    9.032850] tegra-pcie 10003000.pcie-controller: link 1 down, retrying
[    9.034831] tegra-pcie 10003000.pcie-controller: link 1 down, ignoring
[    9.034838] tegra-pcie 10003000.pcie-controller: PCIE: no end points detected
[    9.059386] tegra-pcie 10003000.pcie-controller: PCIE: Disable power rails

Dmesg of our carrier board at at the attachment.

Moreover, we use pins;

USB1_D_N                    A39
USB1_D_P                    A38
USB3_RX1_N                  F44
USB3_RX1_P                  F43
USB3_TX1_N                  C44
USB3_TX1_P                  C43
USB_VBUS_EN1 (POWER EN PIN) A18
USB0_IO_CONN_D_N            B40
USB0_IO_CONN_D_P            B39
PEX_RX1_N                   G40
PEX_RX1_P                   G39
PEX_TX1_N                   D40
PEX_TX1_P                   D39
USB_VBUS_EN0 (POWER EN PIN) A17
USB2_D_N                    B43
USB2_D_P                    B42
PEX_RX3_N                   G43
PEX_RX3_P                   G42
PEX_TX3_N                   D43
PEX_TX3_P                   D42
USB_VBUS_EN2 (POWER EN PIN) A19

In summary,

  1. If we do not plug any device, we cant see anything that we succeed to open usb3 ports. We expect that the numbers of bus are increased. For example we hope to see 3 usb3 root bus independently. We want that read-write speed of the all devices are not affected by each other. Is it possible for our current situation that is 3 devices use the same bus?
  2. We see the same devices both as usb3 and usb2 even if they are plugged in the same ports. Why this happens?
  3. We think that something is wrong about pcie-controller according to dmseg. Are we right?
  1. You won’t see the bus to be increased. The number of bus is actually the number of usb3.0 (xhci) controller, which is only one on tegra.

  2. I doubt usb3 has enter power saving. Could you observe this behavior and also share the kernel log?

  3. That log of that pcie looks normal if you don’t connect any end device on it.

  1. This implies that we can use each device with 5000M, independently.
  2. We will observe and then we will write. We forgot to attach file former post, sorry about that. We attach now.
  3. That log is taken when 3 usb3 devices are plugged in.

dmesg_carrier_board.txt (80.7 KB)

I see there are lots of usb logs and i2c error.
Are those i2c error along with your usb devices?

[   19.295850] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   19.463967] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   19.619891] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   19.771760] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   19.944051] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   20.096020] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   20.252011] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   20.404003] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra
[   20.559867] usb 2-2: reset SuperSpeed USB device number 3 using xhci-tegra

As for the pcie error, I said it is “pcie”. Usb devices have nothing to do with it.
You have to connect “pcie” devices on it otherwise there would always be “PCIE: no end points detected”

In our custom board, we do not use ina3221x. Can this cause i2c or/and other errors?

Since we design our custom board, can we have hardware problem according to these logs?

Hi fatih.eyuboglu,

Have you clarified the cause and resolved the problem?

Thanks

Hi Sir/Madam,

We are sorry for the late reply. We had another urgent issue then we had some hardware problems our custom board. But, we are back, now. We apply changes but we have question again. We can see 3 usb3, but they are not stable. the 2 usb3 ports that are activated later, sometimes they disappear. Moreover, we have mount problem for those usb3. Sometimes we can mount, sometimes not.

Then, we try the ports with usb3 camera. Again we see sometimes detection problem. Even if camera is detected, we cant stream the camera. The kernel logs

[ 1370.863533] usb 2-2: USB disconnect, device number 25
[ 1371.125196] usb 2-2: new SuperSpeed USB device number 26 using xhci-tegra
[ 1371.161212] usb 2-2: device descriptor read/all, error -71
[ 1729.759819] usb 2-3: new SuperSpeed USB device number 28 using xhci-tegra
[ 1734.781605] usb 2-3: device descriptor read/8, error -110
[ 1734.888274] usb 2-3: new SuperSpeed USB device number 28 using xhci-tegra
[ 1734.910659] usb 2-3: device descriptor read/8, error -71
[ 1735.109021] usb usb2-port3: config error
[ 1761.236393] usb 2-3: device not accepting address 30, error -22
[ 1761.328832] usb usb2-port3: config error
[ 1769.171526] usb 2-3: new SuperSpeed USB device number 32 using xhci-tegra
[ 1769.200802] usb 2-3: New USB device found, idVendor=1e10, idProduct=4000
[ 1769.208248] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1769.215793] usb 2-3: Product: Blackfly S BFS-U3-123S6C
[ 1769.221317] usb 2-3: Manufacturer: FLIR
[ 1769.225482] usb 2-3: SerialNumber: 010C404C
[ 1819.240703] usb 2-3: USB disconnect, device number 32
[ 1340.795656] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1341.675680] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1342.555404] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1343.435357] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1343.442516] usb usb1-port1: unable to enumerate USB device
[  424.611746] usb 2-2: can't set config #1, error -71
[  425.394886] usb 2-2: USB disconnect, device number 5
[  486.907127] usb 2-2: device not accepting address 6, error -22
[ 1370.863533] usb 2-2: USB disconnect, device number 25
[ 1371.125196] usb 2-2: new SuperSpeed USB device number 26 using xhci-tegra
[ 1371.161212] usb 2-2: device descriptor read/all, error -71
[ 1729.759819] usb 2-3: new SuperSpeed USB device number 28 using xhci-tegra
[ 1734.781605] usb 2-3: device descriptor read/8, error -110
[ 1734.888274] usb 2-3: new SuperSpeed USB device number 28 using xhci-tegra
[ 1734.910659] usb 2-3: device descriptor read/8, error -71
[ 1735.109021] usb usb2-port3: config error
[ 1761.236393] usb 2-3: device not accepting address 30, error -22
[ 1761.328832] usb usb2-port3: config error

To be clear, we again write changes

  • We set ODMDATA=0x7090000 in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/p2771-0000.conf.common
  • We apply the instructions that are given
    • Apply
      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)>,
                  <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
                  <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
          phy-names = "utmi-0", "utmi-1","utmi-2", "usb3-0", "usb3-1", "usb3-2";
      	};
      
      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dtstegra186-quill-p3310-1000-c03-00-base.dts
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi</li>
      
    • Apply
      pinctrl@3520000 {
      pinmux {
              usb2-micro {
                  nvidia,lanes = "otg-0";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
                  status = "okay";
              };
              
              usb2-1 {
                  nvidia,lanes = "otg-1";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                  status = "okay";
              };
              usb2-2 {
                  nvidia,lanes = "otg-2";
                  nvidia,function = "xusb";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                  status = "okay";
              };
              usb3-0 {
                  nvidia,lanes = "usb3-0";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                  status = "okay";
              };
              usb3-1 {
                  nvidia,lanes = "usb3-1";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                  status = "okay";
              };
              usb3-2 {
                  nvidia,lanes = "usb3-2";
                  nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                  status = "okay";
              };
          };
      };
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      pcie-controller@10003000 {
      		status = "okay";
      		pci@1,0 {
      			nvidia,num-lanes = <2>;
      			status = "okay";
      		};
      		pci@2,0 {
      			nvidia,num-lanes = <1>;
      			status = "okay";
      		};
      		pci@3,0 {
      			nvidia,num-lanes = <1>;
      			status = "disabled";
      		};
      	};
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      usb_cd {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
          phy-names = "otg-phy";
      };
      
      xotg {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
          phy-names = "otg-usb2";
      };
       
      xudc@3550000 {
          status = "okay";
          phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
              <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>;
          phy-names = "usb2", "usb3";
          emc-frequency = <150000000>;
      };
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts

    • Apply
      gpio@2200000 {
      		status = "okay";
      
      		sdmmc-wake-support-input {
      			status = "okay";
      		};
      
      		sdmmc-wake-support-output {
      			status = "okay";
      		};
      
      		pcie0_lane2_mux {
      			status = "disabled";
      		};
      	};
      

      to
      /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts

    • We clean pcie-controller@10003000 and pinctrl@3520000 in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
    • We set vbus-2-supply to <&battery_reg> in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi
    • We comment out "fragment-500-pcie-config", "fragment-500-xusb-config" and "fragment-500-e3325-pcie" in /JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi
  • Then we follow build kernel section in https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code step by step.
  • Finally we apply all steps in flashing tegra title in https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_TX1/TX2_source_code. We flash by sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1.

  • What are we missing? What are we doing wrong?

    If your usb device can "sometimes"be detected, I would say your issue should be non-related with usb configuration. Could you confirm the device speed is always 5000M (lsusb) when you see your device is up?

    As you know, we are trying to get 3xusb3.0. We have problem with two of them. We will mention about them;

    Port 1;

    We measured USB_VBUS_EN0 from development board. The cases:

    1. When nothing is plugged the micro usb port, USB_VBUS_EN0 follows a sequence by high to low, low to high
    2. When usb2.0 device is plugged the usb port, USB_VBUS_EN0 stays high.

    In our custom board,

    1. When nothing is plugged the usb port, USB_VBUS_EN0 follows a sequence by high to low, low to high
    2. When usb2.0 is plugged the usb port, USB_VBUS_EN0 stays high.
    3. Since we apply the config4, when usb3.0 device is plugged the usb port, USB_VBUS_EN0 begins again to follow a sequence with high to low, low to high. We can identify usb3.0 device as long as USB_VBUS_EN0 is high but sometimes it is seen as usb2.0, sometimes usb3.0. In both case, we cant work on it.

    Our usb3.0 pin mapping for Port 1 is;

    USB0_IO_CONN_D_N            B40
    USB0_IO_CONN_D_P            B39
    PEX_RX1_N                   G40
    PEX_RX1_P                   G39
    PEX_TX1_N                   D40
    PEX_TX1_P                   D39
    USB_VBUS_EN0 (POWER EN PIN) A17
    

    Port 2 ;

    Our usb3.0 pin mapping for Port 2 is;

    USB2_D_N                    B43
    USB2_D_P                    B42
    PEX_RX3_N                   G43
    PEX_RX3_P                   G42
    PEX_TX3_N                   D43
    PEX_TX3_P                   D42
    <b>USB_VBUS_EN2 (POWER EN PIN) A19 (it is not connected - we gave 5V directly to the usb port)</b>
    

    For the usb3.0 camera, we give 5V to the camera from another supply not from the board.

    Problems for Port 1(note: as we said above that port follows a sequence high-low);

    1. If we plugged the Samsung 1TB usb3.0 SSD to port , we can identify the device, but we cant work on it.
    2. If we plugged the usb3.0 camera to port , the device is seen generally as a usb2.0. We can see it rarely as a usb3.0. When we see as a usb3.0, we can not grab images from the camera.
    3. But, if we plugged the usb3.0 camera as a usb2.0 to port, the device is working properly.

    Problems for Port 2;

    1. If we plugged the Samsung 1TB usb3.0 SSD to port , we can identify the device, we can work on it.
    2. If we plugged the usb3.0 camera to port , the device is seen generally as a usb2.0. We can see hardly as a usb3.0.
    3. But, if we plugged the usb3.0 camera as a usb2.0 to port, the device is working properly.

    Please share dmesg with below setup.

    1. Boot up with no device connected. → dmesg1
    2. Boot up with device connected to port 1 - > dmesg 2 + “lsusb”
    3. Bot up with device connected to port 2 ->dmesg 3 + “lsusb”

    Dmesg files at the attachment.

    The result of Port 1 with camera:

    nvidia@tegra-ubuntu:~$ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 1e10:4000 Point Grey Research, Inc. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    

    The result of Port 2 with camera:

    nvidia@tegra-ubuntu:~$ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 010: ID 1e10:4000 Point Grey Research, Inc. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    

    dmesgPort2WithCamera.txt (81.3 KB)
    dmesgNoDeviceConnected.txt (66.9 KB)
    dmesgPort1WithCamera.txt (76.8 KB)

    Hi,

    Could you share the full dts with us?

    The dts files that are changed by us at the attachment.
    tegra186-quill-p3310-1000-c03-00-base.dts.txt (2.87 KB)
    tegra186-quill-p3310-1000-a00-plugin-manager.dtsi.txt (6.89 KB)
    tegra186-quill-power-tree-p3310-1000-a00-00.dtsi.txt (8.81 KB)
    tegra186-quill-p3310-1000-a00-00-base.dts.txt (5.98 KB)
    p2771-0000.conf.common.txt (8.34 KB)

    Hi WayneWWW,

    Can you detect the problem? Are the dts files correct?