USB3.0 Ports Only Recognizing USB2.0 Devices After Upgrading from JetPack 6.0 DP to 6.2.1 on Jetson AGX Orin

jp6dp-usb-pcie.txt (4.4 KB)
我使用的Jetson AGX Orin module and custom board,附件是我在JP6.0DP版本中使用的patch,lsusb的结果如下:

# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M.   //usb3.0 storage 
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 480M    //usb2.0 storage
        |__ Port 2: Dev 7, If 3, Class=Human Interface Device, Driver=usbhid, 12M.  //usb1.1 headphone 
        |__ Port 2: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 7, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 5, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 5, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 5, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M

但是同样的修改我应用到JP6.2.1时,结果为


# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/2p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 1: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 4, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 4, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 4, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
        |__ Port 3: Dev 4, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M

dmesg中usb相关信息为


# dmesg | grep -i usb
[    0.000000] Kernel command line: usbcore.autosuspend=-1 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 video=efifb:off console=tty0 bl_prof_dataptr=2031616@0x82C610000 bl_prof_ro_ptr=65536@0x82C600000
[    0.144469] usbcore: registered new interface driver usbfs
[    0.144497] usbcore: registered new interface driver hub
[    0.144515] usbcore: registered new device driver usb
[    0.266176] hso: drivers/net/usb/hso.c: Option Wireless
[    0.266259] usbcore: registered new interface driver hso
[    0.267937] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.268192] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.268761] usbcore: registered new interface driver cdc_wdm
[    0.268792] usbcore: registered new interface driver usb-storage
[    1.677450] usbcore: registered new interface driver usbhid
[    1.677457] usbhid: USB HID core driver
[    1.743908] usbcore: registered new interface driver snd-usb-audio
[    1.913241] usb-conn-gpio 3520000.padctl:ports:usb2-0:connector: failed to get gpios
[    1.913662] tegra-xusb 3610000.usb: Adding to iommu group 3
[    1.928238] tegra-xusb 3610000.usb: Firmware timestamp: 2023-02-10 03:48:10 UTC
[    1.928245] tegra-xusb 3610000.usb: xHCI Host Controller
[    1.928255] tegra-xusb 3610000.usb: new USB bus registered, assigned bus number 1
[    1.928987] tegra-xusb 3610000.usb: hcc params 0x0180ff05 hci version 0x120 quirks 0x0000000000010810
[    1.929006] tegra-xusb 3610000.usb: irq 127, io mem 0x03610000
[    1.929112] tegra-xusb 3610000.usb: xHCI Host Controller
[    1.929115] tegra-xusb 3610000.usb: new USB bus registered, assigned bus number 2
[    1.929118] tegra-xusb 3610000.usb: Host supports USB 3.1 Enhanced SuperSpeed
[    1.929526] hub 1-0:1.0: USB hub found
[    1.929776] hub 2-0:1.0: USB hub found
[    2.264283] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    2.417834] hub 1-2:1.0: USB hub found
[    2.548282] usb 1-4: new high-speed USB device number 3 using tegra-xusb
[    2.705697] hub 1-4:1.0: USB hub found
[    2.996449] usb 1-4.3: new full-speed USB device number 4 using tegra-xusb
[    3.180279] usb 1-2.1: new full-speed USB device number 5 using tegra-xusb
[    3.297516] input: HS6209 2.4G HyeKu Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.1/1-2.1:1.0/0003:276D:1101.0001/input/input1
[    3.357025] hid-generic 0003:276D:1101.0001: input,hidraw0: USB HID v1.10 Keyboard [HS6209 2.4G HyeKu Receiver] on usb-3610000.usb-2.1/input0
[    3.363146] input: HS6209 2.4G HyeKu Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.1/1-2.1:1.1/0003:276D:1101.0002/input/input2
[    3.363377] input: HS6209 2.4G HyeKu Receiver Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.1/1-2.1:1.1/0003:276D:1101.0002/input/input3
[    3.363706] input: HS6209 2.4G HyeKu Receiver Consumer Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.1/1-2.1:1.1/0003:276D:1101.0002/input/input4
[    3.420508] input: HS6209 2.4G HyeKu Receiver System Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.1/1-2.1:1.1/0003:276D:1101.0002/input/input5
[    3.421137] hid-generic 0003:276D:1101.0002: input,hidraw1: USB HID v1.10 Mouse [HS6209 2.4G HyeKu Receiver] on usb-3610000.usb-2.1/input1
[    7.857260] tegra-xudc 3550000.usb: Adding to iommu group 51
[    8.136703] usbcore: registered new interface driver cp210x
[    8.138382] usbserial: USB Serial support registered for cp210x
[    8.160158] usb 1-4.3: cp210x converter now attached to ttyUSB0
[    8.170746] usb 1-4.3: cp210x converter now attached to ttyUSB1
[    8.184493] usb 1-4.3: cp210x converter now attached to ttyUSB2
[    8.189235] usb 1-4.3: cp210x converter now attached to ttyUSB3
[   11.287722] usb0: HOST MAC 76:87:71:7a:2d:1c
[   11.287731] usb0: MAC 76:87:71:7a:2d:1d
[   11.287995] usb1: HOST MAC 76:87:71:7a:2d:1e
[   11.287997] usb1: MAC 76:87:71:7a:2d:1f
[   11.289349] tegra-xudc 3550000.usb: EP 0 (type: ctrl, dir: out) enabled
[   11.293380] l4tbr0: port 1(usb0) entered blocking state
[   11.293398] l4tbr0: port 1(usb0) entered disabled state
[   11.293615] device usb0 entered promiscuous mode
[   11.300758] l4tbr0: port 2(usb1) entered blocking state
[   11.300777] l4tbr0: port 2(usb1) entered disabled state
[   11.301648] device usb1 entered promiscuous mode
[   13.404302] usb 1-1: new high-speed USB device number 6 using tegra-xusb
[   13.558157] hub 1-1:1.0: USB hub found
[ 1537.338526] usb 1-1.2: new high-speed USB device number 7 using tegra-xusb
[ 1537.418699] usb 1-1.2: Device not responding to setup address.
[ 1537.626703] usb 1-1.2: Device not responding to setup address.
[ 1537.834807] usb 1-1.2: device not accepting address 7, error -71
[ 1540.154470] usb 1-2.2: new high-speed USB device number 9 using tegra-xusb
[ 1540.264681] usb-storage 1-2.2:1.0: USB Mass Storage device detected
[ 1540.266690] scsi host0: usb-storage 1-2.2:1.0
[ 1569.113939] usb 1-2.2: USB disconnect, device number 9

结果是两个USB3.0端口,现在只识别USB2.0,请帮忙分析原因。

  1. please attach the final dts that is converted back from dtb too.

  2. please attach the schematic of the whole usb design for us to review.

usb.zip (1.5 MB)
jp5.dts是适配JP5.1.2的版本,在这个版本USB是工作正常的

在Jetpack6的dts文件中,padctl@352000节点没有prod-setting字段,这正常吗,是USB3.0没成功初始化的原因吗

在Jetpack5的dts中,节点为xusb_padctl@3520000,我在Jetpack6中是不是配置错了

Your ppt file seems having password that I am not able to open it.

Hi, WayneWWW,
USB_CONN.pdf (1.3 MB)
我转化为PDF上传了

1 Like

Jetpack5.1.2版本中并没有对USB部分做专门配置,JP6中按照 jp6dp-usb-pcie.txt中的patch进行了修改,请帮忙看看问题原因

能否請你把現在所有使用的usb2+usb3 port的對應列出來 然後指出是哪一個port有問題?

這個diagram看來還有自己重新手寫的內容. 我想你可能直接重新列出來一遍比較清楚.


图中,绿色的这一组

				usb2-0 {
					status = "okay";
					vbus-supply = <0xf9>;
					mode = "otg";
					usb-role-switch;

					connector {
						compatible = "usb-b-connector\0gpio-usb-b-connector";
						label = "micro-USB";
						type = "micro";
						power-role = "host";
					};
				};

請教一下為什麼usb2-0在diagram上面看起來是host mode only但你要設定成otg?

				usb3-1 {
					status = "okay";
					nvidia,usb2-companion = <0x00>;
				};

然後usb3-1在上圖沒有接出來為什麼usb3-1在device tree是enabled?

我是参考JP5.1.2的dts修改的,我把JP6的dts发出来,请帮忙看看还有没有其他需要修改的,多谢
tegra234-p3737-0000+p3701-0000.dts.txt (9.1 KB)

還是請你直接先讀文件吧

許多明顯的錯誤我上面都講了

不太清楚你一直提Jetpack5的意義是什麼. 我看了一下Jetpack5的DT也是蠻多錯的

因为在JP5的dts情况下,设备的USB端口功能是正常的,所有我想根据dts移植过来。但是两个版本的Jetpack有区别,例如JP5用的xusb_padctl@3520000,而JP6同时存在padctl@3520000和xusb_padctl@3520000,看文档应该是用的前者。
我目前的怀疑方向是ports的映射是不是有问题,能给出一个调试思路吗

  1. rel-36是使用padctl@3520000

  2. 我目前的怀疑方向是ports的映射是不是有问题,能给出一个调试思路吗

rel-36跟rel-35的mapping是完全一樣的. usb2-x/usb3-x對應到的硬體在3520000底下是沒有改變的.
在我看來真的問題在你貼的diagram跟你給出來的device tree沒有搭上.

比方說好了,
圖上畫出usb3-0跟usb2-0看起來是同一組.

但不論是你jp5還是jp6的DT都把usb3-1跟usb2-0設成同一組.

				usb3-1 {
					status = "okay";
					nvidia,usb2-companion = <0x00>;
				};

所以diagram到底有沒有錯請你先自己確認

OK,我按照你的建议来check。
我还有个问题请教,在我编译出来的dts中,padctl@3520000和xusb_padctl@3520000都存在,地址是一样的,这样会有冲突吗

不會. xusb_padctl@3520000的內容會被無視.

真的有疑慮你可以把它拿掉