SuperSpeed not available in custom board's USB 3.0 port

Hello.

I have a TX2 with a custom carrierboard which provides one USB 3.0 and two USB 2.0 ports. However, SuperSpeed (USB 3.0 speed mode) negotiation doesn’t work in the former; it provides HighSpeed (USB 2.0 speed) at most.

I test this with lsusb -t and SuperSpeed-capable devices (hard drives and cameras). In a PC, they effectively use SuperSpeed. What’s more, even if I put the exact same TX2 module in a Jetson board, without making any changes to the filesystem, SuperSpeed works.

The connector in the board is Type-C and I’m using an adapter to Type-A, but I’ve verified that it does work well in a PC.

I’m using Jetpack 3.2.1 and L4T 28.2.1. The kernel is the same that comes with L4T. The DTB is a modified one, I’m attaching the relevant parts.

tegra186-quill-p3310-c03-00-base.dts

xhci@3530000 {
    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", "usb3-0";
}

pinctrl@3520000 {
    pinmux {
        usb3-std-A-port2 {
            nvidia,lanes = "usb3-0";
        };
    };
};

tegra186-quill-p3310-1000-a00-00-base.dts

usb_cd {
    status = "okay";
    phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
    phy-names = "otg-phy";
};

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

xudc@3550000 {
    status = "okay";
    phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>;
    phy-names = "usb2";
    emc-frequency = <150000000>;
};

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(1)>;
    phy-names = "utmi-0", "utmi-1", "usb3-1";
    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>;
            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-1";
            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 = "disabled";
        };

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

quill-platforms/tegra186-quill-kernel-4.9.dtsi

xhci@3530000 {
    compatible = "nvidia,tegra186-xhci";
    reg = <0x0 0x03530000 0x0 0x8000>,
        <0x0 0x03538000 0x0 0x1000>;
    interrupts = <0 163 0x4>, <0 164 0x4>, <0 167 0x4>;
    clocks = <&tegra_car TEGRA186_CLK_XUSB_HOST>,
        <&tegra_car TEGRA186_CLK_XUSB_FALCON>,
        <&tegra_car TEGRA186_CLK_XUSB_SS>,
        <&tegra_car TEGRA186_CLK_XUSB_CORE_SS>,
        <&tegra_car TEGRA186_CLK_CLK_M>, /* FIXME: HS souce */
        <&tegra_car TEGRA186_CLK_XUSB_FS>,
        <&tegra_car TEGRA186_CLK_PLLU>,
        <&tegra_car TEGRA186_CLK_CLK_M>,
        <&tegra_car TEGRA186_CLK_PLLE>;
    clock-names = "xusb_host", "xusb_falcon_src", "xusb_ss", "xusb_ss_src", "xusb_hs_src",
        "xusb_fs_src", "pll_u_480m", "clk_m", "pll_e";
 
    /delete-property/ mboxes;
    /delete-property/ mbox-names;
};

xusb_padctl: xusb_padctl@3520000 {
    compatible = "nvidia,tegra18x-xusb-padctl";
    reg = <0x0 0x3520000 0x0 0x1000>, <0x0 0x03540000 0x0 0x1000>;
    reg-names = "padctl", "ao";
    resets = <&tegra_car TEGRA186_RESET_XUSB_PADCTL>;
    reset-names = "padctl";
 
    status = "okay";
 
    prod-settings {
        #prod-cells = <4>;
        mask-one-style;
        prod_c_bias {
            prod = <0 0x284 0x00000038 0x38>;
        };
        prod_c_hsic0 {
            prod = <0 0x344 0x0000007f 0x2d>;
        };
        prod_c_utmi0 {
            prod = <0 0x88 0x01fe0000 0xcc0000>;
        };
        prod_c_utmi1 {
            prod = <0 0xc8 0x01fe0000 0xcc0000>;
        };
        prod_c_utmi2 {
            prod = <0 0x108 0x01fe0000 0xcc0000>;
        };
    };
 
    pads {
        usb2 {
            clocks = <&tegra_car TEGRA186_CLK_USB2_TRK>;
            clock-names = "trk";
            lanes {
                usb2-0 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
                usb2-1 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
                usb2-2 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
            };
        };
        usb3 {
            lanes {
                usb3-0 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
                usb3-1 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
                usb3-2 {
                    nvidia,function = "xusb";
                    status = "okay";
                    #phy-cells = <0>;
                };
            };
        };
    };

    ports {
        usb2-0 {
            status = "okay";
            mode = "otg";
        };
        usb2-1 {
            status = "okay";
            mode = "host";
            vbus-supply = <&vdd_usb1_5v>;
        };
        usb2-2 {
            status = "disabled";
            mode = "host";
            vbus-supply = <&vdd_usb2_5v>;
        };
        usb3-0 {
            nvidia,usb2-companion = <2>;
            status = "disabled";
        };
        usb3-1 {
            nvidia,usb2-companion = <1>;
            status = "okay";
        };
        usb3-2 {
            status = "disabled";
        };
    };
};

xudc@3550000 {
    nvidia,xusb-padctl = <&xusb_padctl>;
    phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    phy-names = "usb2";
};

xhci@3530000 {
    nvidia,xusb-padctl = <&xusb_padctl>;
    phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
        <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>;
    phy-names = "usb2-1", "usb3-1";
};

plugin-manager {
    fragment-e3325-xusb {
        enable-override-on-all-matches;
        ids = "<3310-1000-500";
        odm-data = "enable-xusb-on-uphy-lane0";
        override@0 {
            target = <&xusb_padctl>;
            _overlay_ {
                ports {
                    usb2-2 {
                        status = "okay";
                    };
                    usb3-0 {
                        status = "okay";
                    };
                };
            };
        };

        override@1 {
            target = <&{/xhci@3530000}>;
            _overlay_ {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
                    <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
                    <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
                    <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>;
                phy-names = "usb2-1", "usb2-2", "usb3-0", "usb3-1";
            };
        };
    };

    fragment-500-xusb-config {
        ids = ">=3310-1000-500";
        override@0 {
            target = <&{/xhci@3530000}>;
            _overlay_ {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
                    <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
                phy-names = "usb2-1", "usb3-0";
            };
        };
        override@1 {
            target = <&xusb_padctl>;
            _overlay_ {
                ports {
                    usb3-1 {
                        status = "disabled";
                    };
                    usb3-0 {
                        nvidia,usb2-companion = <1>;
                        status = "okay";
                    };
                };
            };
        };
    };

    fragment-500-e3325-pcie {
        enable-override-on-all-matches;
        ids = ">=3310-1000-500";
        odm-data = "enable-pcie-on-uphy-lane0";
        override@0 {
            target = <&{/xhci@3530000}>;
            _overlay_ {
                phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>;
                phy-names = "usb2-1";
            };
        };
    };
};

Any clues about what could be going wrong?

Hi,
Please refer to debug tips at
https://devtalk.nvidia.com/default/topic/1048285/jetson-tx2/how-to-setup-usb-config-4-for-tx2-l4t-28-2-1-/post/5320806/#5320806