UpSquared failed to go super speed in device mode

toumou
toumou New Member Posts: 8

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

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    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!

  • toumou
    toumou New Member Posts: 8

    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:

    root@up2:~# 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

    root@up2:~# devmem2 0x9100c700 w
    /dev/mem opened.
    Memory mapped at address 0x7fed4d12d000.
    Value at address 0x9100C700 (0x7fed4d12d700): 0x4E081C

    root@up2:~# 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.

  • toumou
    toumou New Member Posts: 8

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

    root@up2:~# devmem2 0x9100c700 w
    /dev/mem opened.
    Memory mapped at address 0x7fb8be342000.
    Value at address 0x9100C700 (0x7fb8be342700): 0x4E081C

    root@up2:~# devmem2 0x9100c70c w
    /dev/mem opened.
    Memory mapped at address 0x7f97aed0f000.
    Value at address 0x9100C70C (0x7f97aed0f70c): 0x92DED4

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @toumou ,

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

    Just connecting other machine end to end in your OTG?

    Cheers!

  • toumou
    toumou New Member Posts: 8
    edited September 2018

    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 ?

  • toumou
    toumou New Member Posts: 8

    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.

  • toumou
    toumou New Member Posts: 8

    Hi folks

    I received a Rock960 board the other day. This board is an Armv8 platform and has the same DWC3 USB3.0 OTG controller. This board works perfectly fine in device mode at super speed.

    I had a small chat with the DWC3 linux driver maintenair on the USB mailing list and he agrees with me there is something wrong with the up-board itself. Unfortunately I don't have an USB logic analyser for further investigation.

    It would be nice if upboard people could investigate and fix this issue.

    For my project, I will have to drop the up-squared board and replace it with something else...

  • joaomrq
    joaomrq New Member Posts: 4

    @toumou said:
    Hi folks

    I received a Rock960 board the other day. This board is an Armv8 platform and has the same DWC3 USB3.0 OTG controller. This board works perfectly fine in device mode at super speed.

    I had a small chat with the DWC3 linux driver maintenair on the USB mailing list and he agrees with me there is something wrong with the up-board itself. Unfortunately I don't have an USB logic analyser for further investigation.

    It would be nice if upboard people could investigate and fix this issue.

    For my project, I will have to drop the up-squared board and replace it with something else...

    I'm on the same point as you are.
    Only USB2.0 in device mode from this device.

    If there are no fixes regarding this, will have to switch suppliers, unfortunately.

  • RCK
    RCK New Member Posts: 2

    Any updates on a fix for this?

Privacy Policy