Can not find my usb device on some custom board

i am use our custom board with agx orin without PD controller ,and we have two typec as follows:
1.usb2-0+usb3-1 for recovery.
2.usb2-1+usb3-2 for host.
i find only one board can flash with the l4t_flash_initrd.sh.the others can not ,because it will boot up timeout and can not find the usb device ,when i enter the bash in initrd i it can show usb0 ,but the log is different from the good one ,they have no log about EP enable.
i ask our hardware engineer the difference between the two board .they say it’s no difference in hardware. but i flash the two board with the same software envriment as well.what i can see the difference is the two typec hub is only one board has been welded on and the other bad ones welded two.i try to disabled the usb2-1+usb3-2 ,it still didn’t work.

bad.txt (52.4 KB)
good.txt (57.6 KB)

Does this node come out on your device in initrd?

/sys/class/usb_role/usb2-0-role-switch/role

bash-5.1# ls /sys/class/usb_role/usb2-0-role-switch/role
bin/              initrd_flash.cfg  qspi/             sys/
dev/              lib/              root/             tmp/
etc/              mnt/              run/              usr/
init              proc/             sbin/             var/
bash-5.1# ls /sys/class/usb_role/usb2-0-role-switch/
device/
power/
role
subsystem/
supplier:platform:regulator-vdd-5v0-sys/
uevent
waiting_for_supplier
bash-5.1# ls /sys/class/usb_role/usb2-0-role-switch/
device/
power/
role
subsystem/
supplier:platform:regulator-vdd-5v0-sys/
uevent
waiting_for_supplier

what is the result of cat role?

it is device

[   10.027166] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 16383
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/typec/stusb160x.ko
[   10.028680] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
insmod /lib/modules/5.15.136-tegra/updates/drivers/platform/tegra/mce/tegra-mce.ko
insmod /lib/modules/5.15.136-tegra/updates/drivers/spi/spi-tegra210-quad.ko
[   10.041520] tegra-qspi 3270000.spi: Adding to iommu group 11
[   10.043265] spi-nor spi0.0: mx25u51279g (65536 Kbytes)
[   11.062731] using random self ethernet address
[   11.062737] using random host ethernet address
[   11.078655] tegra-xusb 3610000.usb: Firmware timestamp: 2023-02-10 03:48:10 UTC
[   11.232719] usb0: HOST MAC 02:97:72:78:51:e1
[   11.232723] usb0: MAC 12:82:14:4f:8d:5c
[   11.234234] tegra-xudc 3550000.usb: EP 0 (type: ctrl, dir: out) enabled
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1# cat /sys/class/usb_role/usb2-0-role-switch/
device/
power/
role
subsystem/
supplier:platform:regulator-vdd-5v0-sys/
uevent
waiting_for_supplier
bash-5.1# cat /sys/class/usb_role/usb2-0-role-switch/role
device
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#

i find i attach another usb-typec wire to the other typec host hub . dmesg can show it becomes ready. and my vmware can recognised it now. Why are they related?

[   11.111641] tegra-xusb 3610000.usb: Firmware timestamp: 2023-02-10 03:48:10 UTC
[   11.267126] usb0: HOST MAC 1a:91:8c:4a:78:3e
[   11.267129] usb0: MAC 0a:b2:44:fb:38:b7
[   11.268653] tegra-xudc 3550000.usb: EP 0 (type: ctrl, dir: out) enabled
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1# [   29.517695] usb usb2-port3: config error

bash-5.1# [   33.587003] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   33.587026] usb usb2-port3: config error

bash-5.1#
bash-5.1#
bash-5.1# [   37.658875] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   37.658895] usb usb2-port3: config error

bash-5.1#
bash-5.1# [   41.731005] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   41.731027] usb usb2-port3: config error

bash-5.1#
bash-5.1# [   45.802864] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   45.802885] usb usb2-port3: config error
[   49.271650] tegra-xudc 3550000.usb: EP 5 (type: intr, dir: in) enabled
[   49.271667] tegra-xudc 3550000.usb: EP 3 (type: bulk, dir: in) enabled
[   49.271679] tegra-xudc 3550000.usb: EP 2 (type: bulk, dir: out) enabled
[   49.271779] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[   49.875011] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   49.875031] usb usb2-port3: config error
[   53.947011] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   53.947033] usb usb2-port3: config error
[   58.019002] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   58.019024] usb usb2-port3: config error
[   62.098877] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   62.098904] usb usb2-port3: config error
[   66.183121] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   66.183169] usb usb2-port3: config error
[   70.266868] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   70.266906] usb usb2-port3: config error
[   74.390866] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[   74.390896] usb usb2-port3: config error




你要不要直接用中文解釋你這裡到底想說什麼?

i find i attach another usb-typec wire to the other typec host hub . dmesg can show it becomes ready. and my vmware can recognised it now. Why are they related? Also, in the next version hardware design , we will only keep one typec as for recovery and no host hub, then Can’t I burn it in this way ?

說實話不知道你到底換了什麼
而且為什麼要拿vmware測試? 這種usb detection比較不穩定的環境要不要先避免使用一下?

我用另一根typec转usb的烧写线(和接到recovery typec端口一样的传输数据线)接到了另一个作为host的typec端口上,然后就可以识别到device了,不清楚这两个typec有什么关系,而且我之前好的载板和试的这两个坏的载板区别就是好的板子 除了做recovery 的typec端口贴了之外,另外一个没贴,坏的两个板子两个typec都贴了,用的一样的设备树效果不一样。

而且昨天我好像看到一个topic是devkit 识别不到你们有说让接上个鼠标或者其他任何一个usb设备试试,但我现在还没找到那个帖子

是l4t_flash_initrd执行在vmware的虚拟机系统里,所以作为device可以识别到的话自然可移动设备就能看到

Waiting for target to boot-up… Timeout, and there is no usb0 device on host - Jetson & Embedded Systems / Jetson Orin Nano - NVIDIA Developer Forums

  1. 麻煩你要說什麼就直接編輯在一個comment裡面… 你這樣四個comment回四句話實在是不利於閱讀

  2. 你如果已經在用rel-36.3就不用管rel-36.2的post.

  3. 請問你這個意思是你的 "usb2-1+usb3-2 for host"嗎

接到了另一个作为host的typec端口上

嗯,是的。

  1. 現在的狀況是沒有人知道你的device tree到底有沒有寫對 . 沒有辦法確認你的usb0 真的能正常的切換mode

  2. Host 端用VM本來就是容易有usb偵測的問題. 你在debug的狀況下用這種環境就只是給自己增加變數跟麻煩.

  3. 有沒有做USB host port在Jetson上根本無關緊要. 你現在的問題就是 (1) +(2)的狀況. 跟host port無關.

tegra234-p3737-0000+p3701-0008-nv.dtb.txt (243.8 KB)
tegra234-p3737-0000+p3701-0008-nv_convert.dts.txt (316.6 KB)
上面是我的设备树和用dtc转换的dts文件,可以帮忙确认下么,那烧写的时候不用虚拟机需要用一台专门的装了ubuntu的电脑么

請你自己要了解一下, device tree就是要搭配著你的線路圖寫. 我沒有任何你的線路圖資訊. 從你這樣的device tree我沒辦法給任何精確的回覆

我只能從你前面的敘述中指出幾點

  1. 有些usb node已經被拿掉了 但是usb@3610000還是有他們.
  2. 你說你要做一個type C port. 但你的device tree內容明顯是沒辦法做成type C port. 甚至是一個功能正常的OTG port都有問題.

這個純粹是你device tree改了之後沒生效吧…
你要不要先照你自己想改的東西改好之後再傳上來…

tegra234-p3737-0000+p3701-0008-nv_convert.dts.txt (316.4 KB)
这个呢,这个只写了一个device typec ,另一个host也去掉了,其他我也想写otg,但是没有ucsi_ccg,不清楚connetor节点写在哪个驱动下面,( ╯□╰ )
刚刚试了一下好像是不行的,(lll¬ω¬)No known UDC device found

[   10.016941] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:f0:67:ee
[   10.018260] nvethernet 2310000.ethernet: Macsec not enabled
[   10.018261] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 16383
[   10.019778] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/typec/stusb160x.ko
insmod /lib/modules/5.15.136-tegra/updates/drivers/platform/tegra/mce/tegra-mce.ko
insmod /lib/modules/5.15.136-tegra/updates/drivers/spi/spi-tegra210-quad.ko
[   10.033121] tegra-qspi 3270000.spi: Adding to iommu group 9
[   10.038611] spi-nor spi0.0: mx25u51279g (65536 Kbytes)
No known UDC device found
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#
bash-5.1#

serial_log.txt (38.7 KB)这个 似乎是mode没有peripheral,但是我看文档mode是分三种的2.0,之前的jetpack版本可能是叫device我记得看过35.多的,有可能确实不是peripheral

tegra234-p3737-0000+p3701-0008-nv_convert.dts.txt (316.8 KB)
这个呢,这个现象和最初的一样,只有ep ctrl enable , 中断和bluk都没有使能,麻烦您指导下,非常感谢

[   10.868054] using random self ethernet address
[   10.868059] using random host ethernet address
[   10.884147] tegra-xusb 3610000.usb: Firmware timestamp: 2023-02-10 03:48:10 UTC
[   11.041267] usb0: HOST MAC 2a:0b:56:c6:a4:11
[   11.041270] usb0: MAC 3a:0c:a8:dc:80:a4
[   11.042779] tegra-xudc 3550000.usb: EP 0 (type: ctrl, dir: out) enabled
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1#
bash-5.1# ls
bin  etc   initrd_flash.cfg  mnt   qspi  run   sys  usr
dev  init  lib               proc  root  sbin  tmp  var
bash-5.1# cat /sys/class/
ata_device/        hnae/              pci_bus/           sound/
ata_link/          hwmon/             pci_epc/           spi_master/
ata_port/          i2c-adapter/       phy/               tee/
backlight/         i2c-dev/           power_supply/      thermal/
bdi/               input/             pps/               tpm/
block/             iommu/             ptp/               tpmrm/
bsg/               k3_udma_glue_chan/ pwm/               tty/
chromeos/          leds/              regulator/         typec/
devcoredump/       mdio_bus/          remoteproc/        typec_mux/
devfreq/           mem/               rtc/               udc/
devlink/           misc/              sas_device/        usb_role/
dma/               mmc_host/          sas_end_device/    vc/
dmi/               mtd/               sas_expander/      vfio/
extcon/            mux/               sas_host/          virtio-ports/
firmware/          net/               sas_phy/           vtconsole/
fpga_manager/      nvme/              sas_port/          wakeup/
gpio/              nvme-generic/      scsi_device/       watchdog/
graphics/          nvme-subsystem/    scsi_disk/
hidraw/            nvpps/             scsi_host/
bash-5.1# cat /sys/class/u
udc/      usb_role/
bash-5.1# cat /sys/class/u
udc/      usb_role/
bash-5.1# cat /sys/class/u
udc/      usb_role/
bash-5.1# cat /sys/class/usb_role/usb2-0-role-switch/
device/
power/
role
subsystem/
supplier:platform:regulator-vdd-5v0-sys/
uevent
waiting_for_supplier
bash-5.1# cat /sys/class/usb_role/usb2-0-role-switch/role
device
bash-5.1#
bash-5.1#
bash-5.1#

串口日志.txt (41.0 KB)

請你每次改完東西都附上完整log. 貼這幾行結果usb相關的就一行… 說實話沒什麼用.