USB2 port not working on custom X1 board

Hello, I have a problem with a custom X1 board, based on the Jetson TX1. One of the USB2 ports does not work. It has two USB2 ports and one USB3. The hub is recognized (as can be seen from lsusb below), but I have tried several devices on that port and none of them show up.

I have two boards of that same model and both present the same problem. All voltage measurements in the port have the expected values. Could it be that the DTB is wrong? Do you know what DTB properties could be causing such behavior?

I tried some changes in nvidia,portmap inside the xudc block, based on the USB lane mapping chapter of the Platform Adaptation and Bring-Up Guide for Tegra X1 from NVIDIA. But the problem persisted.

I’ve not been able to find anything relevant in dmesg messages. I’m including its output below, along with that of several other commands.

head -n 1 /etc/nv_tegra_release

# R28 (release), REVISION: 1.0, GCID: 9379712, BOARD: t210ref, EABI: aarch64, DATE: Thu Jul 20 07:45:59 UTC 2017

lsusb

Bus 002 Device 002: ID 0955:09ff NVidia Corp. 
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

lsusb -t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/5p, 480M

lsusb -vvv -d 1d6b:0002

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.04
  iManufacturer           3 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 5
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.04
S:  Manufacturer=Linux 4.4.38-tegra xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=70090000.xusb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=04.04
S:  Manufacturer=Linux 4.4.38-tegra xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=70090000.xusb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  2
P:  Vendor=0955 ProdID=09ff Rev=30.00
S:  Manufacturer=Nvidia
S:  Product=USB 10/100/1000 LAN
S:  SerialNumber=000001000000
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152

dmesg | grep usb (with some starting lines skipped)

[    0.392808] usb-vbus1: 5000 mV 
[    0.394059] en-usb-vbus2: 5000 mV 
[    0.507881] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
[    0.507995] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
[    2.915517] usbcore: registered new interface driver cdc_acm
[    2.915589] usbcore: registered new interface driver usb-storage
[    2.915689] usbcore: registered new interface driver usbserial
[    2.915728] usbcore: registered new interface driver ftdi_sio
[    2.915760] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.915798] usbcore: registered new interface driver option
[    2.915829] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.915867] usbcore: registered new interface driver pl2303
[    2.915894] usbserial: USB Serial support registered for pl2303
[    2.917070] tegra-xudc-new 700d0000.xudc: usb2 phy is not available yet
[   11.278538] usbcore: registered new interface driver uvcvideo
[   11.850798] usbcore: registered new interface driver usbhid
[   11.850801] usbhid: USB HID core driver
[   11.991204] xhci-tegra 70090000.xusb: can't get usb3-0 phy (-517)
[   11.993202] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
[   11.993236] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
[   11.994031] usb-vbus1: supplied by vdd-3v3
[   12.016726] xhci-tegra 70090000.xusb: UTMI port 0 has OTG_CAP
[   12.016729] xhci-tegra 70090000.xusb: No USB3 port has OTG_CAP
[   12.019473] xhci-tegra 70090000.xusb: Direct firmware load for tegra21x_xusb_firmware failed with error -2
[   12.019476] xhci-tegra 70090000.xusb: Falling back to user helper
[   12.085479] usb-vbus1: disabling
[   12.085483] en-usb-vbus2: disabling
[   15.297652] xhci-tegra 70090000.xusb: cannot find firmware....retry after 1 second
[   16.327067] xhci-tegra 70090000.xusb: Firmware timestamp: 2016-11-24 02:31:08 UTC, Version: 50.18 release
[   16.329104] xhci-tegra 70090000.xusb: xHCI Host Controller
[   16.329122] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 1
[   16.329944] xhci-tegra 70090000.xusb: hcc params 0x0184f525 hci version 0x100 quirks 0x00010810
[   16.329969] xhci-tegra 70090000.xusb: irq 319, io mem 0x70090000
[   16.330085] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   16.330088] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   16.330090] usb usb1: Product: xHCI Host Controller
[   16.330092] usb usb1: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[   16.330094] usb usb1: SerialNumber: 70090000.xusb
[   16.370731] xhci-tegra 70090000.xusb: xHCI Host Controller
[   16.370739] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 2
[   16.370870] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[   16.370873] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   16.370875] usb usb2: Product: xHCI Host Controller
[   16.370877] usb usb2: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[   16.370879] usb usb2: SerialNumber: 70090000.xusb
[   16.687236] usb 2-1: new SuperSpeed USB device number 2 using xhci-tegra
[   16.716440] usb 2-1: New USB device found, idVendor=0955, idProduct=09ff
[   16.732418] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[   16.742302] usb 2-1: Product: USB 10/100/1000 LAN
[   16.749631] usb 2-1: Manufacturer: Nvidia
[   16.755872] usb 2-1: SerialNumber: 000001000000
[   16.765635] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[   16.813498] usbcore: registered new interface driver r8152
[   16.814156] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[   16.814988] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[   16.821428] usbcore: registered new interface driver cdc_ether
[   16.927872] usb 2-1: reset SuperSpeed USB device number 2 using xhci-tegra

Hi,
Please check below:

Do you flash DTB correctly?
https://elinux.org/Jetson/TX2_DTB#TX1

What is your USB config per oem guide? Please list pins like B42, B43.
http://developer.nvidia.com/embedded/dlc/jetson-tx1-oem-product-design-guide

We have seen issues when VBUS is on too early. Please check your HW design of VBUS pins.
https://devtalk.nvidia.com/default/topic/1036547/jetson-tx1/usb2-b43-b42-not-working-on-tx1-with-r28-2/post/5265708/#5265708
https://devtalk.nvidia.com/default/topic/1043644/jetson-tx2/usb1-and-installing-kernel-modules-for-lte-modem/post/5294983/#5294983

Hi.
It turns out that the flashing and the hardware design were right; I applied the patch you attached in this thread for USB3 and PCI and it solved the problem:
https://devtalk.nvidia.com/default/topic/1023046/jetson-tx1/unable-to-recognize-any-devices-hooked-on-usb2-m-2-slot-/1

Thanks for the reply and the patch.