RNDIS failed with USB 2.0

I’m trying to enable RNDIS over USB 2.0 in Jetson-xavier module based custom board. In our board we didn’t add USB3.0 Host. We have only 2.0, which perfectly works for flashing OS. but failed to enumerate as RNDIS.

rapsodo@localhost:~$ dmesg | grep usb
[    0.000000] Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt tegra_fbmem=0x800000@0xa069b000 lut_mem=0x2008@0xa0695000 usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1    quiet
[    1.067131] usbcore: registered new interface driver usbfs
[    1.067205] usbcore: registered new interface driver hub
[    1.067364] usbcore: registered new device driver usb
[    1.137534] vdd-usb-3v3: at 3300 mV 
[    7.344087] usbcore: registered new interface driver r8152
[    7.344180] usbcore: registered new interface driver asix
[    7.344253] usbcore: registered new interface driver ax88179_178a
[    7.344293] usbcore: registered new interface driver cdc_ether
[    7.344328] usbcore: registered new interface driver net1080
[    7.344364] usbcore: registered new interface driver cdc_subset
[    7.344411] usbcore: registered new interface driver zaurus
[    7.344515] usbcore: registered new interface driver cdc_ncm
[    7.354112] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[    7.354122] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[    7.360775] usbcore: registered new interface driver uas
[    7.360834] usbcore: registered new interface driver usb-storage
[    7.360913] usbcore: registered new interface driver usbserial
[    7.366679] usbcore: registered new interface driver xpad
[   12.185195] usbcore: registered new interface driver usbhid
[   12.185199] usbhid: USB HID core driver
[   12.203187] usbcore: registered new interface driver snd-usb-audio
[   14.757063] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   14.757067] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[   14.844298] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   14.844302] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[   14.856007] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   14.856011] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[   15.355859] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   15.355867] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[   15.474571] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   15.474576] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP
[   16.296980] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP
[   16.296985] tegra-xusb 3610000.xhci: USB3 port 2 has OTG_CAP

and the following messages pop up on serial port after boot up:

[   12.172776] tegra-i2c 31c0000.i2c: rx dma timeout txlen:28 rxlen:128
[   12.172932] tegra-i2c 31c0000.i2c: --- register dump for debugging ----
[   12.173062] tegra-i2c 31c0000.i2c: I2C_CNFG - 0x22c00
[   12.173152] tegra-i2c 31c0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[   12.173291] tegra-i2c 31c0000.i2c: I2C_FIFO_CONTROL - 0x0
[   12.173387] tegra-i2c 31c0000.i2c: I2C_FIFO_STATUS - 0x800080
[   12.173488] tegra-i2c 31c0000.i2c: I2C_MST_FIFO_CONTROL - 0x70
[   12.173601] tegra-i2c 31c0000.i2c: I2C_MST_FIFO_STATUS - 0x7c0000
[   12.173708] tegra-i2c 31c0000.i2c: I2C_MST_PACKET_TRANSFER_CNT - 0x0
[   12.173818] tegra-i2c 31c0000.i2c: I2C_INT_MASK - 0x6c
[   12.173908] tegra-i2c 31c0000.i2c: I2C_INT_STATUS - 0x2
[   12.174017] tegra-i2c 31c0000.i2c: i2c transfer timed out addr: 0x50

Any suggestion or will RNDIS works on USB2.0 or not ??

Thanks in advance.

Hi,
Table 17 in oem design guide lists all USB2.0 pins.
https://developer.nvidia.com/embedded/dlc/jetson-agx-xavier-series-oem-product-design-guide
Please take a look and share which pair is used on your custom board. Also is it a type-A port?

Hi,

Thanks for the response.

We are using F12 & F13 pins as per Table 17 in my custom board as USB Type C Connector.

For your info, there is no VBUS connection in our board.

Hi,
So on the customer board, it is a type-C port with only USB2 D+/D- pins and no USB3 TX/RX pins, VBUS pin? F12 and F13 are J512 on default board and it supports OTG. If you don’t need OTG, you would need to look at adaptation guide and modify device tree.

Hi,

Yes, Just F12 & F13 connected to type-C connector.

I’m looking into device tree at /hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi"

ports {
                        usb2-0 {
                                mode = "device"; /*"otg"*/
                                status = "okay";
                        };

Anything else need to modify ??

Edit:

I just clarify with hardware team, they didn’t add Host Capabilities in Custom board
the custom board doesn’t have Ethernet port.

Hi,
There are some configs for enabling OTG on J512. There is a post about enabling it on J513:
https://devtalk.nvidia.com/default/topic/1069847/jetson-agx-xavier/xavier-trying-to-use-j513-as-otg-instead-of-j512/post/5419868/#5419868
For your custom board, J512 runs in device mode only and you should check extcon-cables values.

Please check adaptation guide for detail:
https://developer.nvidia.com/embedded/dlc/Tegra_Linux_Driver_Package_AGX_Xavier_Adaptation_Guide

Hello DaneLLL,

Thanks for the support,

I tried to change extcon-cable values, but still not working.

In my custom board, no PD controller & as well OTG Phy.

Can you help, with device tree changes to make USB port 0 work in device mode ?

Hi,
The following device tree is for Xavier default developer kit:

>       external-connection {
                vbus_id_extcon: extcon@1 {
                        compatible = "extcon-gpio-states";
                        reg = <0x1>;
                        extcon-gpio,name = "VBUS_ID";
                        extcon-gpio,wait-for-gpio-scan = <0>;
                        extcon-gpio,cable-states = <0x3 0x0
                                                    0x0 0x2
                                                    0x1 0x2
                                                    0x2 0x1>;
                        gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(M, 3) 0
                                &tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 0) 0>;
                        extcon-gpio,out-cable-names = <EXTCON_USB EXTCON_USB_HOST EXTCON_NONE>;
                        #extcon-cells = <1>;
                };
        };

To enter device mode, VBUS_DETECT pin(GPIO_M3) has to be low and ID pin(GPIO_Q0) has to be high.

In your hardware design, you can set either not-in-use GPIO pin as ID pin and set it to logical high. However, VBUS_DETECT pin is required for triggering device mode. Probably you don’t design VBUS_DETECT pin correctly?

1 Like

Hello DaneLLL,

Thanks for your response,

In my custom design, the VBUS_DETECT pin connected to GND

Please refer attachment of our custom design

Is it possible to make it work or not ? without VBUS ?
usb_connection.png

Hi,
Please apply the patch and try again:

external-connection {
                vbus_id_extcon: extcon@1 {
                        compatible = "extcon-gpio-states";
                        reg = <0x1>;
                        [b]extcon-gpio,name = "VBUS";
                        extcon-gpio,out-cable-names = <EXTCON_USB EXTCON_NONE>;
                        cable-connected-on-boot = <0>;[/b]
                        #extcon-cells = <1>;
                        status = "okay";
                };
        };

xusb_padctl: xusb_padctl@3520000 {
        ……
                ports {
                        usb2-0 {
                                <b>mode = "device";</b>
                                status = "okay";
                        };
                ……
                }
};

        tegra_xudc: xudc@3550000 {
                [b]extcon-cables = <&vbus_extcon 0>;
                extcon-cable-names = "vbus";[/b]
        ……
};

        tegra_xhci: xhci@3610000 {
                [b]extcon-cables = <&vbus_extcon 1>;
                extcon-cable-names = "id";[/b]
……
};

Thanks,