aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-mx27_3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-mx27_3ds.c')
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c43
1 files changed, 27 insertions, 16 deletions
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 164331518bd..614b3c00c4a 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -98,6 +98,9 @@ static const int mx27pdk_pins[] __initconst = {
98 PD22_PF_CSPI2_SCLK, 98 PD22_PF_CSPI2_SCLK,
99 PD23_PF_CSPI2_MISO, 99 PD23_PF_CSPI2_MISO,
100 PD24_PF_CSPI2_MOSI, 100 PD24_PF_CSPI2_MOSI,
101 /* I2C1 */
102 PD17_PF_I2C_DATA,
103 PD18_PF_I2C_CLK,
101}; 104};
102 105
103static const struct imxuart_platform_data uart_pdata __initconst = { 106static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -159,13 +162,15 @@ static int otg_phy_init(void)
159 return 0; 162 return 0;
160} 163}
161 164
162#if defined(CONFIG_USB_ULPI) 165static int mx27_3ds_otg_init(struct platform_device *pdev)
166{
167 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
168}
163 169
164static struct mxc_usbh_platform_data otg_pdata __initdata = { 170static struct mxc_usbh_platform_data otg_pdata __initdata = {
171 .init = mx27_3ds_otg_init,
165 .portsc = MXC_EHCI_MODE_ULPI, 172 .portsc = MXC_EHCI_MODE_ULPI,
166 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
167}; 173};
168#endif
169 174
170static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 175static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
171 .operating_mode = FSL_USB2_DR_DEVICE, 176 .operating_mode = FSL_USB2_DR_DEVICE,
@@ -216,7 +221,7 @@ static struct regulator_init_data vgen_init = {
216 .consumer_supplies = vgen_consumers, 221 .consumer_supplies = vgen_consumers,
217}; 222};
218 223
219static struct mc13783_regulator_init_data mx27_3ds_regulators[] = { 224static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
220 { 225 {
221 .id = MC13783_REG_VMMC1, 226 .id = MC13783_REG_VMMC1,
222 .init_data = &vmmc1_init, 227 .init_data = &vmmc1_init,
@@ -227,10 +232,10 @@ static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
227}; 232};
228 233
229/* MC13783 */ 234/* MC13783 */
230static struct mc13783_platform_data mc13783_pdata __initdata = { 235static struct mc13xxx_platform_data mc13783_pdata __initdata = {
231 .regulators = mx27_3ds_regulators, 236 .regulators = mx27_3ds_regulators,
232 .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), 237 .num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
233 .flags = MC13783_USE_REGULATOR, 238 .flags = MC13XXX_USE_REGULATOR,
234}; 239};
235 240
236/* SPI */ 241/* SPI */
@@ -253,6 +258,9 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
253 }, 258 },
254}; 259};
255 260
261static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = {
262 .bitrate = 100000,
263};
256 264
257static void __init mx27pdk_init(void) 265static void __init mx27pdk_init(void)
258{ 266{
@@ -265,14 +273,15 @@ static void __init mx27pdk_init(void)
265 imx27_add_mxc_mmc(0, &sdhc1_pdata); 273 imx27_add_mxc_mmc(0, &sdhc1_pdata);
266 imx27_add_imx2_wdt(NULL); 274 imx27_add_imx2_wdt(NULL);
267 otg_phy_init(); 275 otg_phy_init();
268#if defined(CONFIG_USB_ULPI) 276
269 if (otg_mode_host) { 277 if (otg_mode_host) {
270 otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 278 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
271 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 279 ULPI_OTG_DRVVBUS_EXT);
272 280
273 imx27_add_mxc_ehci_otg(&otg_pdata); 281 if (otg_pdata.otg)
282 imx27_add_mxc_ehci_otg(&otg_pdata);
274 } 283 }
275#endif 284
276 if (!otg_mode_host) 285 if (!otg_mode_host)
277 imx27_add_fsl_usb2_udc(&otg_device_pdata); 286 imx27_add_fsl_usb2_udc(&otg_device_pdata);
278 287
@@ -282,6 +291,7 @@ static void __init mx27pdk_init(void)
282 291
283 if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) 292 if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT))
284 pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); 293 pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n");
294 imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data);
285} 295}
286 296
287static void __init mx27pdk_timer_init(void) 297static void __init mx27pdk_timer_init(void)
@@ -295,9 +305,10 @@ static struct sys_timer mx27pdk_timer = {
295 305
296MACHINE_START(MX27_3DS, "Freescale MX27PDK") 306MACHINE_START(MX27_3DS, "Freescale MX27PDK")
297 /* maintainer: Freescale Semiconductor, Inc. */ 307 /* maintainer: Freescale Semiconductor, Inc. */
298 .boot_params = MX27_PHYS_OFFSET + 0x100, 308 .boot_params = MX27_PHYS_OFFSET + 0x100,
299 .map_io = mx27_map_io, 309 .map_io = mx27_map_io,
300 .init_irq = mx27_init_irq, 310 .init_early = imx27_init_early,
301 .init_machine = mx27pdk_init, 311 .init_irq = mx27_init_irq,
302 .timer = &mx27pdk_timer, 312 .timer = &mx27pdk_timer,
313 .init_machine = mx27pdk_init,
303MACHINE_END 314MACHINE_END