1
0
Fork 0

MLK-23412-3 usb: dwc3: imx8mp: do post role set for single role config

In case dwc3 is configured to be single role, we need to do the post
role set after dwc3 core probe.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Li Jun 2020-03-20 14:43:12 +08:00
parent cc2876fabf
commit cb2cfcc1a5
1 changed files with 5 additions and 0 deletions

View File

@ -212,6 +212,11 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
}
dwc->priv_data->set_role_post = dwc3_imx8mp_set_role_post;
if (dwc->dr_mode == USB_DR_MODE_HOST)
dwc->priv_data->set_role_post(dwc, DWC3_GCTL_PRTCAP_HOST);
else if (dwc->dr_mode == USB_DR_MODE_PERIPHERAL)
dwc->priv_data->set_role_post(dwc, DWC3_GCTL_PRTCAP_DEVICE);
device_init_wakeup(dev, 1);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);