This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: USB3 devices fail to enumerate

Part Number: AM5728
Other Parts Discussed in Thread: INA219

Hi all

I have a design based on the AM5728 eval board. One big difference between the two boards is my board doesn't have a hub on Port 1; it just ties directly to a USB micro jack. We're running the Linux OS based (I think) on SDK version 3. Just using lsusb -t, we can see USB2 devices enumerating on the port just fine, but when a colleague plugs in his USB3 thumb drive, it doesn't detect. A USB3 tester also was not detected when I tried to start characterization testing (I wasn't running the tester; it was run by someone who knows what he's doing).

Is there some set-up in SW that we're missing, something maybe that's needed to tell the port to look for SuperSpeed devices? Is there a write or two I need to do via the debugger?

Alternatively, did I miss something in the HW design that's preventing SS detection/links? See schematic screenshot below.

(Apologies, I'm posting this question, then going off the air for a few days, but I will check back as soon as I get back)

Thanks!

MADman

  • The USB experts have been notified. They will respond here.
  • Still kinda stuck here. Anyone have suggestions?
  • Sorry for the delay.

    From a HW perspective, nothing in the schematic jumps out as problematic for SS.

    Did you follow the layout recommendations in SPRAAR7? SS is *much* more sensitive from signal-integrity perspective.
    Do you see any LFPS signaling on the SS pairs?
    Please post your SDK DeviceTree settings?
  • weird. I replied, but I don't see my post. Guess I'll post again.

    Anyway, I'm reviewing my routes to make sure I didn't overlook anything. SPRAAR7 was a great guide during design.
    At the test house, we saw no wiggling on the SS lines at all, including LFPS.
    I asked SW for DeviceTree settings; I'll post those when they're available.

    Thanks!
    MADman
  • No LFPS signaling at all seems to point to a SW config issue. It doesn't seem like it's even trying to connect to SS devices.
  • That's what I've thought all along.  Device tree file follows. I looked through it and saw no reference to USB at all. Should I ask for something else?


    #include "am57xx-beagle-x15.dts"
    #include "am57xx-evm-common.dtsi"

    #include "am57xx-evm-cmem.dtsi"

    / {
    aliases {
    spi4 = &mcspi4;
    spi5 = &spi_gpio;
    spi6 = &spi_led;
    };
    };

    / {
    version_ = "SAM 1.1\n";
    };

    &dra7_pmx_core {
    i2c4_pins_default: i2c4_pins_default {
    pinctrl-single,pins = <
    0x2ac (PIN_INPUT| MUX_MODE10) /* mcasp1_acl.i2c4_sda */
    0x2b0 (PIN_INPUT| MUX_MODE10) /* mcasp1_fsr.i2c4_scl */
    >;
    };
    i2c5_pins_default: i2c5_pins_default {
    pinctrl-single,pins = <
    0x2b4 (PIN_INPUT| MUX_MODE10) /* mcasp1_acl.i2c4_sda */
    0x2b8 (PIN_INPUT| MUX_MODE10) /* mcasp1_fsr.i2c4_scl */
    >;
    };
    mcspi4_pins: mcspi4_pins {
    pinctrl-single,pins = <
    0x24C (PIN_OUTPUT_PULLUP | MUX_MODE8) /* uart3_txd.spi4_cs1 */
    0x350 (PIN_OUTPUT_PULLUP | MUX_MODE2) /*mcasp5_axr1.spi4_cs0*/
    0x34C (PIN_OUTPUT_PULLUP | MUX_MODE2) /*mcasp5_axr0.spi4_d0*/
    0x348 (PIN_INPUT_PULLUP | MUX_MODE2) /*mcasp5_fsx.spi4_d1*/
    0x344 (PIN_INPUT_PULLUP | MUX_MODE2) /*mcasp5_aclkx.spi4_clk*/
    >;
    };

    spi_gpio_pins: spi_gpio_pins {
    pinctrl-single,pins = <
    0x238 (PIN_OUTPUT_PULLUP | MUX_MODE14) /*VOUT1_D23, CS*/
    0x214 (PIN_OUTPUT_PULLUP | MUX_MODE14) /*VOUT1_D14, CLK*/
    0x1E4 (PIN_OUTPUT_PULLUP | MUX_MODE14) /*VOUT1_D2, MOSI/ASDI*/
    0x1E0 (PIN_INPUT_PULLUP | MUX_MODE14) /*VOUT1_D1, MISO*/
    0x234 (PIN_OUTPUT | MUX_MODE14) /*nCE*/
    0x20C (PIN_OUTPUT | MUX_MODE14) /*nConfig*/
    DRA7XX_CORE_IOPAD(0x3400, (PIN_INPUT_PULLUP | MUX_MODE0)) /* gpmc_ad0 */
    >;
    };
    pinctrl_eqep1: pinctrl_eqep1_pins {
    pinctrl-single,pins = <
    0x180 (PIN_INPUT_PULLUP | MUX_MODE10) /* VIN2A_D5, eQEP2A_in */
    0x17C (PIN_INPUT_PULLUP | MUX_MODE10) /* VIN2A_D6, eQEP2B_in*/
    >;
    };

    spi_led_pins: spi_led_pins {
    pinctrl-single,pins = <
    0x2BC (PIN_OUTPUT_PULLUP | MUX_MODE14) /*MCASP1_AXR2, MOSI, gpio5_4*/
    0x2C0 (PIN_OUTPUT_PULLUP | MUX_MODE14) /*MCASP1_AXR3, SCLK,gpio5_5*/
    0x2C4 (PIN_OUTPUT_PULLUP | MUX_MODE14) /*MCASP1_AXR4, SSn, gpio5_6*/
    0X2C8 (PIN_INPUT_PULLUP | MUX_MODE14) /*MCASP1_AXR5, MISO, gpio5_7*/
    >;
    };
    };

    / {
    spi_gpio: spi_gpio@0{
    compatible = "spi-gpio";
    #address-cells = <0x1>;
    #size-cells = <0x0>;
    pinctrl-names = "default";
    pinctrl-0 = <&spi_gpio_pins>;

    gpio-sck = <&gpio8 14 0>;
    gpio-miso = <&gpio8 1 0>;
    gpio-mosi = <&gpio8 2 0>;
    cs-gpios = <&gpio8 23 0>;
    num-chipselects = <1>;
    spidev0: spidev@0 {
    compatible = "linux,spidev";
    spi-max-frequency = <100000>;
    reg = <0>;
    status = "okay";
    };
    };
    };

    / {
    spi_led: spi_led@0{
    compatible = "spi-gpio";
    #address-cells = <0x1>;
    #size-cells = <0x0>;
    pinctrl-names = "default";
    pinctrl-0 = <&spi_led_pins>;

    gpio-mosi = <&gpio5 4 0>;
    gpio-sck = <&gpio5 5 0>;
    cs-gpios = <&gpio5 6 0>;
    gpio-miso = <&gpio5 7 0>;
    num-chipselects = <1>;
    spidevled0: spidevled@0 {
    compatible = "linux,spidev";
    spi-max-frequency = <100000>;
    reg = <0>;
    status = "okay";
    };
    };
    };


    &i2c4 {
    status = "okay";
    clock-frequency = <400000>;
    ina219@42 {
    compatible = "ti,ina219";
    reg = <0x42>;
    shunt-resistor = <1000>;
    };
    ina219@45 {
    compatible = "ti,ina219";
    reg = <0x45>;
    shunt-resistor = <1000>;
    };
    ina219@48 {
    compatible = "ti,ina219";
    reg = <0x48>;
    shunt-resistor = <1000>;
    };
    ina219@4A {
    compatible = "ti,ina219";
    reg = <0x4A>;
    shunt-resistor = <1000>;
    };
    };

    &i2c5 {
    status = "okay";
    clock-frequency = <400000>;

    ina219@40 {
    compatible = "ti,ina219";
    reg = <0x40>;
    shunt-resistor = <1000>;
    };

    ina219@41 {
    compatible = "ti,ina219";
    reg = <0x41>;
    shunt-resistor = <1000>;
    };

    ina219@48 {
    compatible = "ti,ina219";
    reg = <0x48>;
    shunt-resistor = <1000>;
    };
    };

    &mcspi4 {
    ti,spi-num-cs = <2>;
    pinctrl-names = "default";
    pinctrl-0 = <&mcspi4_pins>;
    status = "okay";
    ti,pindir-d0-out-d1-in;
    mcp23s18@0 {
    compatible = "mcp,mcp23s17";
    gpio-controller;
    #gpio-cells = <2>;
    mcp,spi-present-mask = <0x01>;
    spi-max-frequency = <1000000>;
    reg = <0>;
    #address-cells = <1>;
    #size-cells = <0>;
    status = "okay";
    };

    spidev@1 {
    compatible = "linux,spidev";
    spi-max-frequency = <400000>;
    reg = <1>; /* CS1*/
    status = "okay";
    };

    };


    &gpmc{
    status = "okay";
    ranges = <3 0 0x01000000 0x01000000>;
    status = "okay";

    fpga@3,0 {
    compatible = "zeiss,fpga_fw";
    reg = <3 0 0x01000000>;

    bank-width = <2>;

    interrupt-parent = <&gpmc>;
    interrupts = <0>;

    gpmc,sync-read;
    gpmc,sync-write;
    gpmc,burst-read;
    gpmc,burst-write;
    gpmc,burst-length = <4>;
    gpmc,device-width = <2>;
    gpmc,clk-activation-ns = <4>;
    gpmc,mux-add-data = <2>;

    gpmc,sync-clk-ps = <12000>;
    gpmc,cs-on-ns = <0>;
    gpmc,cs-rd-off-ns = <102>;
    gpmc,cs-wr-off-ns = <42>;
    gpmc,we-on-ns = <19>;
    gpmc,oe-on-ns = <53>;
    gpmc,adv-on-ns = <6>;
    gpmc,adv-rd-off-ns = <19>;
    gpmc,adv-wr-off-ns = <19>;
    gpmc,we-off-ns = <34>;
    gpmc,oe-off-ns = <106>;
    gpmc,access-ns = <102>;
    gpmc,rd-cycle-ns = <113>;
    gpmc,wr-cycle-ns = <57>;
    gpmc,wr-access-ns = <42>;
    gpmc,wr-data-mux-bus-ns = <21>;
    gpmc,page-burst-access-ns = <1>;
    gpmc,bus-turnaround-ns = <27>;
    gpmc,cycle2cycle-delay-ns = <27>;
    gpmc,time-para-granularity = <1>;

    #address-cells = <1>;
    #size-cells = <1>;

    };
    };

    &epwmss1{
    status = "okay";
    eqep1: eqep@48440180 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_eqep1>;
    count_mode = <0>; /* 0 - Quadrature mode, normal 90 phase offset cha & chb. 1 - Direction mode. cha input = clock, chb input = direction */
    swap_inputs = <0>; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */
    invert_qa = <0>; /* Should we invert the channel A input? */
    invert_qb = <0>; /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */
    invert_qi = <0>; /* Should we invert the index input? */
    invert_qs = <0>; /* Should we invert the strobe input? */
    status = "okay";
    };
    };

  • Michael,

    Is the above dts the only customization you did for your board? Nothing else is modified in dts?

    Please provide

    - the full kernel boot log (dmesg log after boot);

    - lsmod and lsusb command output;

    - /proc/config.gz

  • Michael,

    I received all the logs, but didn't observe anything suspicious there.
    Can you please try to dump the usb registers before and after pugged in a super-speed usb device?

    # /sys/kernel/debug/48890000.usb/regdump
  • Before and after files attached. FWIW, with the portable drive plugged in, link_state = SS.Disabled

    MADman

    before plug.txt
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25801000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x00040420
    GUCTL = 0x00008010
    GBUSERRADDR0 = 0x00000000
    GBUSERRADDR1 = 0x00000000
    GPRTBIMAP0 = 0x00000000
    GPRTBIMAP1 = 0x00000000
    GHWPARAMS0 = 0x202040ca
    GHWPARAMS1 = 0x01c0c93b
    GHWPARAMS2 = 0x00000000
    GHWPARAMS3 = 0x1042008d
    GHWPARAMS4 = 0x48822004
    GHWPARAMS5 = 0x04202088
    GHWPARAMS6 = 0x0b000c20
    GHWPARAMS7 = 0x03080780
    GDBGFIFOSPACE = 0x00820000
    GDBGLTSSM = 0x01550442
    GPRTBIMAP_HS0 = 0x00000000
    GPRTBIMAP_HS1 = 0x00000000
    GPRTBIMAP_FS0 = 0x00000000
    GPRTBIMAP_FS1 = 0x00000000
    GUSB2PHYCFG(0) = 0x00002500
    GUSB2PHYCFG(1) = 0x00000000
    GUSB2PHYCFG(2) = 0x00000000
    GUSB2PHYCFG(3) = 0x00000000
    GUSB2PHYCFG(4) = 0x00000000
    GUSB2PHYCFG(5) = 0x00000000
    GUSB2PHYCFG(6) = 0x00000000
    GUSB2PHYCFG(7) = 0x00000000
    GUSB2PHYCFG(8) = 0x00000000
    GUSB2PHYCFG(9) = 0x00000000
    GUSB2PHYCFG(10) = 0x00000000
    GUSB2PHYCFG(11) = 0x00000000
    GUSB2PHYCFG(12) = 0x00000000
    GUSB2PHYCFG(13) = 0x00000000
    GUSB2PHYCFG(14) = 0x00000000
    GUSB2PHYCFG(15) = 0x00000000
    GUSB2I2CCTL(0) = 0x00000000
    GUSB2I2CCTL(1) = 0x00000000
    GUSB2I2CCTL(2) = 0x00000000
    GUSB2I2CCTL(3) = 0x00000000
    GUSB2I2CCTL(4) = 0x00000000
    GUSB2I2CCTL(5) = 0x00000000
    GUSB2I2CCTL(6) = 0x00000000
    GUSB2I2CCTL(7) = 0x00000000
    GUSB2I2CCTL(8) = 0x00000000
    GUSB2I2CCTL(9) = 0x00000000
    GUSB2I2CCTL(10) = 0x00000000
    GUSB2I2CCTL(11) = 0x00000000
    GUSB2I2CCTL(12) = 0x00000000
    GUSB2I2CCTL(13) = 0x00000000
    GUSB2I2CCTL(14) = 0x00000000
    GUSB2I2CCTL(15) = 0x00000000
    GUSB2PHYACC(0) = 0x00000000
    GUSB2PHYACC(1) = 0x00000000
    GUSB2PHYACC(2) = 0x00000000
    GUSB2PHYACC(3) = 0x00000000
    GUSB2PHYACC(4) = 0x00000000
    GUSB2PHYACC(5) = 0x00000000
    GUSB2PHYACC(6) = 0x00000000
    GUSB2PHYACC(7) = 0x00000000
    GUSB2PHYACC(8) = 0x00000000
    GUSB2PHYACC(9) = 0x00000000
    GUSB2PHYACC(10) = 0x00000000
    GUSB2PHYACC(11) = 0x00000000
    GUSB2PHYACC(12) = 0x00000000
    GUSB2PHYACC(13) = 0x00000000
    GUSB2PHYACC(14) = 0x00000000
    GUSB2PHYACC(15) = 0x00000000
    GUSB3PIPECTL(0) = 0x00040002
    GUSB3PIPECTL(1) = 0x00000000
    GUSB3PIPECTL(2) = 0x00000000
    GUSB3PIPECTL(3) = 0x00000000
    GUSB3PIPECTL(4) = 0x00000000
    GUSB3PIPECTL(5) = 0x00000000
    GUSB3PIPECTL(6) = 0x00000000
    GUSB3PIPECTL(7) = 0x00000000
    GUSB3PIPECTL(8) = 0x00000000
    GUSB3PIPECTL(9) = 0x00000000
    GUSB3PIPECTL(10) = 0x00000000
    GUSB3PIPECTL(11) = 0x00000000
    GUSB3PIPECTL(12) = 0x00000000
    GUSB3PIPECTL(13) = 0x00000000
    GUSB3PIPECTL(14) = 0x00000000
    GUSB3PIPECTL(15) = 0x00000000
    GTXFIFOSIZ(0) = 0x00000082
    GTXFIFOSIZ(1) = 0x00820103
    GTXFIFOSIZ(2) = 0x01850205
    GTXFIFOSIZ(3) = 0x038a0000
    GTXFIFOSIZ(4) = 0x038a0000
    GTXFIFOSIZ(5) = 0x038a0000
    GTXFIFOSIZ(6) = 0x038a0000
    GTXFIFOSIZ(7) = 0x038a0000
    GTXFIFOSIZ(8) = 0x038a0000
    GTXFIFOSIZ(9) = 0x038a0000
    GTXFIFOSIZ(10) = 0x038a0000
    GTXFIFOSIZ(11) = 0x038a0000
    GTXFIFOSIZ(12) = 0x038a0000
    GTXFIFOSIZ(13) = 0x038a0000
    GTXFIFOSIZ(14) = 0x038a0000
    GTXFIFOSIZ(15) = 0x038a0000
    GTXFIFOSIZ(16) = 0x00000000
    GTXFIFOSIZ(17) = 0x00000000
    GTXFIFOSIZ(18) = 0x00000000
    GTXFIFOSIZ(19) = 0x00000000
    GTXFIFOSIZ(20) = 0x00000000
    GTXFIFOSIZ(21) = 0x00000000
    GTXFIFOSIZ(22) = 0x00000000
    GTXFIFOSIZ(23) = 0x00000000
    GTXFIFOSIZ(24) = 0x00000000
    GTXFIFOSIZ(25) = 0x00000000
    GTXFIFOSIZ(26) = 0x00000000
    GTXFIFOSIZ(27) = 0x00000000
    GTXFIFOSIZ(28) = 0x00000000
    GTXFIFOSIZ(29) = 0x00000000
    GTXFIFOSIZ(30) = 0x00000000
    GTXFIFOSIZ(31) = 0x00000000
    GRXFIFOSIZ(0) = 0x071e0084
    GRXFIFOSIZ(1) = 0x07a20104
    GRXFIFOSIZ(2) = 0x08a60180
    GRXFIFOSIZ(3) = 0x00000000
    GRXFIFOSIZ(4) = 0x00000000
    GRXFIFOSIZ(5) = 0x00000000
    GRXFIFOSIZ(6) = 0x00000000
    GRXFIFOSIZ(7) = 0x00000000
    GRXFIFOSIZ(8) = 0x00000000
    GRXFIFOSIZ(9) = 0x00000000
    GRXFIFOSIZ(10) = 0x00000000
    GRXFIFOSIZ(11) = 0x00000000
    GRXFIFOSIZ(12) = 0x00000000
    GRXFIFOSIZ(13) = 0x00000000
    GRXFIFOSIZ(14) = 0x00000000
    GRXFIFOSIZ(15) = 0x00000000
    GRXFIFOSIZ(16) = 0x00000000
    GRXFIFOSIZ(17) = 0x00000000
    GRXFIFOSIZ(18) = 0x00000000
    GRXFIFOSIZ(19) = 0x00000000
    GRXFIFOSIZ(20) = 0x00000000
    GRXFIFOSIZ(21) = 0x00000000
    GRXFIFOSIZ(22) = 0x00000000
    GRXFIFOSIZ(23) = 0x00000000
    GRXFIFOSIZ(24) = 0x00000000
    GRXFIFOSIZ(25) = 0x00000000
    GRXFIFOSIZ(26) = 0x00000000
    GRXFIFOSIZ(27) = 0x00000000
    GRXFIFOSIZ(28) = 0x00000000
    GRXFIFOSIZ(29) = 0x00000000
    GRXFIFOSIZ(30) = 0x00000000
    GRXFIFOSIZ(31) = 0x00000000
    GEVNTADRLO(0) = 0x00000000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00000000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x00080800
    DCTL = 0x00000000
    DEVTEN = 0x00000000
    DSTS = 0x00d297c9
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000000
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR2(2) = 0xfd84c000
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR2(4) = 0xfd850000
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(0) = 0x00000002
    DEPCMDPAR1(1) = 0x00000000
    DEPCMDPAR1(2) = 0x00000000
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR1(4) = 0x00000000
    DEPCMDPAR1(5) = 0x00000000
    DEPCMDPAR1(6) = 0x00000000
    DEPCMDPAR1(7) = 0x00000000
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR1(9) = 0x00000000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR1(11) = 0x00000000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(0) = 0xfd84d001
    DEPCMDPAR0(1) = 0x00000000
    DEPCMDPAR0(2) = 0x00000040
    DEPCMDPAR0(3) = 0x00000000
    DEPCMDPAR0(4) = 0xfd84f000
    DEPCMDPAR0(5) = 0x00000000
    DEPCMDPAR0(6) = 0x00000000
    DEPCMDPAR0(7) = 0x00000000
    DEPCMDPAR0(8) = 0x00000000
    DEPCMDPAR0(9) = 0x00000000
    DEPCMDPAR0(10) = 0x00000000
    DEPCMDPAR0(11) = 0x00000000
    DEPCMDPAR0(12) = 0x00000000
    DEPCMDPAR0(13) = 0x00000000
    DEPCMDPAR0(14) = 0x00000000
    DEPCMDPAR0(15) = 0x00000000
    DEPCMDPAR0(16) = 0x00000000
    DEPCMDPAR0(17) = 0x00000000
    DEPCMDPAR0(18) = 0x00000000
    DEPCMDPAR0(19) = 0x00000000
    DEPCMDPAR0(20) = 0x00000000
    DEPCMDPAR0(21) = 0x00000000
    DEPCMDPAR0(22) = 0x00000000
    DEPCMDPAR0(23) = 0x00000000
    DEPCMDPAR0(24) = 0x00000000
    DEPCMDPAR0(25) = 0x00000000
    DEPCMDPAR0(26) = 0x00000000
    DEPCMDPAR0(27) = 0x00000000
    DEPCMDPAR0(28) = 0x00000000
    DEPCMDPAR0(29) = 0x00000000
    DEPCMDPAR0(30) = 0x00000000
    DEPCMDPAR0(31) = 0x00000000
    DEPCMD(0) = 0x00000000
    DEPCMD(1) = 0x00000000
    DEPCMD(2) = 0x00000000
    DEPCMD(3) = 0x00000000
    DEPCMD(4) = 0x00000000
    DEPCMD(5) = 0x00000000
    DEPCMD(6) = 0x00000000
    DEPCMD(7) = 0x00000000
    DEPCMD(8) = 0x00000000
    DEPCMD(9) = 0x00000000
    DEPCMD(10) = 0x00000000
    DEPCMD(11) = 0x00000000
    DEPCMD(12) = 0x00000000
    DEPCMD(13) = 0x00000000
    DEPCMD(14) = 0x00000000
    DEPCMD(15) = 0x00000000
    DEPCMD(16) = 0x00000000
    DEPCMD(17) = 0x00000000
    DEPCMD(18) = 0x00000000
    DEPCMD(19) = 0x00000000
    DEPCMD(20) = 0x00000000
    DEPCMD(21) = 0x00000000
    DEPCMD(22) = 0x00000000
    DEPCMD(23) = 0x00000000
    DEPCMD(24) = 0x00000000
    DEPCMD(25) = 0x00000000
    DEPCMD(26) = 0x00000000
    DEPCMD(27) = 0x00000000
    DEPCMD(28) = 0x00000000
    DEPCMD(29) = 0x00000000
    DEPCMD(30) = 0x00000000
    DEPCMD(31) = 0x00000000
    OCFG = 0x00000000
    OCTL = 0x00000040
    OEVT = 0x00000000
    OEVTEN = 0x00000000
    OSTS = 0x00000008
    
    after plus seagate.txt
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25801000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x00040420
    GUCTL = 0x00008010
    GBUSERRADDR0 = 0x00000000
    GBUSERRADDR1 = 0x00000000
    GPRTBIMAP0 = 0x00000000
    GPRTBIMAP1 = 0x00000000
    GHWPARAMS0 = 0x202040ca
    GHWPARAMS1 = 0x01c0c93b
    GHWPARAMS2 = 0x00000000
    GHWPARAMS3 = 0x1042008d
    GHWPARAMS4 = 0x48822004
    GHWPARAMS5 = 0x04202088
    GHWPARAMS6 = 0x0b000c20
    GHWPARAMS7 = 0x03080780
    GDBGFIFOSPACE = 0x00820000
    GDBGLTSSM = 0x01550442
    GPRTBIMAP_HS0 = 0x00000000
    GPRTBIMAP_HS1 = 0x00000000
    GPRTBIMAP_FS0 = 0x00000000
    GPRTBIMAP_FS1 = 0x00000000
    GUSB2PHYCFG(0) = 0x00002500
    GUSB2PHYCFG(1) = 0x00000000
    GUSB2PHYCFG(2) = 0x00000000
    GUSB2PHYCFG(3) = 0x00000000
    GUSB2PHYCFG(4) = 0x00000000
    GUSB2PHYCFG(5) = 0x00000000
    GUSB2PHYCFG(6) = 0x00000000
    GUSB2PHYCFG(7) = 0x00000000
    GUSB2PHYCFG(8) = 0x00000000
    GUSB2PHYCFG(9) = 0x00000000
    GUSB2PHYCFG(10) = 0x00000000
    GUSB2PHYCFG(11) = 0x00000000
    GUSB2PHYCFG(12) = 0x00000000
    GUSB2PHYCFG(13) = 0x00000000
    GUSB2PHYCFG(14) = 0x00000000
    GUSB2PHYCFG(15) = 0x00000000
    GUSB2I2CCTL(0) = 0x00000000
    GUSB2I2CCTL(1) = 0x00000000
    GUSB2I2CCTL(2) = 0x00000000
    GUSB2I2CCTL(3) = 0x00000000
    GUSB2I2CCTL(4) = 0x00000000
    GUSB2I2CCTL(5) = 0x00000000
    GUSB2I2CCTL(6) = 0x00000000
    GUSB2I2CCTL(7) = 0x00000000
    GUSB2I2CCTL(8) = 0x00000000
    GUSB2I2CCTL(9) = 0x00000000
    GUSB2I2CCTL(10) = 0x00000000
    GUSB2I2CCTL(11) = 0x00000000
    GUSB2I2CCTL(12) = 0x00000000
    GUSB2I2CCTL(13) = 0x00000000
    GUSB2I2CCTL(14) = 0x00000000
    GUSB2I2CCTL(15) = 0x00000000
    GUSB2PHYACC(0) = 0x00000000
    GUSB2PHYACC(1) = 0x00000000
    GUSB2PHYACC(2) = 0x00000000
    GUSB2PHYACC(3) = 0x00000000
    GUSB2PHYACC(4) = 0x00000000
    GUSB2PHYACC(5) = 0x00000000
    GUSB2PHYACC(6) = 0x00000000
    GUSB2PHYACC(7) = 0x00000000
    GUSB2PHYACC(8) = 0x00000000
    GUSB2PHYACC(9) = 0x00000000
    GUSB2PHYACC(10) = 0x00000000
    GUSB2PHYACC(11) = 0x00000000
    GUSB2PHYACC(12) = 0x00000000
    GUSB2PHYACC(13) = 0x00000000
    GUSB2PHYACC(14) = 0x00000000
    GUSB2PHYACC(15) = 0x00000000
    GUSB3PIPECTL(0) = 0x00040002
    GUSB3PIPECTL(1) = 0x00000000
    GUSB3PIPECTL(2) = 0x00000000
    GUSB3PIPECTL(3) = 0x00000000
    GUSB3PIPECTL(4) = 0x00000000
    GUSB3PIPECTL(5) = 0x00000000
    GUSB3PIPECTL(6) = 0x00000000
    GUSB3PIPECTL(7) = 0x00000000
    GUSB3PIPECTL(8) = 0x00000000
    GUSB3PIPECTL(9) = 0x00000000
    GUSB3PIPECTL(10) = 0x00000000
    GUSB3PIPECTL(11) = 0x00000000
    GUSB3PIPECTL(12) = 0x00000000
    GUSB3PIPECTL(13) = 0x00000000
    GUSB3PIPECTL(14) = 0x00000000
    GUSB3PIPECTL(15) = 0x00000000
    GTXFIFOSIZ(0) = 0x00000082
    GTXFIFOSIZ(1) = 0x00820103
    GTXFIFOSIZ(2) = 0x01850205
    GTXFIFOSIZ(3) = 0x038a0000
    GTXFIFOSIZ(4) = 0x038a0000
    GTXFIFOSIZ(5) = 0x038a0000
    GTXFIFOSIZ(6) = 0x038a0000
    GTXFIFOSIZ(7) = 0x038a0000
    GTXFIFOSIZ(8) = 0x038a0000
    GTXFIFOSIZ(9) = 0x038a0000
    GTXFIFOSIZ(10) = 0x038a0000
    GTXFIFOSIZ(11) = 0x038a0000
    GTXFIFOSIZ(12) = 0x038a0000
    GTXFIFOSIZ(13) = 0x038a0000
    GTXFIFOSIZ(14) = 0x038a0000
    GTXFIFOSIZ(15) = 0x038a0000
    GTXFIFOSIZ(16) = 0x00000000
    GTXFIFOSIZ(17) = 0x00000000
    GTXFIFOSIZ(18) = 0x00000000
    GTXFIFOSIZ(19) = 0x00000000
    GTXFIFOSIZ(20) = 0x00000000
    GTXFIFOSIZ(21) = 0x00000000
    GTXFIFOSIZ(22) = 0x00000000
    GTXFIFOSIZ(23) = 0x00000000
    GTXFIFOSIZ(24) = 0x00000000
    GTXFIFOSIZ(25) = 0x00000000
    GTXFIFOSIZ(26) = 0x00000000
    GTXFIFOSIZ(27) = 0x00000000
    GTXFIFOSIZ(28) = 0x00000000
    GTXFIFOSIZ(29) = 0x00000000
    GTXFIFOSIZ(30) = 0x00000000
    GTXFIFOSIZ(31) = 0x00000000
    GRXFIFOSIZ(0) = 0x071e0084
    GRXFIFOSIZ(1) = 0x07a20104
    GRXFIFOSIZ(2) = 0x08a60180
    GRXFIFOSIZ(3) = 0x00000000
    GRXFIFOSIZ(4) = 0x00000000
    GRXFIFOSIZ(5) = 0x00000000
    GRXFIFOSIZ(6) = 0x00000000
    GRXFIFOSIZ(7) = 0x00000000
    GRXFIFOSIZ(8) = 0x00000000
    GRXFIFOSIZ(9) = 0x00000000
    GRXFIFOSIZ(10) = 0x00000000
    GRXFIFOSIZ(11) = 0x00000000
    GRXFIFOSIZ(12) = 0x00000000
    GRXFIFOSIZ(13) = 0x00000000
    GRXFIFOSIZ(14) = 0x00000000
    GRXFIFOSIZ(15) = 0x00000000
    GRXFIFOSIZ(16) = 0x00000000
    GRXFIFOSIZ(17) = 0x00000000
    GRXFIFOSIZ(18) = 0x00000000
    GRXFIFOSIZ(19) = 0x00000000
    GRXFIFOSIZ(20) = 0x00000000
    GRXFIFOSIZ(21) = 0x00000000
    GRXFIFOSIZ(22) = 0x00000000
    GRXFIFOSIZ(23) = 0x00000000
    GRXFIFOSIZ(24) = 0x00000000
    GRXFIFOSIZ(25) = 0x00000000
    GRXFIFOSIZ(26) = 0x00000000
    GRXFIFOSIZ(27) = 0x00000000
    GRXFIFOSIZ(28) = 0x00000000
    GRXFIFOSIZ(29) = 0x00000000
    GRXFIFOSIZ(30) = 0x00000000
    GRXFIFOSIZ(31) = 0x00000000
    GEVNTADRLO(0) = 0x00000000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00000000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x00080800
    DCTL = 0x00000000
    DEVTEN = 0x00000000
    DSTS = 0x00d3ee69
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000000
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR2(2) = 0xfd84c000
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR2(4) = 0xfd850000
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(0) = 0x00000002
    DEPCMDPAR1(1) = 0x00000000
    DEPCMDPAR1(2) = 0x00000000
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR1(4) = 0x00000000
    DEPCMDPAR1(5) = 0x00000000
    DEPCMDPAR1(6) = 0x00000000
    DEPCMDPAR1(7) = 0x00000000
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR1(9) = 0x00000000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR1(11) = 0x00000000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(0) = 0xfd84d001
    DEPCMDPAR0(1) = 0x00000000
    DEPCMDPAR0(2) = 0x00000040
    DEPCMDPAR0(3) = 0x00000000
    DEPCMDPAR0(4) = 0xfd84f1a8
    DEPCMDPAR0(5) = 0x00000000
    DEPCMDPAR0(6) = 0x00000000
    DEPCMDPAR0(7) = 0x00000000
    DEPCMDPAR0(8) = 0x00000000
    DEPCMDPAR0(9) = 0x00000000
    DEPCMDPAR0(10) = 0x00000000
    DEPCMDPAR0(11) = 0x00000000
    DEPCMDPAR0(12) = 0x00000000
    DEPCMDPAR0(13) = 0x00000000
    DEPCMDPAR0(14) = 0x00000000
    DEPCMDPAR0(15) = 0x00000000
    DEPCMDPAR0(16) = 0x00000000
    DEPCMDPAR0(17) = 0x00000000
    DEPCMDPAR0(18) = 0x00000000
    DEPCMDPAR0(19) = 0x00000000
    DEPCMDPAR0(20) = 0x00000000
    DEPCMDPAR0(21) = 0x00000000
    DEPCMDPAR0(22) = 0x00000000
    DEPCMDPAR0(23) = 0x00000000
    DEPCMDPAR0(24) = 0x00000000
    DEPCMDPAR0(25) = 0x00000000
    DEPCMDPAR0(26) = 0x00000000
    DEPCMDPAR0(27) = 0x00000000
    DEPCMDPAR0(28) = 0x00000000
    DEPCMDPAR0(29) = 0x00000000
    DEPCMDPAR0(30) = 0x00000000
    DEPCMDPAR0(31) = 0x00000000
    DEPCMD(0) = 0x00000000
    DEPCMD(1) = 0x00000000
    DEPCMD(2) = 0x00000000
    DEPCMD(3) = 0x00000000
    DEPCMD(4) = 0x00000000
    DEPCMD(5) = 0x00000000
    DEPCMD(6) = 0x00000000
    DEPCMD(7) = 0x00000000
    DEPCMD(8) = 0x00000000
    DEPCMD(9) = 0x00000000
    DEPCMD(10) = 0x00000000
    DEPCMD(11) = 0x00000000
    DEPCMD(12) = 0x00000000
    DEPCMD(13) = 0x00000000
    DEPCMD(14) = 0x00000000
    DEPCMD(15) = 0x00000000
    DEPCMD(16) = 0x00000000
    DEPCMD(17) = 0x00000000
    DEPCMD(18) = 0x00000000
    DEPCMD(19) = 0x00000000
    DEPCMD(20) = 0x00000000
    DEPCMD(21) = 0x00000000
    DEPCMD(22) = 0x00000000
    DEPCMD(23) = 0x00000000
    DEPCMD(24) = 0x00000000
    DEPCMD(25) = 0x00000000
    DEPCMD(26) = 0x00000000
    DEPCMD(27) = 0x00000000
    DEPCMD(28) = 0x00000000
    DEPCMD(29) = 0x00000000
    DEPCMD(30) = 0x00000000
    DEPCMD(31) = 0x00000000
    OCFG = 0x00000000
    OCTL = 0x00000040
    OEVT = 0x00000000
    OEVTEN = 0x00000000
    OSTS = 0x00000008
    

  • Michael,

    Just realized those regdump are mainly for device mode, but we need to exam the host mode.

    Please run the script attached below on your board before and after plugged the drive, I only need to last two lines of its output which start with

    "PORTSC[2] [0x0a0002e0]:"

    dwcinfo.sh.txt
    #!/bin/bash
    
    # global variables:
    # g_cap_len	capacity register length
    # g_dboff	Doorbell offset
    # g_max_ports	Number of max ports
    # g_max_slots	Number of max slots
    # g_num_intrs	Number of interrupts
    # g_op_base	Base offset of Opertational registers
    # g_rtsoff	Runtime Space offset
    # g_xbase	xHCI base address
    # g_xecp	xHCI extended capabilities pointer
    # g_xver	xHCI version
    
    ### define register offset
    HCSPARAM1=0x04
    HCSPARAM2=0x08
    HCSPARAM3=0x0C
    HCCPARAM=0x10
    DBOFF=0x14
    RTSOFF=0x18
    
    debug() { [ "$V" = "1" ] && echo "DEBUG: $@" || true; }
    debugf() { [ "$V" = "1" ] && printf "DEBUG: $@" || true; }
    echof() { printf "$@" || true; }
    
    #
    # $1: register offset
    #
    xhci_readw() { devmem2 $((g_xbase + $1)) | tail -1 | cut -d: -f2; }
    
    #
    # get bitfield value in decimal
    # $1: input value to read bitfield from
    # $2: inclusive LSB of the bitfield
    # $3: inclusive SMB of the bitfield
    #
    get_bits_value()
    {
    	local _val=$1
    	local _start=$2
    	local _end=$3
    	local _ones=$((_end - _start + 1))
    	local _mask
    
    	_mask=$(((1 << _ones) - 1))
    	_mask=$((_mask << _start))
    	echo $(((_val & _mask) >> _start))
    }
    
    #
    # get bitfield value in hexdecimal
    # $1: input value to read bitfield from
    # $2: inclusive LSB of the bitfield
    # $3: inclusive SMB of the bitfield
    #
    get_bits_hex_value() { printf "0x%x" $(get_bit_value $1 $2 $3); }
    
    check_system()
    {
    	# TODO check devmem2
    	# TODO check xhci/dwc3 controller
    	debug "check system ok"
    }
    
    get_xhci_baseaddress()
    {
    	local _str
    
    	### TODO handling instance index
    	_str=$(find /sys/bus/platform/devices/ -iname 'xhci-hcd*' | head -1)
    	### TODO error handling
    	_str=$(readlink $_str)
    	_str=${_str%/*}		# cut off the trail filename
    	_str=${_str##*/}	# cut off leading dir names
    	g_xbase=0x${_str%.*}	# cut off '.usb' to get base address
    	debug "xHCI Base Address: $g_xbase"
    }
    
    # parset xHCI extended capabilities, xHCI Spec CH7
    parse_xECP()
    {
    	local _offset
    	local _next=0
    
    	[[ $g_xecp -ne 0 ]] || { echo "Error: g_xecp is 0."; return; }
    
    	_offset=$((g_xecp << 2))
    	while true; do
    		_offset=$((_offset + (_next << 2)))
    		_reg=$(xhci_readw $_offset)
    		_next=$(get_bits_value $_reg 8 15)
    		echof "xECP(0x%04x) -> [0x%08x]: \n" $_offset $_reg
    		[[ $_next -ne 0 ]] || break;
    	done
    }
    
    query_cap_registers()
    {
    	local _reg
    	local _var
    
    	# parse CAPLENGTH
    	_reg=$(xhci_readw 0)
    	debugf "CAPLENGTH: 0x%08x\n" $_reg
    	g_cap_len=$(get_bits_value $_reg 0 7)
    	g_op_base=$g_cap_len
    	_var=$(get_bits_value $_reg 16 23)
    	g_xver=$(get_bits_value $_reg 24 31).${_var}
    
    	# parse HCSPARAM1
    	_reg=$(xhci_readw $HCSPARAM1)
    	debugf "HCSPARAM1: 0x%08x\n" $_reg
    	g_max_slots=$(get_bits_value $_reg 0 7)
    	g_num_intrs=$(get_bits_value $_reg 8 18)
    	g_max_ports=$(get_bits_value $_reg 24 31)
    
    	# parse HCSPARAM2
    	_reg=$(xhci_readw $HCSPARAM2)
    	debugf "HCSPARAM2: 0x%08x\n" $_reg
    	# TODO parse HCSPARAM2
    
    	# parse HCSPARAM3
    	_reg=$(xhci_readw $HCSPARAM3)
    	debugf "HCSPARAM3: 0x%08x\n" $_reg
    	# TODO parse HCSPARAM3
    
    	g_dboff=$(xhci_readw $DBOFF)
    	g_rtsoff=$(xhci_readw $RTSOFF)
    
    	echo -n "xHCI version: $g_xver, max slots: $g_max_slots, "
    	echo "num of interrupters $g_num_intrs, max ports: $g_max_ports"
    	echof "Operational base: 0x%08x, " $g_op_base
    	echo "DoorBell offset: $g_dboff, Runtime Space offset: $g_rtsoff"
    
    	# parse HCCPARAM, xHCI Spec 5.3.6
    	_reg=$(xhci_readw $HCCPARAM)
    	echof "HCCPARAM [0x%08x]: " $_reg
    
    	# [b.31-16] xHCI Extended Capabilities Pointer
    	g_xecp=$(get_bits_value $_reg 16 31)
    	echof "xECP=0x%04x " $g_xecp
    
    	# [b.15-12] Max Primary Stream Array Size
    	_var=$(get_bits_value $_reg 12 15)
    	echo -n "MaxPSASize="$_var" "
    
    	# [b.7] No Secondary SID Support
    	_var=$(get_bits_value $_reg 7 7)
    	[[ $_var -eq 1 ]] && echo -n "| NSS " || echo -n "| nss "
    
    	# [b.6] Latency Tolerance Messaging Capability
    	_var=$(get_bits_value $_reg 6 6)
    	[[ $_var -eq 1 ]] && echo -n "LTC " || echo -n "ltc "
    
    	# [b.5] Light HC Reset Capability
    	_var=$(get_bits_value $_reg 5 5)
    	[[ $_var -eq 1 ]] && echo -n "LHRC " || echo -n "lhrc "
    
    	# [b.4] Port Indicator
    	_var=$(get_bits_value $_reg 4 4)
    	[[ $_var -eq 1 ]] && echo -n "PIND " || echo -n "pind "
    
    	# [b.3] Port Power Control
    	_var=$(get_bits_value $_reg 3 3)
    	[[ $_var -eq 1 ]] && echo -n "PPC " || echo -n "ppc "
    
    	# [b.2] Context Size
    	_var=$(get_bits_value $_reg 2 2)
    	[[ $_var -eq 1 ]] && echo -n "CSZ64 " || echo -n "csz32 "
    
    	# [b.1] BW negotiation capability
    	_var=$(get_bits_value $_reg 1 1)
    	[[ $_var -eq 1 ]] && echo -n "BNC " || echo -n "bnc "
    
    	# [b.0] 64-bit addressing capability
    	_var=$(get_bits_value $_reg 0 0)
    	[[ $_var -eq 1 ]] && echo "AC64" || echo "ac64"
    
    	parse_xECP
    }
    
    # query USBCMD register
    query_op_usbcmd()
    {
    	local _reg
    	local _var
    
    	_reg=$(xhci_readw $((g_op_base + 0)))
    	echof "USBCMD [0x%08x]: " $_reg
    
    	# [b.11] Enable U3 MFINDEX Stop
    	_var=$(get_bits_value $_reg 11 11)
    	[[ $_var -eq 1 ]] && echo -n "EU3S " || true
    
    	# [b.10 ] Enable Wrap Event
    	_var=$(get_bits_value $_reg 10 10)
    	[[ $_var -eq 1 ]] && echo -n "EWE " || true
    
    	# [b.9 ] Controller Restore State
    	_var=$(get_bits_value $_reg 9 9)
    	[[ $_var -eq 1 ]] && echo -n "CRS " || true
    
    	# [b.8 ] Controller Save State
    	_var=$(get_bits_value $_reg 8 8)
    	[[ $_var -eq 1 ]] && echo -n "CSS " || true
    
    	# [b.7 ] Light Host Controller Reset
    	_var=$(get_bits_value $_reg 7 7)
    	[[ $_var -eq 1 ]] && echo -n "LHCRST " || true
    
    	# [b.3 ] Host System Error Enable
    	_var=$(get_bits_value $_reg 3 3)
    	[[ $_var -eq 1 ]] && echo -n "HSEE " || true
    
    	# [b.2 ] Interrupter Enable
    	_var=$(get_bits_value $_reg 2 2)
    	[[ $_var -eq 1 ]] && echo -n "INTE " || true
    
    	# [b.1 ] Host Controller Reset
    	_var=$(get_bits_value $_reg 1 1)
    	[[ $_var -eq 1 ]] && echo -n "HCRST " || true
    
    	# [b.0] Run/Stop
    	_var=$(get_bits_value $_reg 0 0)
    	[[ $_var -eq 1 ]] && echo "Run" || echo "Stop"
    }
    
    # query USBSTS register
    query_op_usbsts()
    {
    	local _reg
    	local _var
    
    	_reg=$(xhci_readw $((g_op_base + 4)))
    	echof "USBSTS [0x%08x]: " $_reg
    
    	# [b.12] Host Controller Error
    	_var=$(get_bits_value $_reg 12 12)
    	[[ $_var -eq 1 ]] && echo -n "HCE " || true
    
    	# [b.11] Controller Not Ready
    	_var=$(get_bits_value $_reg 11 11)
    	[[ $_var -eq 1 ]] && echo -n "CNR " || true
    
    	# [b.10 ] Save/Restore Error
    	_var=$(get_bits_value $_reg 10 10)
    	[[ $_var -eq 1 ]] && echo -n "SRE " || true
    
    	# [b.9 ] Restore State Status
    	_var=$(get_bits_value $_reg 9 9)
    	[[ $_var -eq 1 ]] && echo -n "RSS " || true
    
    	# [b.8 ] Save State Status
    	_var=$(get_bits_value $_reg 8 8)
    	[[ $_var -eq 1 ]] && echo -n "SSS " || true
    
    	# [b.4 ] Port Change Detect
    	_var=$(get_bits_value $_reg 4 4)
    	[[ $_var -eq 1 ]] && echo -n "PCD " || true
    
    	# [b.3 ] Event Interrupt
    	_var=$(get_bits_value $_reg 3 3)
    	[[ $_var -eq 1 ]] && echo -n "EINT " || true
    
    	# [b.2 ] Host System Error
    	_var=$(get_bits_value $_reg 2 2)
    	[[ $_var -eq 1 ]] && echo -n "HSE " || true
    
    	# [b.0] HC Halted
    	_var=$(get_bits_value $_reg 0 0)
    	[[ $_var -eq 1 ]] && echo "HCH" || echo
    }
    
    # query PAGESIZE register
    query_op_pagesize()
    {
    	local _reg
    	local _var
    
    	_reg=$(xhci_readw $((g_op_base + 8)))
    	# [b.15:0] PageSize: 2^(n+12), if bit n is set
    	_var=$(get_bits_value $_reg 0 15)
    	echof "PAGESIZE [0x%08x]\n" $_var
    }
    
    # query CONFIG register
    query_op_config()
    {
    	local _reg
    	local _var
    
    	_reg=$(xhci_readw $((g_op_base + 0x38)))
    	# [b.7:0] Max device slots enabled
    	_var=$(get_bits_value $_reg 0 7)
    	echof "CONFIG [0x%08x]: MaxSlotsEn:%d\n" $_reg $_var
    }
    
    # query PORTSC register
    query_op_portsc()
    {
    	local _reg
    	local _var
    	local _idx=1
    
    	while [[ $_idx -le $g_max_ports ]]; do
    		_reg=$(xhci_readw $((g_op_base + 0x400 + 0x10 * (_idx -1))))
    		echof "PORTSC[%d] [0x%08x]: " $_idx $_reg
    		: $((_idx += 1))
    
    		# parse portsc
    		# [b.30] Device Removable
    		_var=$(get_bits_value $_reg 30 30)
    		[[ $_var -eq 1 ]] && echo -n "DR " || echo -n "dr "
    
    		# [b.27] Wake on Over-current Enable
    		_var=$(get_bits_value $_reg 27 27)
    		[[ $_var -eq 1 ]] && echo -n "WOE " || echo -n "woe "
    
    		# [b.26] Wake on Disconnect Enable
    		_var=$(get_bits_value $_reg 26 26)
    		[[ $_var -eq 1 ]] && echo -n "WDE " || echo -n "wde "
    
    		# [b.25] Wake on Connect Enable
    		_var=$(get_bits_value $_reg 25 25)
    		[[ $_var -eq 1 ]] && echo -n "WCE " || echo -n "wce "
    
    		# [b.24] Cold Attach Status
    		_var=$(get_bits_value $_reg 24 24)
    		[[ $_var -eq 1 ]] && echo -n "CAS | " || echo -n "cas | "
    
    		# [b.23] Port Config Error Change
    		_var=$(get_bits_value $_reg 23 23)
    		[[ $_var -eq 1 ]] && echo -n "CEC " || echo -n "cec "
    
    		# [b.22] Port Link State Change
    		_var=$(get_bits_value $_reg 22 22)
    		[[ $_var -eq 1 ]] && echo -n "PLC " || echo -n "plc "
    
    		# [b.21] Port Reset Change
    		_var=$(get_bits_value $_reg 21 21)
    		[[ $_var -eq 1 ]] && echo -n "PRC " || echo -n "prc "
    
    		# [b.20] Over-current Change
    		_var=$(get_bits_value $_reg 20 20)
    		[[ $_var -eq 1 ]] && echo -n "OCC " || echo -n "occ "
    
    		# [b.19] Warm Port Reset Change
    		_var=$(get_bits_value $_reg 19 19)
    		[[ $_var -eq 1 ]] && echo -n "WRC " || echo -n "wrc "
    
    		# [b.18] Port Enabled/Disabled Change
    		_var=$(get_bits_value $_reg 18 18)
    		[[ $_var -eq 1 ]] && echo -n "PEC " || echo -n "pec "
    
    		# [b.17] Connect Status Change
    		_var=$(get_bits_value $_reg 17 17)
    		[[ $_var -eq 1 ]] && echo -n "CSC " || echo -n "csc "
    
    		# [b.16] Port Link State Write Strobe
    		_var=$(get_bits_value $_reg 16 16)
    		[[ $_var -eq 1 ]] && echo -n "LWS | " || echo -n "lws | "
    
    		# [b.15:14] Port Indicator Control
    		_var=$(get_bits_value $_reg 14 15)
    		case $_var in
    			0)  echo -n "PIC:off ";;
    			1)  echo -n "PIC:amber ";;
    			2)  echo -n "PIC:green ";;
    			3)  echo -n "PIC:undefined ";;
    		esac
    
    		# [b.13:10] Port Speed
    		_var=$(get_bits_value $_reg 10 13)
    		echof "PSI:%d " $_var
    
    		# [b.9] Port Power
    		_var=$(get_bits_value $_reg 9 9)
    		[[ $_var -eq 1 ]] && echo -n "PP | " || echo -n "pp | "
    
    		# [b.8:5] Port Link State
    		_var=$(get_bits_value $_reg 5 8)
    		case $_var in
    		     [0-3])  echo -n "PLS:U${_var} ";;
    			 4)  echo -n "PLS:Disabled ";;
    			 5)  echo -n "PLS:RxDetect ";;
    			 6)  echo -n "PLS:Inactive ";;
    			 7)  echo -n "PLS:Polling ";;
    			 8)  echo -n "PLS:Recovery ";;
    			 9)  echo -n "PLS:Hot_Reset ";;
    			10)  echo -n "PLS:Compliance_mode ";;
    		   [12-14])  echo -n "PLS:rsvd ";;
    			15)  echo -n "PLS:Resume ";;
    		esac
    
    		# [b.4] Port Reset
    		_var=$(get_bits_value $_reg 4 4)
    		[[ $_var -eq 1 ]] && echo -n "PR " || echo -n "pr "
    
    		# [b.3] Over-current Active
    		_var=$(get_bits_value $_reg 3 3)
    		[[ $_var -eq 1 ]] && echo -n "OCA " || echo -n "oca "
    
    		# [b.1] Port Enabled/Disabled
    		_var=$(get_bits_value $_reg 1 1)
    		[[ $_var -eq 1 ]] && echo -n "PED " || echo -n "ped "
    
    		# [b.0] Current Connect Status
    		_var=$(get_bits_value $_reg 0 0)
    		[[ $_var -eq 1 ]] && echo "CCS " || echo "ccs "
    	done
    }
    
    # query PORTPMSC register
    query_op_portpmsc()
    {
    	local _reg
    	local _var
    	local _idx=1
    
    	while [[ $_idx -le $g_max_ports ]]; do
    		_reg=$(xhci_readw $((g_op_base + 0x404 + 0x10 * (_idx -1))))
    		echof "PORTPMSC[%d] [0x%08x]: " $_idx $_reg
    		[[ $_reg -eq 0 ]] || {
    			echo
    		}
    		echo
    		: $((_idx += 1))
    	done
    }
    
    ### main ###
    
    check_system
    get_xhci_baseaddress
    query_cap_registers
    query_op_usbcmd
    query_op_usbsts
    query_op_pagesize
    query_op_config
    query_op_portsc
    query_op_portpmsc
    

  • Done. I don't see any difference between before and after.

    results:

    BEFORE:
    root@am57xx-evm:~# ./dwcinfo.sh
    xHCI version: 1.0, max slots: 64, num of interrupters 1, max ports: 2
    Operational base: 0x00000020, DoorBell offset: 0x00000480, Runtime Space offset: 0x00000440
    HCCPARAM [0x0220f04c]: xECP=0x0220 MaxPSASize=15 | nss LTC lhrc pind PPC CSZ64 bnc ac64
    xECP(0x0880) -> [0x00000401]:
    xECP(0x0890) -> [0x02000402]:
    xECP(0x08a0) -> [0x03000002]:
    USBCMD [0x00000005]: INTE Run
    USBSTS [0x00000000]:
    PAGESIZE [0x00000001]
    CONFIG [0x00000040]: MaxSlotsEn:64
    PORTSC[1] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTSC[2] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTPMSC[1] [0x00000000]:
    PORTPMSC[2] [0x00000000]:
    AFTER:
    root@am57xx-evm:~# ./dwcinfo.sh
    xHCI version: 1.0, max slots: 64, num of interrupters 1, max ports: 2
    Operational base: 0x00000020, DoorBell offset: 0x00000480, Runtime Space offset: 0x00000440
    HCCPARAM [0x0220f04c]: xECP=0x0220 MaxPSASize=15 | nss LTC lhrc pind PPC CSZ64 bnc ac64
    xECP(0x0880) -> [0x00000401]:
    xECP(0x0890) -> [0x02000402]:
    xECP(0x08a0) -> [0x03000002]:
    USBCMD [0x00000005]: INTE Run
    USBSTS [0x00000000]:
    PAGESIZE [0x00000001]
    CONFIG [0x00000040]: MaxSlotsEn:64
    PORTSC[1] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTSC[2] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTPMSC[1] [0x00000000]:
    PORTPMSC[2] [0x00000000]:

  • PLS is RxDetect, the xHCI controller is in the right state to detect an attach, so I suspect this issue is hardware related.

    - Have you tested multiple boards?
    - Please test multiple USB3.0 devices, for example super-speed hub. I have one Sandisk super-speed thumb drive which does not enumerate on one of my AM57x boards.
    - Try if super-speed enumeration works in uboot: in uboot prompt, run 'usb reset' command, then followed by 'usb tree' command.
    - If none of above works, please check the assembly.
  • We've tried about 4 different devices, on multiple boards. Devices include a Tektronix USB3 tester. Please remember we saw no wiggling whatsoever on the SS differential signals when connected to the tester.
    I think I asked this before: how can we tell if the SuperSpeed PHY is powered up?
    Also, is permanently pulling GPIO7-25 low the correct thing to do?
    Haven't tried the UBOOT thing yet.
  • Your .config has 'CONFIG_TI_PIPE3=y', which is the driver for the super-speed PHY, so the PHY should be on.
    If you have USB1 dr_mode set to 'host' in your dts file, GPIO7-25 is irrelevant. And The register dump shows PLS is RxDetect, so xHCI is in the right state, I would check hardware assembly.
  • Please also measure the voltage on the USB 1.8V and 3.3V VDDA pins.

  • Oh, fer crying out loud. It's right there in the schematic above - the coupling caps (C367 & C368) are 0.01uF, should be 0.1uF.
    Had caps changed on one board. USB3 thumb drive detected. Does this look better?
    new dwcinfo results:

    BEFORE:
    root@am57xx-evm:~# ./dwcinfo.sh
    xHCI version: 1.0, max slots: 64, num of interrupters 1, max ports: 2
    Operational base: 0x00000020, DoorBell offset: 0x00000480, Runtime Space offset: 0x00000440
    HCCPARAM [0x0220f04c]: xECP=0x0220 MaxPSASize=15 | nss LTC lhrc pind PPC CSZ64 bnc ac64
    xECP(0x0880) -> [0x00000401]:
    xECP(0x0890) -> [0x02000402]:
    xECP(0x08a0) -> [0x03000002]:
    USBCMD [0x00000005]: INTE Run
    USBSTS [0x00000000]:
    PAGESIZE [0x00000001]
    CONFIG [0x00000040]: MaxSlotsEn:64
    PORTSC[1] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTSC[2] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTPMSC[1] [0x00000000]:
    PORTPMSC[2] [0x00000000]:

    PLUG DETECTED:
    root@am57xx-evm:~# [ 3428.409291] usb 2-1: new SuperSpeed USB device number 3 using xhci-hcd
    [ 3428.434836] usb 2-1: New USB device found, idVendor=090c, idProduct=1000
    [ 3428.441621] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 3428.448788] usb 2-1: Product: Flash Drive
    [ 3428.452894] usb 2-1: Manufacturer: Samsung
    [ 3428.457098] usb 2-1: SerialNumber: 0347017020005570
    [ 3428.465184] usb-storage 2-1:1.0: USB Mass Storage device detected
    [ 3428.481686] scsi host2: usb-storage 2-1:1.0
    [ 3429.812803] scsi 2:0:0:0: Direct-Access Samsung Flash Drive 1100 PQ: 0 ANSI: 6
    [ 3429.824094] sd 2:0:0:0: [sda] 250675200 512-byte logical blocks: (128 GB/120 GiB)
    [ 3429.832315] sd 2:0:0:0: [sda] Write Protect is off
    [ 3429.840375] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 3429.855234] sda: sda1
    [ 3429.861736] sd 2:0:0:0: [sda] Attached SCSI removable disk
    [ 3431.199211] EXT4-fs (sda1): recovery complete
    [ 3431.203601] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

    AFTER:
    root@am57xx-evm:~# ./dwcinfo.sh
    xHCI version: 1.0, max slots: 64, num of interrupters 1, max ports: 2
    Operational base: 0x00000020, DoorBell offset: 0x00000480, Runtime Space offset: 0x00000440
    HCCPARAM [0x0220f04c]: xECP=0x0220 MaxPSASize=15 | nss LTC lhrc pind PPC CSZ64 bnc ac64
    xECP(0x0880) -> [0x00000401]:
    xECP(0x0890) -> [0x02000402]:
    xECP(0x08a0) -> [0x03000002]:
    USBCMD [0x00000005]: INTE Run
    USBSTS [0x00000000]:
    PAGESIZE [0x00000001]
    CONFIG [0x00000040]: MaxSlotsEn:64
    PORTSC[1] [0x0a0002a0]: dr WOE wde WCE cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:0 PP | PLS:RxDetect pr oca ped ccs
    PORTSC[2] [0x00001203]: dr woe wde wce cas | cec plc prc occ wrc pec csc lws | PIC:off PSI:4 PP | PLS:U0 pr oca PED CCS
    PORTPMSC[1] [0x00000000]:
    PORTPMSC[2] [0x00000000]:
    root@am57xx-evm:~#

    At least 4 EEs reviewed this design, including TI AE, so watch out, folks!

    Cheers!
    MADman
  • Great! Glad you found it.

    The logs look good now.