MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET
authorSherry Sun <sherry.sun@nxp.com>
Tue, 23 Jul 2019 19:21:57 +0000 (15:21 -0400)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:28 +0000 (00:56 -0700)
commit24c896d4d2fab51abd287f1a991c68fc709d2458
tree47055f2e6a20275882716d858d4ed38128f3c12c
parent3574dd286fa008efac8e79a09e1ff40981ffc104
MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET

Convert the ci_udc driver to driver model by using the uclass
UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
PHY both are initialized by parsing the device tree nodes.

If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
if it does not defined, we can use ci_udc driver in its original Non-DM
way.

Move some USB PHY register definitions from ehci-mx6.c to
asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5c50d6bd6fda34827a27387e42c9a803da40b1e5)
arch/arm/include/asm/mach-imx/regs-usbphy.h
drivers/usb/gadget/ci_udc.c
drivers/usb/host/ehci-mx6.c
include/usb/ci_udc.h