]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit378c20d3b9d1a538f4f9989a451961f70ee63318
tree5def2217c6d56f45c0ef8a25b8c1bf2aea41f91f
parent333429e6f91dcec47f82f9a8b11dafe5ee717836
usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 169e3b68cadb5775daca009ced4faf01ffd97dcf ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/dwc3/gadget.c