usb: dwc3: meson-g12a: refactor usb init
authorNeil Armstrong <narmstrong@baylibre.com>
Thu, 16 Apr 2020 12:19:03 +0000 (14:19 +0200)
committerFelipe Balbi <balbi@kernel.org>
Mon, 25 May 2020 08:09:37 +0000 (11:09 +0300)
commit5b0ba0caaf3acc2665e58184349447eaa47bf3d5
tree757d23a72eb8c2698789bad7a6404d0cd5abf3f1
parent4ae2262e796653acd58100dc7a18be8f2ebce098
usb: dwc3: meson-g12a: refactor usb init

Refactor the USB init code patch to handle the Amlogic GXL/GXM needing
to initialize the OTG port as Peripheral mode for the DWC2 IP to probe
correctly.

A secondary, post_init callback is added to setup the OTG PHY mode after
powering up the PHYs and before probing the DWC2 and DWC3 controllers.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/dwc3-meson-g12a.c