aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c3
-rw-r--r--arch/arm/mach-mx3/mx31moboard-smartbot.c39
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx31moboard.h3
3 files changed, 41 insertions, 4 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index 4bb011afc2a3..33a8d35498a7 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -491,7 +491,8 @@ static void __init mxc_board_init(void)
491 mx31moboard_marxbot_init(); 491 mx31moboard_marxbot_init();
492 break; 492 break;
493 case MX31SMARTBOT: 493 case MX31SMARTBOT:
494 mx31moboard_smartbot_init(); 494 case MX31EYEBOT:
495 mx31moboard_smartbot_init(mx31moboard_baseboard);
495 break; 496 break;
496 default: 497 default:
497 printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", 498 printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n",
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c
index ac1a163a5b78..293eea6d9d97 100644
--- a/arch/arm/mach-mx3/mx31moboard-smartbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c
@@ -25,10 +25,16 @@
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/fsl_devices.h> 26#include <linux/fsl_devices.h>
27 27
28#include <linux/usb/otg.h>
29#include <linux/usb/ulpi.h>
30
28#include <mach/common.h> 31#include <mach/common.h>
29#include <mach/hardware.h> 32#include <mach/hardware.h>
30#include <mach/imx-uart.h> 33#include <mach/imx-uart.h>
31#include <mach/iomux-mx3.h> 34#include <mach/iomux-mx3.h>
35#include <mach/board-mx31moboard.h>
36#include <mach/mxc_ehci.h>
37#include <mach/ulpi.h>
32 38
33#include <media/soc_camera.h> 39#include <media/soc_camera.h>
34 40
@@ -122,6 +128,24 @@ static struct fsl_usb2_platform_data usb_pdata = {
122 .phy_mode = FSL_USB2_PHY_ULPI, 128 .phy_mode = FSL_USB2_PHY_ULPI,
123}; 129};
124 130
131#if defined(CONFIG_USB_ULPI)
132
133static struct mxc_usbh_platform_data otg_host_pdata = {
134 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
135 .flags = MXC_EHCI_POWER_PINS_ENABLED,
136};
137
138static int __init smartbot_otg_host_init(void)
139{
140 otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
141 USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
142
143 return mxc_register_device(&mxc_otg_host, &otg_host_pdata);
144}
145#else
146static inline int smartbot_otg_host_init(void) { return 0; }
147#endif
148
125#define POWER_EN IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1) 149#define POWER_EN IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)
126#define DSPIC_RST_B IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1) 150#define DSPIC_RST_B IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1)
127#define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_RI_DCE1) 151#define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_RI_DCE1)
@@ -152,7 +176,7 @@ static void smartbot_resets_init(void)
152/* 176/*
153 * system init for baseboard usage. Will be called by mx31moboard init. 177 * system init for baseboard usage. Will be called by mx31moboard init.
154 */ 178 */
155void __init mx31moboard_smartbot_init(void) 179void __init mx31moboard_smartbot_init(int board)
156{ 180{
157 printk(KERN_INFO "Initializing mx31smartbot peripherals\n"); 181 printk(KERN_INFO "Initializing mx31smartbot peripherals\n");
158 182
@@ -161,7 +185,18 @@ void __init mx31moboard_smartbot_init(void)
161 185
162 mxc_register_device(&mxc_uart_device1, &uart_pdata); 186 mxc_register_device(&mxc_uart_device1, &uart_pdata);
163 187
164 mxc_register_device(&mxc_otg_udc_device, &usb_pdata); 188
189 switch (board) {
190 case MX31SMARTBOT:
191 mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
192 break;
193 case MX31EYEBOT:
194 smartbot_otg_host_init();
195 break;
196 default:
197 printk(KERN_WARNING "Unknown board %d, USB OTG not initialized",
198 board);
199 }
165 200
166 smartbot_resets_init(); 201 smartbot_resets_init();
167 202
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h
index fc5fec9b55f0..36ff3cedee1a 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h
@@ -26,6 +26,7 @@ enum mx31moboard_boards {
26 MX31DEVBOARD = 1, 26 MX31DEVBOARD = 1,
27 MX31MARXBOT = 2, 27 MX31MARXBOT = 2,
28 MX31SMARTBOT = 3, 28 MX31SMARTBOT = 3,
29 MX31EYEBOT = 4,
29}; 30};
30 31
31/* 32/*
@@ -35,7 +36,7 @@ enum mx31moboard_boards {
35 36
36extern void mx31moboard_devboard_init(void); 37extern void mx31moboard_devboard_init(void);
37extern void mx31moboard_marxbot_init(void); 38extern void mx31moboard_marxbot_init(void);
38extern void mx31moboard_smartbot_init(void); 39extern void mx31moboard_smartbot_init(int board);
39 40
40#endif 41#endif
41 42