USB devices not enumerating in lsusb in TX2

Hi Wayne,

On TX2 EVK, below are enumerating in lsusb.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

On our carrier board with same image and proper hardware, nothing is coming in lsusb and facing below errors of xusb

root@localhost:~# dmesg | grep usb
*[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw *
[ 0.492927] usbcore: registered new interface driver usbfs
[ 0.492959] usbcore: registered new interface driver hub
[ 0.493021] usbcore: registered new device driver usb
[ 0.548424] vdd-usb0-5v: 5000 mV
[ 0.548716] vdd-usb1-5v: 5000 mV
[ 0.926650] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 1.083985] usbcore: registered new interface driver r8152
[ 1.084014] usbcore: registered new interface driver asix
[ 1.084040] usbcore: registered new interface driver ax88179_178a
[ 1.084068] usbcore: registered new interface driver cdc_ether
[ 1.084092] usbcore: registered new interface driver net1080
[ 1.084117] usbcore: registered new interface driver cdc_subset
[ 1.084142] usbcore: registered new interface driver zaurus
[ 1.084176] usbcore: registered new interface driver cdc_ncm
[ 1.087513] usbcore: registered new interface driver uas
[ 1.087554] usbcore: registered new interface driver usb-storage
[ 1.087609] usbcore: registered new interface driver usbserial
[ 1.089079] tegra-usb-cd usb_cd: otg phy is not available yet
[ 1.091535] usbcore: registered new interface driver xpad
[ 21.387042] usbcore: registered new interface driver usbhid
[ 21.387045] usbhid: USB HID core driver
[ 21.419997] usbcore: registered new interface driver snd-usb-audio
[ 21.593568] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.603178] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.606418] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.616802] tegra-usb-cd usb_cd: otg phy is not available yet
[ 21.620081] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[ 21.688528] vdd-usb0-5v: disabling
[ 21.688530] vdd-usb1-5v: disabling

=======================================================================
can you please suggest on this.

Ok, you should tell the board is your custom carrier board when you filed a topic otherwise no one can understand your problem.

You have to do software configuration in dts. Please check tx2 adaptation guide on download center.

Hi Wayne,

In the adaptation guide the changes are for p3310-1000, I am using p3489-0888 model.
the power tree file in my case hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi can be used.

can you please specify the files and changes for p3489-0888.

Hi,

I think the rules are all the same. And you should learn how to parse and trace the device tree if you want to develop custom carrier board.

For example, I don’t know the answer of your question either. If you want me to check which files to use, all I will do is go to dts folder and use grep command to find the corresponding usb nodes. No special trick is required here. You should be able to do it too.

Hi Wayne,

USB 2.0 and 3.0 detection issue is resolved. The problem was with one of the io expander tca9539 which is not present in our custom board. So i removed that.
root@localhost:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Now there is one USB based sierra LTE module, we have connected to TX2 USB 2.0, Port 2 Data+. But it is not detected. Even if the host controllers are enabled but downstream devices are still not detected yet. So I am suspecting still some usb configuration is missing from dtsi.

I have followed the adaptation guide and did the changes from the “Power Tree Changes” section. But there is some confusion in the “Required Device Tree Changes” section. Can you please guide me on this section what needs to be added for enabling the USB 2.0, Port 2 Data

Hi,

We need more info here.

  1. Are you able to use other usb2 devices on this port? If you can, will they work?
  2. Does “not detect” mean lsusb not have it? Do you see new kernel log when you plug in the device?

Hi Wayne,

With TX1 SOM on my custom board USB devices are detecting.
But with TX2 SOM on the same custom board there is no downstream device detected and getting below logs for usb:

[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait rootfstype=
[ 0.509073] usbcore: registered new interface driver usbfs
[ 0.509119] usbcore: registered new interface driver hub
[ 0.509199] usbcore: registered new device driver usb
[ 0.564742] vdd-usb0-5v: 5000 mV
[ 0.565071] vdd-usb1-5v: 5000 mV
[ 0.568110] vdd-usb2-5v: 5000 mV
[ 0.951132] tegra-xusb-padctl 3520000.xusb_padctl: VBUS over-current detection enabled
[ 3.511409] usbcore: registered new interface driver r8152
[ 3.511437] usbcore: registered new interface driver asix
[ 3.511467] usbcore: registered new interface driver ax88179_178a
[ 3.511491] usbcore: registered new interface driver cdc_ether
[ 3.511515] usbcore: registered new interface driver net1080
[ 3.511539] usbcore: registered new interface driver cdc_subset
[ 3.511564] usbcore: registered new interface driver zaurus
[ 3.511601] usbcore: registered new interface driver cdc_ncm
[ 3.517387] tegra-xusb 3530000.xhci: USB2 port 0 has OTG_CAP
[ 3.519010] tegra-xusb 3530000.xhci: extcon 0: ffffffc0f11dbc00 id
[ 3.519687] usbcore: registered new interface driver uas
[ 3.519726] usbcore: registered new interface driver usb-storage
[ 3.519784] usbcore: registered new interface driver usbserial
[ 3.521393] tegra-xusb 3530000.xhci: Firmware timestamp: 2019-10-31 05:52:15 UTC, Version: 55.17 release
[ 3.526636] usbcore: registered new interface driver xpad
[ 3.550149] tegra-xusb 3530000.xhci: xHCI Host Controller
[ 3.550164] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 1
[ 3.550864] tegra-xusb 3530000.xhci: hcc params 0x0184fd25 hci version 0x100 quirks 0x00050810
[ 3.550890] tegra-xusb 3530000.xhci: irq 70, io mem 0x03530000
[ 3.551017] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.551021] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.551024] usb usb1: Product: xHCI Host Controller
[ 3.551027] usb usb1: Manufacturer: Linux 4.9.140 xhci-hcd
[ 3.551029] usb usb1: SerialNumber: 3530000.xhci
[ 3.551711] tegra-xusb 3530000.xhci: xHCI Host Controller
[ 3.551719] tegra-xusb 3530000.xhci: new USB bus registered, assigned bus number 2
[ 3.551841] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 3.551845] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.551848] usb usb2: Product: xHCI Host Controller
[ 3.551851] usb usb2: Manufacturer: Linux 4.9.140 xhci-hcd
[ 3.551853] usb usb2: SerialNumber: 3530000.xhci
[ 3.654262] usb usb1: usb_suspend_both: status 0
[ 6.687761] tegra-xusb 3530000.xhci: Upgrade port 0 to USB3.0
[ 6.693499] tegra-xusb 3530000.xhci: Upgrade port 1 to USB3.0
[ 6.770271] usb usb2: usb_suspend_both: status 0
[ 9.042135] tegra-xusb 3530000.xhci: entering ELPG
[ 9.050116] tegra-xusb 3530000.xhci: entering ELPG done
[ 14.795421] usbcore: registered new interface driver usbhid
[ 14.801006] usbhid: USB HID core driver
[ 15.354054] usbcore: registered new interface driver snd-usb-audio
[ 15.893486] vdd-usb0-5v: disabling
[ 15.896898] vdd-usb1-5v: disabling
[ 15.928867] vdd-usb2-5v: disabling

I followed this thread Third USB on custom board not working with JetPack 4.2

  1. and added hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3489-1000-a00-00.dtsi
  •           vbus-2-supply = <&vdd_usb2_5v>;
    
  •           vbus-2-supply = <&battery_reg>;
    
  1. in file hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3489-0888-a00-00-base.dts below xhci@3530000 having default usb mapping as

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
phy-names = “usb2-0”, “usb2-1”, “usb2-2”, “usb3-0”;
status = “okay”;

};

#else
xhci@3530000 {
status = “okay”;
phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>;
phy-names = “utmi-0”, “utmi-1”, “utmi-2”;
nvidia,boost_cpu_freq = <800>;
};
#endif
4. the pinctrl node has below default dtsi entry as
pinctrl@3520000 {
status = “okay”;
pinctrl-0 = <&tegra_xusb_padctl_pinmux_default>;
pinctrl-1 = <&vbus_en0_sfio_tristate_state>;
pinctrl-2 = <&vbus_en1_sfio_tristate_state>;
pinctrl-3 = <&vbus_en0_sfio_passthrough_state>;
pinctrl-4 = <&vbus_en1_sfio_passthrough_state>;
pinctrl-5 = <&vbus_en0_default_state>;
pinctrl-6 = <&vbus_en1_default_state>;
pinctrl-names = “default”,
“vbus_en0_sfio_tristate”, “vbus_en1_sfio_tristate”,
“vbus_en0_sfio_passthrough”, “vbus_en1_sfio_passthrough”,
“vbus_en0_default”, “vbus_en1_default”;
tegra_xusb_padctl_pinmux_default: pinmux {
/* Quill does not support usb3-micro AB */
usb2-micro-AB {
nvidia,lanes = “otg-0”;
nvidia,function = “xusb”;
nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
nvidia,oc-pin = <0>;
};
usb2-std-A-port2 {
nvidia,lanes = “otg-1”;
nvidia,function = “xusb”;
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <1>;
};
usb3-std-A-port2 {
nvidia,lanes = “usb3-0”;
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <1>;
};

        e3325-usb3-std-A-HS {
            nvidia,lanes = "otg-2";
            nvidia,function = "xusb";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay";
        };

        e3325-usb3-std-A-SS {
            nvidia,lanes = "usb3-0";
            nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
            status = "okay";
        };

================================================================
So can you please suggest are the above changes fine or still dtsi needs some update to enable USB 2.0 in custom board with TX2 SOM with R32.4.3 sdk.

Any help will be appreciated.

Please check the format of your comment. Not quite readable now.
Thanks.

Hi Wayne,

Other than the format, my query to you is as per the adaptation guide in section “Required device-tree changes”
I have done the changes below
#else
xhci@3530000 {
status = “disabled”;

vbus-2-supply = <&battery_reg>;

other than this all the entries are already present such as UPHY Lanes, phy-names and pinmux node in the base dtsi. I am also attaching a file for your reference.

after all these changes, usb devices such as Sierra LTE Module is not detected yet as downstream device on USB2.0.
usb_entries_in_base_dtsi.txt (5.1 KB)

Please suggest on this.

I meant the format of your post on forum. It is not easy to read.
Please check what you’ve posted here.

And what you should share is the whole dts file converted from dtb and also the schematic of your carrier board.

Also, the whole dmesg when error occurred.

Hi Wayne,

I am attaching the schematic snippets from usb sectionusb_compiled_dtsi.txt (760.1 KB) , dtb and full logs.
Please share your response on that.
dmesg_logs.txt (57.7 KB)
lumia_side processor_side

Although USB based LTE module is connected but i did not get any logs for its detection and no other errors also, that’s why i am suspecting dtsi changes.
Please review and share your feedback on this.

Hi,

If you don’t have these usb3 ports. Could you disable them?

  usb3 {
                lanes {
                    usb3-0 {
                        status = "okay";
                        #phy-cells = <0x00000000>;
                        nvidia,function = "xusb";
                        linux,phandle = <0x000000ae>;
                        phandle = <0x000000ae>;
                    };
                    usb3-1 {
                        status = "okay";
                        #phy-cells = <0x00000000>;
                        nvidia,function = "xusb";
                    };
                    usb3-2 {
                        status = "okay";
                        #phy-cells = <0x00000000>;
                        nvidia,function = "xusb";
                    };

Also, what is the status of other 2 usb ports? Are they able to work?

Just for more clarification, we are using USB3.0 --> for programming and USB2.0 port2–> for Sierra LTE module. And apart from these two other USBs are not mounted in our case.

Then why do you enable them here?

usb2-0 {
status = “okay”;
mode = “otg”;
vbus-supply = <0x000000a8>;
nvidia,oc-pin = <0x00000000>;
};
usb2-1 {
status = “okay”;
mode = “host”;
vbus-supply = <0x000000a9>;
nvidia,oc-pin = <0x00000001>;
};
usb2-2 {
status = “okay”;
mode = “host”;
vbus-supply = <0x000000aa>;

And sorry that your picture is too small so I am not really sure about it.

Why do you have usb3-0 accompany with usb2-1 but your schematic showed the USB1 is not in use?

usb3-0 {
status = “okay”;
nvidia,usb2-companion = <0x00000001>;
};

Hi Wayne,

The Above two entries mentioned by you are by default present in our SDK. that is why there is confusion.

In TX2 USB Section, we are using

Port0–>USB3.0 --> using only d+/- for programming only
Port1–>Not mounted in our case
Port2–>USB2.0–> Used for Connecting Sierra Module

So as per our usecase:
should I disable the above two entries mentioned by you from xusb_padctl@3520000 ?

Yes, you have to disable non-existing port and also correct the usb3 to usb2 mapping.

No need to care about what is enabled by deafult sdk. That is for nv devkit and you are using custom carrier board. You need to modify them according to your design

Btw, what you need to read is the document published in 2019. The old one was for rel-28.