Use USB0 as host usb on Orin NX custom carrier board(JP 5.1.2)

Hi

We have a custom carrier board with Orin - JP 5.1.2
I want to use the usb0 port as a host device
We have a FTDI chip connected to usb0 on the hardware and we are unable to detect it

i encounter the following errors:

[ 30.230494] usb0: HOST MAC be:69:b9:83:6d:2a
[ 30.230502] usb0: MAC be:69:b9:83:6d:2b
[ 30.242297] l4tbr0: port 2(usb0) entered blocking state
[ 30.242309] l4tbr0: port 2(usb0) entered disabled state
[ 30.242418] device usb0 entered promiscuous mode

Here are my device tree settings:

Changed otg to host

                ports {

                        u0x2b7sb2-0 {
                                status = "okay";
                                mode = "host";
                                vbus-supply = <0x2b6>;
                                usb-role-switch;

                                port {

                                        endpoint {
                                                remote-endpoint = <0x2b7>;
                                                phandle = <0x69>;
                                        };
                                };
                        };

Removed usb2-a from xudc@3550000
and added u0x2b7sb2-0 with its respective phandle value in phys

xhci@3610000 {
                compatible = "nvidia,tegra234-xhci\0nvidia,tegra234-xusb";
                reg = <0x00 0x3610000 0x00 0x40000 0x00 0x3600000 0x00 0x10000 0x00 0x3650000 0x00 0x10000>;
                reg-names = "base\0fpci\0bar2";
                interrupts-extended = <0x01 0x00 0xa3 0x04 0x01 0x00 0xa4 0x04 0x01 0x00 0xa7 0x04 0x0a 0x4c 0x04 0x0a 0x4d 0x04 0x0a 0x4e 0x04 0x0a 0x4f 0x04 0x0a 0x50 0x04 0x0a 0x51 0x04 0x0a 0x52 0x04>;
                interrupt-names = "xhci\0mbox\0padctl\0wake0\0wake1\0wake2\0wake3\0wake4\0wake5\0wake6";
                clocks = <0x02 0x10a 0x02 0x10b 0x02 0x10c 0x02 0x10d 0x02 0x10e 0x02 0x10f 0x02 0x110 0x02 0x111 0x02 0x113 0x02 0x115 0x02 0x67 0x02 0x0e 0x02 0x64>;
                clock-names = "xusb_hs_src\0xusb_host\0xusb_core_superspeed_clk\0xusb_falcon_src\0xusb_falcon_host_clk\0xusb_falcon_superspeed_clk\0xusb_fs_src\0xusb_fs_host_clk\0xusb_ss_src\0xusb_ss\0pll_u_480m\0clk_m\0pll_e";
                power-domains = <0x02 0x0c 0x02 0x0a>;
                power-domain-names = "xusb_host\0xusb_ss";
                nvidia,xusb-padctl = <0x2b9>;
                interconnects = <0x03 0x4a 0x03 0x4b>;
                interconnect-names = "dma-mem\0dma-mem";
                iommus = <0x56 0x0e>;
                dma-coherent;
                status = "okay";
                phys = <0x2b7 0x2ba 0x2bd 0x2be 0x2bf 0x2bc>;
                phy-names = "u0x2b7sb2-0\0usb2-0\0usb2-1\0usb2-2\0usb3-0\0usb3-1";
                phandle = <0x45f>;

Please advice thanks

Hi,

Does usb 1-1 in the dmesg mean USB0? it says device not responding, we have two FTDI chips connected - one on USB0 and the other on USB1


**[    7.684444] usb 1-1: new low-speed USB device number 2 using tegra-xusb**
**[    7.820739] usb 1-1: device descriptor read/64, error -71**
**[    8.064743] usb 1-1: device descriptor read/64, error -71**
**[    8.304442] usb 1-1: new low-speed USB device number 3 using tegra-xusb**
**[    8.440921] usb 1-1: device descriptor read/64, error -71**
**[    8.680621] usb 1-1: device descriptor read/64, error -71**
**[    8.796420] usb usb1-port1: attempt power cycle**
**[    9.208444] usb 1-1: new low-speed USB device number 4 using tegra-xusb**
**[    9.216624] usb 1-1: Device not responding to setup address.**
**[    9.429848] usb 1-1: Device not responding to setup address.**
**[    9.644440] usb 1-1: device not accepting address 4, error -71**
**[    9.776442] usb 1-1: new low-speed USB device number 5 using tegra-xusb**
**[    9.784429] usb 1-1: Device not responding to setup address.**
**[    9.997845] usb 1-1: Device not responding to setup address.**
**[   10.228441] usb 1-1: device not accepting address 5, error -71**
[   10.234723] usb usb1-port1: unable to enumerate USB device
[   10.368516] usb 1-2: new high-speed USB device number 6 using tegra-xusb
[   10.528943] usb 1-2: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
[   10.537358] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   10.544698] usb 1-2: Product: Quad RS232-HS
[   10.548983] usb 1-2: Manufacturer: FTDI
[   10.752442] usb 1-3: new high-speed USB device number 7 using tegra-xusb
[   10.912625] usb 1-3: New USB device found, idVendor=0781, idProduct=55ab, bcdDevice= 1.00
[   10.921050] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.928392] usb 1-3: Product:  SanDisk 3.2Gen1
[   10.932947] usb 1-3: Manufacturer:  USB
[   10.936891] usb 1-3: SerialNumber: 0401560f40952dbc0e3436df992295ab6675723839beef3157b08d7291ecd0dd91ef00000000000000000000fee19030008c2a18ab558107562ee5c1
[   10.952338] usb-storage 1-3:1.0: USB Mass Storage device detected
[   10.959457] scsi host0: usb-storage 1-3:1.0
[   18.023867] fusb301 1-0025: failed to read device id, err : 0xffffff87
[   18.031260] fusb301 1-0025: fusb301 not support
[   18.036135] fusb301: probe of 1-0025 failed with error -22
[   19.009444] usbcore: registered new interface driver ftdi_sio
[   19.015393] usbserial: USB Serial support registered for FTDI USB Serial Device
[   19.029834] usb 1-2: Detected FT4232H
[   19.034747] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
[   19.049012] usb 1-2: Detected FT4232H
[   19.053965] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1
[   19.068200] usb 1-2: Detected FT4232H
[   19.073629] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB2
[   19.093519] usb 1-2: Detected FT4232H
[   19.098481] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB3
[   30.513062] usb0: HOST MAC be:69:b9:83:6d:2a
[   30.513066] usb0: MAC be:69:b9:83:6d:2b
[   30.525626] l4tbr0: port 2(usb0) entered blocking state
[   30.525638] l4tbr0: port 2(usb0) entered disabled state
[   30.525757] device usb0 entered promiscuous mode

Sorry for the late response.
Is this still an issue to support? Any result can be shared?

@kayccc

yes this is still an issue, no results yet to be shared.

please share the whole schematic and whole device tree. It is not able to know those phandle with just your partial snippets.

@WayneWWW

Here is the device tree:

check.dts.txt (412.4 KB)

We need to know the whole part from jetson side to the connector side.

@WayneWWW

There are 2 FTDI chips connected:
On USB0 and USB1

USB1 ftdi chip is being detected but USB0 FTDI is not.

please remove the fusb301 related things on your board too. This is the type C controller on the USB0.

@WayneWWW

We have disabled it.

@WayneWWW

there is no fusb302 related settings on the board and also i have disabled in the device tree.
Please check the device tree
compiled.dts.txt (419.3 KB)

dump message:

[    1.588887] usbcore: registered new interface driver usbfs
[    1.594380] usbcore: registered new interface driver hub
[    1.599698] usbcore: registered new device driver usb
[    4.299729] usbcore: registered new interface driver r8152
[    4.305360] usbcore: registered new interface driver asix
[    4.310906] usbcore: registered new interface driver ax88179_178a
[    4.317162] usbcore: registered new interface driver cdc_ether
[    4.323146] usbcore: registered new interface driver net1080
[    4.328949] usbcore: registered new interface driver cdc_subset
[    4.335027] usbcore: registered new interface driver zaurus
[    4.340757] usbcore: registered new interface driver cdc_ncm
[    4.346572] usbcore: registered new interface driver aqc111
[    4.368983] tegra-xusb 3610000.xhci: Adding to iommu group 0
[    4.375331] usbcore: registered new interface driver uas
[    4.380810] usbcore: registered new interface driver usb-storage
[    4.398958] usbcore: registered new interface driver xpad
[    5.715667] usbcore: registered new interface driver usbhid
[    5.721397] usbhid: USB HID core driver
[    6.129200] usbcore: registered new interface driver snd-usb-audio
[    7.387928] tegra-xusb 3610000.xhci: Firmware timestamp: 2023-02-10 03:48:10 UTC, Version: 80.05 release
[    7.397682] tegra-xusb 3610000.xhci: xHCI Host Controller
[    7.403300] tegra-xusb 3610000.xhci: new USB bus registered, assigned bus number 1
[    7.411949] tegra-xusb 3610000.xhci: hcc params 0x0180ff05 hci version 0x120 quirks 0x0000000000050810
[    7.421554] tegra-xusb 3610000.xhci: irq 229, io mem 0x03610000
[    7.427997] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    7.436500] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.443927] usb usb1: Product: xHCI Host Controller
[    7.448933] usb usb1: Manufacturer: Linux 5.10.120OrinDRM+ xhci-hcd
[    7.455366] usb usb1: SerialNumber: 3610000.xhci
[    7.469120] tegra-xusb 3610000.xhci: xHCI Host Controller
[    7.474674] tegra-xusb 3610000.xhci: new USB bus registered, assigned bus number 2
[    7.482458] tegra-xusb 3610000.xhci: Host supports USB 3.1 Enhanced SuperSpeed
[    7.489967] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    7.498472] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.505897] usb usb2: Product: xHCI Host Controller
[    7.510900] usb usb2: Manufacturer: Linux 5.10.120OrinDRM+ xhci-hcd
[    7.517337] usb usb2: SerialNumber: 3610000.xhci
[    7.721902] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    7.879425] usb 1-2: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
[    7.887839] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    7.895184] usb 1-2: Product: Quad RS232-HS
[    7.899476] usb 1-2: Manufacturer: FTDI
[    8.106050] usb 1-3: new high-speed USB device number 3 using tegra-xusb
[    8.270032] usb 1-3: New USB device found, idVendor=0781, idProduct=55ab, bcdDevice= 1.00
[    8.278448] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    8.285791] usb 1-3: Product:  SanDisk 3.2Gen1
[    8.290352] usb 1-3: Manufacturer:  USB
[    8.294291] usb 1-3: SerialNumber: 0401560f40952dbc0e3436df992295ab6675723839beef3157b08d7291ecd0dd91ef00000000000000000000fee19030008c2a18ab558107562ee5c1
[    8.309580] usb-storage 1-3:1.0: USB Mass Storage device detected
[    8.316661] scsi host0: usb-storage 1-3:1.0
[   19.819514] usbcore: registered new interface driver ftdi_sio
[   19.825496] usbserial: USB Serial support registered for FTDI USB Serial Device
[   19.839948] usb 1-2: Detected FT4232H
[   19.844983] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
[   19.859236] usb 1-2: Detected FT4232H
[   19.864260] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1
[   19.880379] usb 1-2: Detected FT4232H
[   19.885351] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB2
[   19.900255] usb 1-2: Detected FT4232H
[   19.905233] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB3
[   30.585868] usb0: HOST MAC be:69:b9:83:6d:2a
[   30.585870] usb0: MAC be:69:b9:83:6d:2b
[   30.596727] l4tbr0: port 2(usb0) entered blocking state
[   30.596739] l4tbr0: port 2(usb0) entered disabled state
[   30.597019] device usb0 entered promiscuous mode

please share full dmesg

And xudc looks wrong too.

@WayneWWW

may i know what is wrong in xudc?
i removed usb2-0 from xudc and the extra 0 before usb3

dmesgusb0.txt (198.7 KB)
compiled.dts.txt (419.3 KB)

You shouldn’t put anything in the xudc driver anymore. Or just disable it.

@WayneWWW

I have disabled the xudc driver

Now the device usb0 entered promiscuous mode is not there

But still FTDI chip is not detected on USB0 .
Im able to detect ftdi on USB1 and SanDisk USB on USB2.

dmesgusb0.txt (262.9 KB)
compiled.dts.txt (419.3 KB)

Why is this still here?

usb-role-switch;

				port {

					endpoint {
						remote-endpoint = <0x2bf>;
						phandle = <0x69>;
					};

@WayneWWW

i removed the port under usb2-0 after changing it to “host”
Please confirm if device tree is now correct.
Still unable to detect the chip on USB0

compiled.dts.txt (419.3 KB)
dmesgusb0.txt (326.9 KB)

I cannot confirm. You need to confirm it by checking your hardware to match it or not.

Check whether vbus-supply is matching or not.

Read the document.
https://docs.nvidia.com/jetson/archives/r35.5.0/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?highlight=universal%20bus#porting-the-universal-serial-bus