How to check if multiple USB3 lanes mapping works?

I have a carrier board which has three USB 3 ports which are mapped on 3 different lanes. How can I check if it works: i.e., how can I know each USB3 port is working on different lanes?

The “tree” list from “lsusb -t” starts with the root_hub. If the root_hub is unique, then they use different controllers and are independent. If the end of the line of the tree list is “5000M”, then it is USB3. USB2 is “480M”.

Here is what I got with 2 ZED stereo cameras plugin in two USB port, how can I know they are on different lanes? The difference is the port number and device number, which doesn’t mean they are on different lanes as I think. Below I also put the output of lshw related to usb.

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=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 3, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 3, If 1, Class=Video, Driver=uvcvideo, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
nvidia@tegra-ubuntu:~$ lsusb
Bus 002 Device 003: ID 2b03:f580
Bus 002 Device 002: ID 2b03:f580
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 005: ID 04d9:a088 Holtek Semiconductor, Inc.
Bus 001 Device 004: ID 04f2:0939 Chicony Electronics Co., Ltd
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
nvidia@tegra-ubuntu:~$

*-usbhost:0
product: xHCI Host Controller
vendor: Linux 4.4.38-tegra xhci-hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 4.04
capabilities: usb-3.00
configuration: driver=hub slots=3 speed=5000Mbit/s
*-usb:0
description: Video
product: ZED
vendor: Leopard
physical id: 1
bus info: usb@2:1
version: 1.00
capabilities: usb-3.00
configuration: driver=uvcvideo maxpower=512mA speed=5000Mbit/s
*-usb:1
description: Video
product: ZED
vendor: Leopard
physical id: 2
bus info: usb@2:2
version: 1.00
capabilities: usb-3.00
configuration: driver=uvcvideo maxpower=512mA speed=5000Mbit/s
*-usbhost:1
description: Ethernet interface
product: xHCI Host Controller
vendor: Linux 4.4.38-tegra xhci-hcd
physical id: 2
bus info: usb@1
logical name: usb1
version: 4.04
serial: 02:c6:8e:08:52:33
capabilities: usb-2.00 ethernet physical
configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=tegra-xudc link=no multicast=yes slots=4 speed=480Mbit/s
*-usb:0
description: USB hub
product: USB Hub
vendor: Alcor Micro Corp.
physical id: 1
bus info: usb@1:1
version: 1.00
capabilities: usb-2.00
configuration: driver=hub maxpower=100mA slots=4 speed=480Mbit/s
*-usb:0
description: Mouse
product: USB Optical Mouse
vendor: PixArt
physical id: 2
bus info: usb@1:1.2
version: 1.00
capabilities: usb-2.00
configuration: driver=usbhid maxpower=100mA speed=2Mbit/s
*-usb:1
description: Keyboard
vendor: Holtek Semiconductor, Inc.
physical id: 4
bus info: usb@1:1.4
version: 1.13
capabilities: usb-2.00
configuration: driver=usbhid maxpower=100mA speed=2Mbit/s
*-usb:1
description: USB hub
product: USB2.0 Hub
vendor: Genesys Logic, Inc.
physical id: 3
bus info: usb@1:3
version: 85.36
capabilities: usb-2.00
configuration: driver=hub maxpower=100mA slots=4 speed=480Mbit/s

Do you mean the “lane” in table “USB 3.0, PCIe & SATA Lane Mapping Configurations” of OEM DG? That’s for the PCIe not for USB. As for USB there is no “lane” concept.

Thanks, Trumany.

This is in page 13 of “Tegra_Linux_Driver_Package_TX2_Adaptation_Guide.pdf”


USB LANE MAPPING
USB 3.0 has 4 super-speed ports. Not all can be used in the same implementation
because of lane sharing between PCIE, SATA, and XUSB. Possible combinations for USB
3.0 are shown in the tables below.


Yes, it is easy to cause confusion. USB is not like PCIe which has different lane combination, e.g. x1, x2, x4, different USB port has different lane channel.

Not sure about the concept of “lane” with USB. What we concern is how to use the USB ports. The original carrier board has 4 USB ports which is led out through a hub, so all the USB ports share a same “lane”. We want each USB port use its own “lane” to talk with TX2, this is why I have this question of “lane”.

Only one XUSB controller to control a total of six ports, please check the TRM doc in DLC.

But if use configure 3 in “USB lane mapping” will still save time if multiple USB 3 devices are connected to TX2, compared with 3 USB 3 devices are firstly connected to a hub, am I right?

Should be, but only two USB ports in config 3.

Yes, I make a mistake, it should be configs 4.

FYI, the “lsusb -t” shows both cameras are on the same USB3 root_hub. The Zed camera won’t work correctly sharing the same root_hub.

I got a new carrier board which has 3 usb 3.0 ports without a hub. Are they on the same “lane” with following output of “lsusb”:

foo:~$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
| Port 1: Dev 5, If 0, Class=Video, Driver=uvcvideo, 5000M
| Port 1: Dev 5, If 1, Class=Video, Driver=uvcvideo, 5000M
| Port 2: Dev 6, If 0, Class=Video, Driver=uvcvideo, 5000M
| Port 2: Dev 6, If 1, Class=Video, Driver=uvcvideo, 5000M
| Port 3: Dev 2, If 0, Class=Video, Driver=uvcvideo, 5000M
| Port 3: Dev 2, If 1, Class=Video, Driver=uvcvideo, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
foo:~$ lsusb
Bus 002 Device 002: ID 2b03:f580
Bus 002 Device 006: ID 2b03:f580
Bus 002 Device 005: ID 2b03:f580
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I check back the file “Tegar_Linux_Driver_Package_TX2_Adaptation_Guide.pdf” on page 11 “USB Lane Mapping”, I think the information how the lanes of USB are used should be in one of the dtb file, which one should I check? I understand all dtb file should be in “/root”, am I right? How to translate dtb into dts?

On a running system you can extract the device tree to dts format via:

dtc -I fs -O dts -o extracted.dts /proc/device-tree

I don’t know what you actually need for your case, but the “lsusb -t” indicates you have more than one device on the same root_hub (each Zed would show two video devices…I see 6, so perhaps there are three Zed cameras on that root_hub…any more than a single Zed would be a problem).

If you are flashing a new device tree the procedure changes depending on L4T release (check release with “head -n 1 /etc/nv_tegra_release”).

In file “Tegara_Linux_Driver_Package_TX2_Adaptation_Guide.pdf” on page 11 “USB Lane Mapping”:

  1. How to know which configuration (#1, #2, #3, #4) I have on the new carrier board? Is it possible to tell from “extracted.dts” you advised?
  2. I wonder my new carrier board is in configuration #2, on which 3 USB 3 ports share the same lane, am I right?
  3. We want configuration #4 that 3 USB ports use their own lane separately, is it possible?
  4. When I dream 3 lane USB mapping, I hope I can have 3 cameras work in parallel, is this possible if each USB port work on its own lane?

You are right I had three ZEDs connected to three USB 3.0 port. The L4T release is: 28.2.0 ($grep release /etc/nv_tegra_release).

I have not set up custom carriers or alternate USB configurations, so I can’t answer what is needed. The extracted dts file can confirm if the device tree you think is running is actually the one being used. Someone else will need to help with what actual device tree is required for your case.

For whoever helps with the device tree requirements I will suggest you rename “extracted.dts” to “extracted.dts.txt”, and then attach it to an existing post (hover your mouse over the upper right corner of one of your existing posts where the quote icon is…the paper clip icon will show and allow you to attach the device tree file).

FYI, unless each ZED operates on its own separate USB3 root_hub you will get failures. There are not three separate USB root HUBs, so you will probably end up needing to add a PCIe USB3 card (keep in mind that the card needs separate root HUBs, not necessarily just separate ports on a single root HUB…PCIe x1 HUBs can’t handle that, probably you’ll need a PCIe x4 card).

I cannot access the new carrier board now, but I had copy all the files in “/boot”, is it possible to get the info from the dtb files under “/boot”?

In older releases the dtb was placed in “/boot” and named via the FDT key/value pair of extlinux.conf. In any semi-recent release this is no longer possible. Any attempt to use a device tree from that location won’t work as expected because earlier boot stages are reading from a partition, editing what is read, and then passing on the edited version to the next boot stage. DTB files left here are not actually used (and could cause problems if you attempt to use a DTB file from here…YMMV on whether or not something from the DTB has issues when used here). Simply having a dtb file there won’t hurt, but naming a device tree via the FDT entry will.

You can clone the rootfs if you want, and that clone can be restored to any TX2 of the same release. Sometimes a change on rootfs which makes the system unbootable can be cloned, edited to fix from a loopback mount on the PC, and then flashed back in as a repaired rootfs. If you are interested in cloning, then see this:
[url]https://devtalk.nvidia.com/default/topic/1000105/jetson-tx2/tx2-cloning/[/url]

I got the extracted dts file from my old carrier board, but have no clue to name which USB lane mapping configuration it is. It is attached.
extracted.dts.txt (353 KB)