config 4 for USB 3.0 lane mapping

Hi All:

Our carrier board has two USB 3.0 type A port and a USB 3.0 for M.2.

Our pin mapping:
[USB 3.0 type A port1]
USB1_D (A38, A39) through USB hub to hub port 1
USB_SS0 (F43, F44, C43, C44)

[USB 3.0 type A port2]
USB2_D (B42, B43)
PEX_RFU (G39, G40, D39, D40)

[USB 3.0 M.2]
USB1_D (A38, A39) through USB hub to hub port 2
USB_SS1 (G42, G43, D42, D43)

I follow Jetson/TX2 USB - eLinux.org and https://devtalk.nvidia.com/default/topic/1030635/jetson-tx2/tx2-config-4-for-usb-lane-mapping/post/5243174/ to modify ODMDATA to 0x7090000 to use config#4 USB lane mapping.
Now I use “lsusb -t” with plug a USB 3.0 device to different port and plug a device to M.2, but there is only “USB 3.0 type A port1” can see 5G speed.
Is there anything we should pay attention to?

We use R28.2 BSP

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_UTMI_P(2)>,
            <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>,
            <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
            <&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
        phy-names = "utmi-0", "utmi-1", "utmi-2", "usb3-0", "usb3-1", "usb3-2";
        nvidia,boost_cpu_freq = <800>;
    };

    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>;
                status = "okay";
            };
            usb2-micro-AB {
                nvidia,lanes = "otg-0";
                nvidia,function = "xusb";
                nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
                status = "okay";
            };
            usb2-std-A-port2 {
                nvidia,lanes = "otg-1";
                nvidia,function = "xusb";
                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                status = "okay";
            };
            usb3-std-A-port2 {
                nvidia,lanes = "usb3-1";
                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                status = "okay";
            };
            usb3-std-A-port3 {
                nvidia,lanes = "usb3-2";
                nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                status = "okay";
            };

            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";
            };
        };
    };
    pcie-controller@10003000 {
        status = "okay";
        pci@1,0 {
            nvidia,num-lanes = <2>;
            nvidia,disable-clock-request;
            status = "okay";
        };
        pci@2,0 {
            nvidia,num-lanes = <1>;
            status = "okay";
        };
        pci@3,0 {
            nvidia,num-lanes = <1>;
            status = "disabled";
        };
    };

Hi,

Could you detect all the devices on your board?

What do you mean “but there is only “USB 3.0 type A port1” can see 5G speed.”?
There is only one xhci controller on tegra, so it is normal that there is only one 5000M speed host.

HI,

I mean if I plug USB 3.0 device to [USB 3.0 type A port1] and do “lsusb -t”, I will see the device under “Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M”, but if I plug the device to another two ports, I will see the device under “Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M”

wellens_kuo,

Okay. Then it is a problem. Please share your full dmesg with us and check your runtime device tree through /proc/device-tree/.

HI WayneWWW,
I checked runtime device tree through /proc/device-tree/ is the same as I posted.
In this dmesg, I try plug three USB 3.0 device to different port on the same time.
dmesg.txt (67.3 KB)

Could you give out the result of ODM data?

Please follow up the steps in adaptation guide (with tool devmem2 to reg 0x02520284 → 0x02570284).

The reg 0x02520284 → 0x02570284 is 011112, now I know why it can not up to USB 3.0!
I set the ODMDATA=0x7090000 in jetson-tx2.conf, and use “sudo ./flash.sh jetson-tx2 mmcblk0p1” to flash image, is it a wrong method?

Please check the flash log on your host to see what is the final ODMDATA flash to the device.

I suspect the the value get overwritten somewhere in p2771-0000.conf.common.

The final ODMDATA is default value 0x1090000, I try to modify default ODMDATA from 0x1090000 to 0x7090000 in p2771-0000.conf.common, USB 3.0 does work.
As this test result, it seems the ODMDATA can not be set in jetson-tx2.conf?

I always modify ODM data in p2771-0000.conf.common so not sure the answer.

Maybe it depends on where you put this value. jetson-tx2.conf is actually using p2771-0000.conf.common.

-> If you put in this line, then p2771-0000 may overwrite your value.
source "${LDK_DIR}/p2771-0000.conf.common";

Yes, it is.
I move the default ODMDATA from the function to last line in p2771-0000.conf.common and the ODMDATA in jetson-tx2.conf is valid, thanks!