Jetson Orin 2nd Type C affects 1st Type C

Hi,

I’m working on our customized board, which is based on the Orin Nano development kit, but with an additional 2nd Type-C port added.
The 2nd Type-C port combines USB3-0 and USB2-1. We modified the device tree and got it working, but there’s a strange minor bug that I believe is related to the USB detect pin.


Our second Type-C detect pin is connected to pin 118, which is GPIO(Q, 5). After configuring GPIO(Q, 5) correctly in the device tree, we encountered an issue: when unplug the 2nd Type C, it causes the 1st Type C disconnected but only the USB2 part of it disconnected. However, if we unplug the 1st Type C, it will not affect the 2nd Type C.

The strange thing is that when we assign the detect pin to a random incorrect pin for the 2nd Type C—like GPIO(Z, 2)—the problem disappears.
We also tried assigning an incorrect pin to the 1st Type-C port, which caused it to completely malfunction.

So why does the incorrect setting make it work fine, while the correct one seems to cause a bug???

Thanks

*** Please note that this reply is generated by LLM automatically ***

I’d be happy to help you troubleshoot the issue with your customized board based on the Orin Nano development kit.

Firstly, congratulations on successfully modifying the device tree to get the 2nd Type-C port working with USB 3.0 and USB 2.1! However, the strange minor bug you’re experiencing is indeed puzzling.

To summarize, the issue occurs when you unplug the 2nd Type-C port, which causes the USB 2.0 part of the 1st Type-C port to disconnect, but not the USB 3.0 part. This doesn’t happen when you unplug the 1st Type-C port. Additionally, assigning an incorrect pin to the 2nd Type-C port’s detect pin (e.g., GPIOZ 2) resolves the issue, while assigning an incorrect pin to the 1st Type-C port causes it to malfunction.

Based on your description, I’ll attempt to provide some insights and potential explanations:

  1. GPIOQ 5 vs. GPIOZ 2: It’s possible that there’s a subtle difference in how the GPIOQ 5 and GPIOZ 2 pins are configured or behave on your customized board. Perhaps GPIOQ 5 has a specific pull-up or pull-down resistor configuration that’s not present on GPIOZ 2, which affects the USB detect pin’s behavior.
  2. Device tree configuration: Double-check your device tree configuration for both Type-C ports. Ensure that the USB detect pins are correctly configured, and there are no conflicts or overlaps between the two ports’ configurations.
  3. USB controller behavior: It’s possible that the USB controller on the Orin Nano is behaving differently when the 2nd Type-C port is unplugged. This might be related to the USB controller’s power management or clocking configuration. You may want to investigate the USB controller’s behavior and configuration in the device tree.
  4. Signal integrity or noise: The issue might be related to signal integrity or noise on the USB detect pin or the USB signals themselves. Verify that the signal quality is good and that there’s no noise or interference affecting the USB signals.
  5. Hardware design: Although you mentioned that the 2nd Type-C port is connected to pin 118 (GPIOQ 5), it’s essential to review the hardware design and ensure that there are no issues with the PCB layout, routing, or component placement that could be causing the problem.

To further troubleshoot the issue, I recommend:

  • Verifying the device tree configuration for both Type-C ports
  • Checking the GPIOQ 5 and GPIOZ 2 pin configurations and behavior
  • Investigating the USB controller’s behavior and configuration
  • Reviewing the hardware design and PCB layout
  • Using a logic analyzer or oscilloscope to monitor the USB detect pin and USB signals

If you’re still unable to resolve the issue, please provide more details about your customized board, device tree configuration, and any other relevant information that might help me better understand the problem.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Could you share the schematic of the whole USB part?

And also the dmesg with error log?

Hi Wayne,

Thanks for your response. Below are the schematics for the entire USB section.






To summarize:

  • USB Type-C 1 is an exact replica of the Nano Dev Kit’s recovery USB Type-C, including the same hardware and pin assignments.
  • USB Type-C 2, which we added, uses the same hardware design as the recovery port but with a different pin configuration.
    Pin assignments:
  • USB Type-C 1: USB3-1 + USB2-0 + I2C_0 (pins 185 & 187) + USB Detect (pin 87)
  • USB Type-C 2: USB3-0 + USB2-1 + I2C_1 (pins 189 & 191) + USB Detect (pin 118)

In the dmesg log:

  1. Time 0s to 20s is the log I boot up with USB Type-C 1 plugged in with a Type C hub with mouse and keyboard.
  2. Time 75s to 77s is the log I plugged in another Type C hub to the USB Type-C 2.
  3. Time 102s is the log I unplugged the USB Type-C 2, this part of the log I think is where the problem happens since the hub with mouse and keyboard was still connected to the USB Type-C 1 but they were disconnected in the system.
  4. Time 138s to the end is the log I was trying to unplug and plug USB Type-C 1 to bring the mouse and keyboard back.

below is the log:
[ 0.080215] usbcore: registered new interface driver usbfs
[ 0.080229] usbcore: registered new interface driver hub
[ 0.080239] usbcore: registered new device driver usb
[ 0.172909] usbcore: registered new interface driver usb-storage
[ 2.898426] usbcore: registered new interface driver usbhid
[ 2.898429] usbhid: USB HID core driver
[ 2.966579] usbcore: registered new interface driver snd-usb-audio
[ 3.102219] tegra-xusb 3610000.usb: Adding to iommu group 2
[ 3.116719] tegra-xusb 3610000.usb: Firmware timestamp: 2023-02-10 03:48:10 UTC
[ 3.116726] tegra-xusb 3610000.usb: xHCI Host Controller
[ 3.116736] tegra-xusb 3610000.usb: new USB bus registered, assigned bus number 1
[ 3.117475] tegra-xusb 3610000.usb: hcc params 0x0180ff05 hci version 0x120 quirks 0x0000000000010810
[ 3.117494] tegra-xusb 3610000.usb: irq 122, io mem 0x03610000
[ 3.117593] tegra-xusb 3610000.usb: xHCI Host Controller
[ 3.117597] tegra-xusb 3610000.usb: new USB bus registered, assigned bus number 2
[ 3.117600] tegra-xusb 3610000.usb: Host supports USB 3.1 Enhanced SuperSpeed
[ 3.450200] usb 1-3: new full-speed USB device number 2 using tegra-xusb
[ 8.883856] fusb301 1-0025: device id: 0x12
[ 8.915595] fusb301 1-0025: toggle_time(0) is not updated
[ 8.915937] fusb301 1-0025: fusb301_set_mode: mode (32)(32)
[ 8.916275] fusb301 1-0025: fusb301_detach: type[0x00] chipstate[0x01]
[ 8.916280] fusb301 1-0025: fusb_update_state: 1
[ 8.917072] fusb301 1-0025: mode[0x20], host_cur[0x02], dttime[0x00]
[ 8.921866] fusb301 7-0025: device id: 0x12
[ 8.950723] fusb301 7-0025: toggle_time(0) is not updated
[ 8.950838] fusb301 7-0025: fusb301_set_mode: mode (32)(32)
[ 8.950951] fusb301 7-0025: fusb301_detach: type[0x00] chipstate[0x01]
[ 8.950955] fusb301 7-0025: fusb_update_state: 1
[ 8.951228] fusb301 7-0025: mode[0x20], host_cur[0x02], dttime[0x00]
[ 9.007327] usbcore: registered new interface driver btusb
[ 9.018810] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6fd4e69.20220818-105856
[ 9.020202] usbcore: registered new interface driver rtk_btusb
[ 9.168279] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[ 9.168847] fusb301 1-0025: sts[0x11], type[0x10]
[ 9.169180] fusb301 1-0025: fusb301_set_mode: mode (4)(4)
[ 9.169511] fusb301 1-0025: fusb_update_state: a
[ 9.791757] fusb301 1-0025: fusb301_set_mode: mode (1)(1)
[ 9.792095] fusb301 1-0025: fusb_update_state: b
[ 9.938282] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[ 9.938846] fusb301 1-0025: sts[0x11], type[0x10]
[ 9.939643] fusb301 1-0025: fusb301_set_dfp_power: host current(1)
[ 9.939646] fusb301 1-0025: fusb_update_state: 7
[ 11.142333] usb 1-1: new high-speed USB device number 3 using tegra-xusb
[ 11.645313] usb 2-2: new SuperSpeed USB device number 2 using tegra-xusb
[ 12.322220] usb 1-1.1: new full-speed USB device number 4 using tegra-xusb
[ 12.451014] input: Telink Wireless Receiver Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0001/input/input5
[ 12.451135] input: Telink Wireless Receiver Consumer Control as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0001/input/input6
[ 12.510406] input: Telink Wireless Receiver System Control as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0001/input/input7
[ 12.510532] hid-generic 0003:248A:8327.0001: input,hidraw0: USB HID v1.11 Mouse [Telink Wireless Receiver] on usb-3610000.usb-1.1/input0
[ 12.516700] input: Telink Wireless Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.1/0003:248A:8327.0002/input/input8
[ 12.519419] usb 2-2.3: new SuperSpeed USB device number 3 using tegra-xusb
[ 12.578625] hid-generic 0003:248A:8327.0002: input,hidraw1: USB HID v1.11 Keyboard [Telink Wireless Receiver] on usb-3610000.usb-1.1/input1
[ 12.682224] usb 1-1.4: new low-speed USB device number 5 using tegra-xusb
[ 12.799975] input: PixArt HP USB Optical Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:03F0:094A.0003/input/input9
[ 12.800141] hid-generic 0003:03F0:094A.0003: input,hidraw2: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-3610000.usb-1.4/input0
[ 13.961060] ax88179_178a 2-2.3:2.0 eth0: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, 82:17:89:97:c2:a8
[ 15.144810] ax88179_178a 2-2.3:2.1 eth1: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, 5e:5a:c0:bd:e0:ad
[ 15.198094] usbcore: registered new interface driver ax88179_178a
[ 15.200751] usbcore: registered new interface driver cdc_ether
[ 15.203503] usbcore: registered new interface driver cdc_ncm
[ 16.348307] usb 1-1.5: new high-speed USB device number 6 using tegra-xusb
[ 18.732786] usb 2-2.3: USB disconnect, device number 3
[ 18.732916] ax88179_178a 2-2.3:2.0 eth0: unregister ‘ax88179_178a’ usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 18.754563] ax88179_178a 2-2.3:2.1 eth1: unregister ‘ax88179_178a’ usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 19.088036] usb 2-2.3: new SuperSpeed USB device number 4 using tegra-xusb
[ 20.713764] ax88179_178a 2-2.3:1.0 eth0: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, f8:e4:3b:c2:e8:af
[ 75.393701] fusb301 7-0025: fusb301_work_handler: int_sts[0x01]
[ 75.393908] fusb301 7-0025: sts[0x21], type[0x10]
[ 75.394024] fusb301 7-0025: fusb301_set_mode: mode (4)(4)
[ 75.394140] fusb301 7-0025: fusb_update_state: a
[ 75.998521] fusb301 7-0025: fusb301_set_mode: mode (1)(1)
[ 75.998643] fusb301 7-0025: fusb_update_state: b
[ 76.148552] fusb301 7-0025: fusb301_work_handler: int_sts[0x01]
[ 76.148758] fusb301 7-0025: sts[0x21], type[0x10]
[ 76.149043] fusb301 7-0025: fusb301_set_dfp_power: host current(1)
[ 76.149047] fusb301 7-0025: fusb_update_state: 7
[ 77.374434] usb 2-1: new SuperSpeed USB device number 5 using tegra-xusb
[ 77.526218] usb 1-2: new high-speed USB device number 7 using tegra-xusb
[ 77.754803] usb 2-1.1: new SuperSpeed USB device number 6 using tegra-xusb
[ 77.792379] usb-storage 2-1.1:1.0: USB Mass Storage device detected
[ 77.792736] scsi host0: usb-storage 2-1.1:1.0
[ 102.104870] usb 1-2: USB disconnect, device number 7
[ 102.120635] fusb301 7-0025: fusb301_work_handler: int_sts[0x02]
[ 102.120645] fusb301 7-0025: fusb301_detach: type[0x10] chipstate[0x07]
[ 102.121131] fusb301 7-0025: fusb301_set_mode: mode (32)(32)
[ 102.121248] fusb301 7-0025: fusb_update_state: 1
[ 102.246269] usb 1-1: USB disconnect, device number 3
[ 102.246278] usb 1-1.1: USB disconnect, device number 4
[ 102.478497] usb 1-1.4: USB disconnect, device number 5
[ 102.494943] usb 1-1.5: USB disconnect, device number 6
[ 102.858318] usb 2-1: USB disconnect, device number 5
[ 102.858333] usb 2-1.1: USB disconnect, device number 6
[ 138.126479] fusb301 1-0025: fusb301_work_handler: int_sts[0x02]
[ 138.126488] fusb301 1-0025: fusb301_detach: type[0x10] chipstate[0x07]
[ 138.127637] fusb301 1-0025: fusb301_set_mode: mode (32)(32)
[ 138.127993] fusb301 1-0025: fusb_update_state: 1
[ 138.196074] usb 2-2: USB disconnect, device number 2
[ 138.196086] usb 2-2.3: USB disconnect, device number 4
[ 138.196506] ax88179_178a 2-2.3:1.0 enxf8e43bc2e8af: unregister ‘ax88179_178a’ usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 140.306561] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[ 140.307126] fusb301 1-0025: sts[0x11], type[0x10]
[ 140.307455] fusb301 1-0025: fusb301_set_mode: mode (4)(4)
[ 140.307784] fusb301 1-0025: fusb_update_state: a
[ 140.927046] fusb301 1-0025: fusb301_set_mode: mode (1)(1)
[ 140.927380] fusb301 1-0025: fusb_update_state: b
[ 141.074249] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[ 141.074807] fusb301 1-0025: sts[0x11], type[0x10]
[ 141.075592] fusb301 1-0025: fusb301_set_dfp_power: host current(1)
[ 141.075596] fusb301 1-0025: fusb_update_state: 7
[ 142.270222] usb 1-1: new high-speed USB device number 8 using tegra-xusb
[ 142.773654] usb 2-2: new SuperSpeed USB device number 7 using tegra-xusb
[ 143.450227] usb 1-1.1: new full-speed USB device number 9 using tegra-xusb
[ 143.573872] input: Telink Wireless Receiver Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0004/input/input10
[ 143.574064] input: Telink Wireless Receiver Consumer Control as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0004/input/input11
[ 143.630414] input: Telink Wireless Receiver System Control as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:248A:8327.0004/input/input12
[ 143.630607] hid-generic 0003:248A:8327.0004: input,hidraw0: USB HID v1.11 Mouse [Telink Wireless Receiver] on usb-3610000.usb-1.1/input0
[ 143.635444] input: Telink Wireless Receiver as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.1/1-1.1:1.1/0003:248A:8327.0005/input/input13
[ 143.644060] usb 2-2.3: new SuperSpeed USB device number 8 using tegra-xusb
[ 143.694771] hid-generic 0003:248A:8327.0005: input,hidraw1: USB HID v1.11 Keyboard [Telink Wireless Receiver] on usb-3610000.usb-1.1/input1
[ 143.802210] usb 1-1.4: new low-speed USB device number 10 using tegra-xusb
[ 143.918179] input: PixArt HP USB Optical Mouse as /devices/platform/bus@0/3610000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:03F0:094A.0006/input/input14
[ 143.918424] hid-generic 0003:03F0:094A.0006: input,hidraw2: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-3610000.usb-1.4/input0
[ 145.062031] ax88179_178a 2-2.3:2.0 eth0: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, 02:72:bd:90:43:77
[ 146.247775] ax88179_178a 2-2.3:2.1 eth1: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, 5e:34:d3:9c:bf:c0
[ 147.426227] usb 1-1.5: new high-speed USB device number 11 using tegra-xusb
[ 149.836730] usb 2-2.3: USB disconnect, device number 8
[ 149.836857] ax88179_178a 2-2.3:2.0 eth0: unregister ‘ax88179_178a’ usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 149.862575] ax88179_178a 2-2.3:2.1 eth1: unregister ‘ax88179_178a’ usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[ 150.175942] usb 2-2.3: new SuperSpeed USB device number 9 using tegra-xusb
[ 151.787194] ax88179_178a 2-2.3:1.0 eth0: register ‘ax88179_178a’ at usb-3610000.usb-2.3, ASIX AX88179 USB 3.0 Gigabit Ethernet, f8:e4:3b:c2:e8:af

Thanks!

Could you attach your full boot up log as text file instead of copy and paste?

It is a disaster to read copy and paste log directly on forum.

I also need you to share how your dts looks like. I hope you don’t copy and paste it either.

usb_log.zip (5.8 KB)

Hi Wayne,

My boot up log and dts I modified are attached in the zip file.

Thanks

Hi,

Please understand the meaning of “full boot up” log means I need to see the log since the first line of kernel boot. But not some usb log parsed by you.

Also, please share full dts converted back from dtb.

usb_full_log.zip (93.2 KB)

Hi Wayne,

This new attachment is the full dmesg log with full dtb and decompiled dts.

The log includes my test behavior: plug the first USB C hub with keyboard and mouse → plug the second USB C hub → unplug the second USB C hub (which also results in the keyboard and mouse in the first USB C disconnect too) → unplug and plug the first USB C hub to bring keyboard and mouse back.

Thanks!

Hi,

Could you set the two usb mode to host instead of otg? Looks like you don’t need them to be otg so not sure why you are still using otg mode.

Hi Wayne,

Thanks! It works after changing the second USB to “host.” I don’t actually need both ports to be OTG, but could you still briefly explain why we can’t have two OTG ports? Is it simply that the NX hardware doesn’t support two OTG, or is it a software/driver limitation?

Thanks!

It is a hardware limitation listed in our TRM document in USB section.