]> git.ipfire.org Git - people/arne_f/kernel.git/commit
usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded
authorRoger Quadros <rogerq@ti.com>
Thu, 10 Jan 2019 15:04:28 +0000 (17:04 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 28 Jan 2019 10:51:29 +0000 (12:51 +0200)
commit169e3b68cadb5775daca009ced4faf01ffd97dcf
treeb2d9301d52f637240e8f69f125683ba0e6d5e94b
parent1c1a3ddae9782ba748f5ceb775ed13ef554e8994
usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded

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: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c