Ubable to use usb3.2 Gen1on jetson thor

Hi, Nv’s experts:
I encountered some issues when use usb on jetson thor.

Hardware: Custom board

Jetson linux versoin: Jetson_Linux_R38.4_aarch64

We use VL822-QFN76 usb hub instead of RTS5420,now we encountering some problems:

  1. We plugged in different USB flash drives and found that USB 2.0(480M) and USB 3.2 Gen2(10000M) flash drives worked fine, while USB 3.2 Gen1(5000M) flash drives did not.
  2. When a USB 3.2 Gen1 flash drive is inserted, if we reboot the system, it fails to boot normally and gets stuck at the boot stage, unable to enter the kernel.

Some debug informations:

When the problem occurs,when entering lsblk, it only display /dev/sda, not /dev/sda1 and /dev/sda2,and lsusb -t can normally discover the 5000M device on the usb 3.0 bus.

The log read from the serial port is as follows:

nvidia@upai-pro03:~$ [   51.340462] scsi 0:0:0:0: Direct-Access     Generic  MassStorageClass 1538 PQ: 0 ANSI: 6
[   51.545718] sd 0:0:0:0: [sda] Media removed, stopped polling
[   51.546625] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   51.548317] scsi 0:0:0:1: Direct-Access     Generic  MassStorageClass 1538 PQ: 0 ANSI: 6
[   52.432141] sd 0:0:0:1: [sdb] 123596800 512-byte logical blocks: (63.3 GB/58.9 GiB)
[   52.433896] sd 0:0:0:1: [sdb] Write Protect is off
��INFO: END TASK:MB��:0:1: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
INFO: enter idle task.
INFO: END TASK:MB��
INFO: enter idle task.
��
nvidia@upai-pro03:~$ lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 002: Dev 002, If 0, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 002: Dev 002, If 1, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 002: Dev 002, If 2, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 002: Dev 002, If 3, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 002: Dev 002, If 4, Class=Communications, Driver=cdc_ether, 480M
    |__ Port 002: Dev 002, If 5, Class=CDC Data, Driver=cdc_ether, 480M
    |__ Port 003: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 003: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 005: Dev 005, If 0, Class=Billboard, Driver=[none], 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=tegra-xusb/4p, 20000M/x2
    |__ Port 003: Dev 003, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 002: Dev 004, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
nvidia@upai-pro03:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0          7:0    0    16M  1 loop 
sda            8:0    1     0B  0 disk 
sdb            8:16   1  58.9G  0 disk 
nvme0n1      259:0    0 465.8G  0 disk 
├─nvme0n1p1  259:1    0 463.1G  0 part /
├─nvme0n1p2  259:2    0   100M  0 part 
├─nvme0n1p3  259:3    0   768K  0 part 
├─nvme0n1p4  259:4    0   512M  0 part /boot/efi
├─nvme0n1p5  259:5    0 384.8M  0 part 
├─nvme0n1p6  259:6    0   100M  0 part 
├─nvme0n1p7  259:7    0   768K  0 part 
├─nvme0n1p8  259:8    0   512M  0 part 
├─nvme0n1p9  259:9    0 384.8M  0 part 
├─nvme0n1p10 259:10   0   400M  0 part 
└─nvme0n1p11 259:11   0   335M  0 part 
nvidia@upai-pro03:~$ ls /dev/sd*
/dev/sda  /dev/sdb
nvidia@upai-pro03:~$ [   83.530418] I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   83.530462] Buffer I/O error on dev sdb, logical block 0, async page read
[   83.739758] sd 0:0:0:1: [sdb] tag#0 device offline or changed
[   83.739815] I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   83.739844] Buffer I/O error on dev sdb, logical block 0, async page read
[   83.747288] sd 0:0:0:1: [sdb] Attached SCSI removable disk
nvidia@upai-pro03:~$ 

The log when booting from a USB drive fails is as follows:

boot_failed.log (59.2 KB)

UEFI got stuck. You need to use demuxer tool from BSP directory to dump the log from CCPLEX.

Otherwise UART will give out garbled message.

Also, you need to enable UEFI debug build so that we can see what got stuck in UEFI. Rebuild UEFI from the source code and replace + reflash with debug binary