ARM i.MX6: Add Chipidea support
This allows to register the USB ports for the chipidea driver. For now the otg/h1 register functions also register the corresponding USB phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
75e71639e0
commit
fdc5a0cbfc
|
@ -68,6 +68,7 @@ static int imx6_init(void)
|
|||
add_generic_device("imx31-gpio", 5, NULL, MX6_GPIO6_BASE_ADDR, 0x4000, IORESOURCE_MEM, NULL);
|
||||
add_generic_device("imx31-gpio", 6, NULL, MX6_GPIO7_BASE_ADDR, 0x4000, IORESOURCE_MEM, NULL);
|
||||
add_generic_device("imx21-wdt", 0, NULL, MX6_WDOG1_BASE_ADDR, 0x4000, IORESOURCE_MEM, NULL);
|
||||
add_generic_device("imx6-usb-misc", 0, NULL, MX6_USBOH3_USB_BASE_ADDR + 0x800, 0x100, IORESOURCE_MEM, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -69,3 +69,29 @@ static inline struct device_d *imx6_add_sata(void)
|
|||
{
|
||||
return add_generic_device("imx6-sata", 0, NULL, MX6_SATA_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
||||
}
|
||||
|
||||
static inline struct device_d *imx6_add_usbotg(void *pdata)
|
||||
{
|
||||
add_generic_device("imx-usb-phy", 0, NULL, MX6_USBPHY1_BASE_ADDR, 0x1000,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
||||
return imx_add_usb((void *)MX6_USBOH3_USB_BASE_ADDR, 0, pdata);
|
||||
}
|
||||
|
||||
static inline struct device_d *imx6_add_usbh1(void *pdata)
|
||||
{
|
||||
add_generic_device("imx-usb-phy", 1, NULL, MX6_USBPHY2_BASE_ADDR, 0x1000,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
||||
return imx_add_usb((void *)MX6_USBOH3_USB_BASE_ADDR + 0x200, 1, pdata);
|
||||
}
|
||||
|
||||
static inline struct device_d *imx6_add_usbh2(void *pdata)
|
||||
{
|
||||
return imx_add_usb((void *)MX6_USBOH3_USB_BASE_ADDR + 0x400, 2, pdata);
|
||||
}
|
||||
|
||||
static inline struct device_d *imx6_add_usbh3(void *pdata)
|
||||
{
|
||||
return imx_add_usb((void *)MX6_USBOH3_USB_BASE_ADDR + 0x600, 2, pdata);
|
||||
}
|
||||
|
|
|
@ -324,6 +324,12 @@ static __maybe_unused int mx5_initialize_usb_hw(void __iomem *base, int port,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static __maybe_unused int mx6_initialize_usb_hw(void __iomem *base, int port,
|
||||
unsigned int flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_device_id imx_usbmisc_ids[] = {
|
||||
#ifdef CONFIG_ARCH_IMX25
|
||||
{
|
||||
|
@ -360,6 +366,12 @@ static struct platform_device_id imx_usbmisc_ids[] = {
|
|||
.name = "imx53-usb-misc",
|
||||
.driver_data = (unsigned long)&mx5_initialize_usb_hw,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_IMX6
|
||||
{
|
||||
.name = "imx6-usb-misc",
|
||||
.driver_data = (unsigned long)&mx6_initialize_usb_hw,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
/* sentinel */
|
||||
|
|
Loading…
Reference in New Issue