UpSquared failed to go super speed in device mode

toumoutoumou Posts: 6New Member

Hi folks

I am facing an issue with the USB 3.0 OTG port of my Up2 board.

In host mode, using the USB3.0 OTG cable (OPT-UP-CABLE-USB-001), every thing works fine. USB 3.0 Devices are detected in SuperSpeed.

But in device mode, when I use a USB 3.0 Type-A to Micro-B cable, the Up2 fails to link in SuperSpeed and reverts to hi-speed. I have tried many kernels up to vanilla 4.18, multiple cables and multiples host computers (running linux or windows), without any improvements.

The UEFI firmware has been updated to the latest version and the DWC3 IP seems to be version 2.6.

I choosed this particular board because my project mandatory requires USB 3.0 device mode support. This seems to be a recurrent issue on other boards. Is there a known solution ?

Thanks for your help

Comments

  • ccaldeccalde Posts: 172New Member, Emutex mod

    Hi @toumou ,

    You need to install the official Ubuntu kernel for UP2 board to get your OTG working.
    Please, check here:
    https://wiki.up-community.org/Ubuntu
    Also, you can check your USB OTG in device mode here:
    https://wiki.up-community.org/Serial_console#Ubuntu

    Cheers!

  • toumoutoumou Posts: 6New Member

    Hi @ccalde

    I followed your instruction and this particular kernel version doesn't solve the issue. In device mode, the UP2 board fails to connect in SuperSpeed, like all other kernel I tried.

    According to drivers/usb/dwc3/core.h from Linux kernel :

    /* Device Registers */
    #define DWC3_DCFG 0xc700
    #define DWC3_DSTS 0xc70c

    /* Device Configuration Register */
    #define DWC3_DCFG_SUPERSPEED (4 << 0)
    #define DWC3_DCFG_HIGHSPEED (0 << 0)

    /* Device Status Register */
    #define DWC3_DSTS_SUPERSPEED (4 << 0)
    #define DWC3_DSTS_HIGHSPEED (0 << 0)

    I dumped config and status registers of the DWC3 controller:

    [email protected]:~# lspci -s 0:15.1 -v
    00:15.1 USB controller: Intel Corporation Device 5aaa (rev 0b) (prog-if fe [USB Device])
    Subsystem: Intel Corporation Device 7270
    Flags: bus master, fast devsel, latency 0, IRQ 13
    Memory at 91000000 (64-bit, non-prefetchable) [size=2M]
    Memory at 91537000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: dwc3-pci
    Kernel modules: dwc3_pci

    [email protected]:~# devmem2 0x9100c700 w
    /dev/mem opened.
    Memory mapped at address 0x7fed4d12d000.
    Value at address 0x9100C700 (0x7fed4d12d700): 0x4E081C

    [email protected]:~# devmem2 0x9100c70c w
    /dev/mem opened.
    Memory mapped at address 0x7f35d53b2000.
    Value at address 0x9100C70C (0x7f35d53b270c): 0x828B40

    It is clear it requests a superspeed connection but current link fallbacks to hispeed.

  • toumoutoumou Posts: 6New Member

    If I plug a USB 3.0 stick on the OTG port with the OTG cable, everything is OK:

    [email protected]:~# devmem2 0x9100c700 w
    /dev/mem opened.
    Memory mapped at address 0x7fb8be342000.
    Value at address 0x9100C700 (0x7fb8be342700): 0x4E081C

    [email protected]:~# devmem2 0x9100c70c w
    /dev/mem opened.
    Memory mapped at address 0x7f97aed0f000.
    Value at address 0x9100C70C (0x7f97aed0f70c): 0x92DED4

  • ccaldeccalde Posts: 172New Member, Emutex mod

    Hi @toumou ,

    What do you mean? How did you resolve that issue?

    Just connecting other machine end to end in your OTG?

    Cheers!

  • toumoutoumou Posts: 6New Member
    edited September 7

    Hi

    No the issue isn't resolved !

    In host mode, USB 3.0 stick on the OTG port with the OTG cable :
    Device Config register : 0x4E081C -> bits [2:0] = 0b100 = 4 << 0 = Super Speed
    Device Status register : 0x92DED4 -> bits [2:0] = 0b100 = 4 << 0 = Super Speed

    In device mode, Up2 connected to desktop computer with USB 3.0 Type-A to Micro-B cable on OTG port :
    Device Config register : 0x4E081C -> bits [2:0] = 0b100 = 4 << 0 = Super Speed
    Device Status register : 0x828B40 -> bits [2:0] = 0b000 = 0 << 0 = High Speed

    How can I get the up2 working in device mode at super speed ?

  • toumoutoumou Posts: 6New Member

    Does anybody have been able to get the board working in device mode at superspeed ?

    If this is a known issue please let me know.

Sign In or Register to comment.