TX2 USB 3.0 OTG as host Error Message

Hi yi-chia.lan,
Please try to enable more debug prints with following cmd before connecting OTG cable and USB storage device then provide the log for reference:

03/09/2018UPDATE: add module xhci_tegra +p;

echo 'module xhci_hcd +p; module usbcore +p; module tegra_xotg +p; module pinctrl_tegra186_padctl +p; <b>module xhci_tegra +p;</b>
' > /sys/kernel/debug/dynamic_debug/control;
echo 9 > /proc/sys/kernel/printk

FYI: You can attach the log in a comment.

Hi DaneLLL,
Please find log by attached file. Thank you.
USB3p0_Log.txt (132 KB)

Hi yi-chia.lan,
Please add usb3 in xotg and try again.

xotg {
        status = "okay";
        phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
            <b><&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)></b>;
        phy-names = "otg-usb2", <b>"otg-usb3"</b>;
    };

If it still fails, please once again share the log.

Hi DaneLLL,
Please find log by attachment. Thank you
USB3p0_Log.txt (136 KB)

Hi DaneLLL,
Any update ???

Hi yi-chia.lan,
We don’t see issues on our internal board which has USB3 micro AB.

Please help give more information:

  1. Run following cmds to read register values:
    ./devmem2 0x02520284
    ./devmem2 0x02530284
    ./devmem2 0x02540284
    ./devmem2 0x02550284
    ./devmem2 0x02560284
    ./devmem2 0x02570284
  2. Provide the final .dtb file used to be flashed.

Hi DaneLLL,

Value at address 0x2520284 (0xf7106284): 0x200
Value at address 0x2530284 (0xf7125284): 0x200
Value at address 0x2540284 (0xf7532284): 0x200
Value at address 0x2550284 (0xf757c284): 0x201
Value at address 0x2560284 (0xf7425284): 0x201
Value at address 0x2570284 (0xf71c5284): 0x202

tegra186-quill-p3310-1000-c03-00-base.zip (31.4 KB)

Hi DaneLLL,
Are these value correct ??
And, dtb settings is all right ?

Hi lan, we are checking.

Hi lan,
We found the HW keeps reporting the port link is in ‘Inactive’ state

[   40.089283] xhci-tegra 3530000.xhci: set port power, actual port 0 status  = 0xa0002a0
[   40.089303] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0xa0002a0
[   40.089315] xhci-tegra 3530000.xhci: Get port status returned 0x2a0 => USB3.0 OTG port was powered on, port link was in RxDetect
[   40.089339] xhci-tegra 3530000.xhci: set port power, actual port 0 status  = 0x2a0
[   40.089369] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x2a0
[   40.089379] xhci-tegra 3530000.xhci: Get port status returned 0x100 => USB2.0 OTG port was powered on

[   40.880222] hub 2-0:1.0: hub_resume
[   40.883822] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x4002c0
[   40.891737] xhci-tegra 3530000.xhci: Get port status returned 0x4002c0 => USB3.0 root hub resumed, read port status 0x2c0 reported from HW which indicated port link was in Inactive state

[   40.964499] usb usb2-port1: do warm reset => XHCI driver issued Warm Reset on USB3.0 OTG port trying to bring the port back to normal state

[   41.593845] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x2c0
[   41.601494] xhci-tegra 3530000.xhci: Get port status returned 0x2c0
[   41.607818] usb usb2-port1: not enabled, trying warm reset again... => The port couldn't recover from Inactive state, try Warm Reset again

[   42.310466] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x2c0
[   42.318116] xhci-tegra 3530000.xhci: Get port status returned 0x2c0
[   42.331973] usb usb2-port1: not enabled, trying warm reset again... => The port couldn't recover from Inactive state, try Warm Reset again

[   43.048415] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x2a0
[   43.056064] xhci-tegra 3530000.xhci: Get port status returned 0x2a0
[   43.062384] usb usb2-port1: Not disabling port; link state is RxDetect => The port was back to RxDetect to detect far end receiver termination

[   43.122707] hub 2-0:1.0: hub_suspend => USB3.0 root hub was going to suspend

[   43.355426] hub 2-0:1.0: hub_resume
[   43.358953] xhci-tegra 3530000.xhci: get port status, actual port 0 status  = 0x4002c0
[   43.366857] xhci-tegra 3530000.xhci: Get port status returned 0x4002c0 => read port link state in Inactive, repeat above sequence

It looks like the quality of TX/RX signals is not good enough. Can you measure the TX/RX signals and compare to Type A signals? Also is the USB3 micro-AB connected to TX2 directly?

Hi DaneLLL,
Do you mean our device tree setup is OK and register value is correct ?

Attached is OTG port TX report


STR-TX-CB_SI.rar (350 KB)

Yes, as of now, cannot see anything wrong in SW configuration.

Hi DaneLLL,
You said that you didn’t see issues on your internal board which has USB3 micro AB.
May I know that does this board using ID pin for micro AB, and also using USB_OTG_OC connect with OTG_EN??

It is with both ID pin and OC pin but OC pin is not enabled.

You have tried to remove all ‘nvidia,oc-pin’ in device tree but not got good result. OC pin is probably not an issue.
https://devtalk.nvidia.com/default/topic/1029899/jetson-tx2/tx2-usb-3-0-otg-as-host-error-message/post/5239029/#5239029

Hi yi-chia,
Please try to remove pinctrl-1 ~ 6.
From:

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";

To:

pinctrl-0 = <&tegra_xusb_padctl_pinmux_default>;
		pinctrl-names = "default";

And remove all nvidia,oc-pin

Hi DaneLLL,

I got same situation even if pinctrl 1~6 and all nvidia,oc-pin was removed.

Hi yi-chia,
Can you try to swap Tx/Rx of your OTG cable?

We found some OTG cables on market does not comply with below ECN. It could cause the issue.

usb_30_spec_031813\ECN & Errata\ECN 017 USB3.0 MicroAB Connector.pdf

I have noticed many OTG cables work correctly only for charging. I’d still be interested in seeing that ECN, but it got categorized as code instead of a URL.

Hi DaneLLL,

Yes, we swap TX/RX ,now OTG3.0 host mode works fine.
We will test OTG3.0 slave mode later and let you know the result.
Thank you for your help.

Hi DaneLLL,

Could you attach the ECN document?