• Roger Quadros's avatar
    usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded · 169e3b68
    Roger Quadros authored
    On v3.10a in dual-role mode, if port is in device mode
    and gadget driver isn't loaded, the OTG event interrupts don't
    come through.
    
    It seems that if the core is configured to be OTG2.0 only,
    then we can't leave the DCFG.DEVSPD at Super-speed (default)
    if we expect OTG to work properly. It must be set to High-speed.
    
    Fix this issue by configuring DCFG.DEVSPD to the supported
    maximum speed at gadget init. Device tree still needs to provide
    correct supported maximum speed for this to work.
    
    This issue wasn't present on v2.40a but is seen on v3.10a.
    It doesn't cause any side effects on v2.40a.
    Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
    Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    169e3b68
gadget.c 85.4 KB