0069-awake-rt305x-dwc2-controller.patch 563 B

123456789101112131415
  1. --- a/drivers/usb/dwc2/platform.c
  2. +++ b/drivers/usb/dwc2/platform.c
  3. @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat
  4. dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
  5. (unsigned long)res->start, hsotg->regs);
  6. + /* Enable USB port before any regs access */
  7. + if (dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) {
  8. + dwc2_writel(0x00, hsotg->regs + PCGCTL);
  9. + /* TODO: mdelay(25) here? vendor driver don't use it */
  10. + }
  11. +
  12. hsotg->dr_mode = usb_get_dr_mode(&dev->dev);
  13. if (IS_ENABLED(CONFIG_USB_DWC2_HOST) &&
  14. hsotg->dr_mode != USB_DR_MODE_HOST) {