提交 169e3b68 编写于 作者: R Roger Quadros 提交者: Felipe Balbi

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: NRoger Quadros <rogerq@ti.com>
Signed-off-by: NSekhar Nori <nsekhar@ti.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 1c1a3dda
......@@ -3339,6 +3339,8 @@ int dwc3_gadget_init(struct dwc3 *dwc)
goto err4;
}
dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed);
return 0;
err4:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册