ARM: imx/mx25_3ds: Add USB support
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 22 Dec 2010 14:25:32 +0000 (12:25 -0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 3 Jan 2011 09:17:12 +0000 (10:17 +0100)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/mach-mx25_3ds.c

index 9a715ce7c7b23ae751955c0266bb54d124133aa3..0449b80a6092c4ed3c81fbdf2b50aeaab1959aa4 100644 (file)
@@ -97,6 +97,7 @@ comment "MX25 platforms:"
 config MACH_MX25_3DS
        bool "Support MX25PDK (3DS) Platform"
        select SOC_IMX25
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_IMXDI_RTC
        select IMX_HAVE_PLATFORM_IMX_FB
index 8b8e75b9300011c357f9508f9a8dbf5d5a86a7d1..aa76cfd9f3484db941c02e875a76c5c56390faf9 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 #include <linux/input/matrix_keypad.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -184,13 +185,24 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initdata = {
        .keymap_size    = ARRAY_SIZE(mx25pdk_keymap),
 };
 
+static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
+       .portsc = MXC_EHCI_MODE_SERIAL,
+       .flags  = MXC_EHCI_INTERNAL_PHY,
+};
+
+static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
+       .operating_mode = FSL_USB2_DR_DEVICE,
+       .phy_mode       = FSL_USB2_PHY_UTMI,
+};
+
 static void __init mx25pdk_init(void)
 {
        mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
                        ARRAY_SIZE(mx25pdk_pads));
 
        imx25_add_imx_uart0(&uart_pdata);
-       imx25_add_mxc_ehci_hs(NULL);
+       imx25_add_fsl_usb2_udc(&otg_device_pdata);
+       imx25_add_mxc_ehci_hs(&usbh2_pdata);
        imx25_add_mxc_nand(&mx25pdk_nand_board_info);
        imx25_add_imxdi_rtc(NULL);
        imx25_add_imx_fb(&mx25pdk_fb_pdata);