diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3stalker.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 99 |
1 files changed, 19 insertions, 80 deletions
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 0c108a212ea2..8e104980ea26 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include "sdram-micron-mt46h32m32lf-6.h" | 52 | #include "sdram-micron-mt46h32m32lf-6.h" |
53 | #include "mux.h" | 53 | #include "mux.h" |
54 | #include "hsmmc.h" | 54 | #include "hsmmc.h" |
55 | #include "timer-gp.h" | ||
56 | #include "common-board-devices.h" | 55 | #include "common-board-devices.h" |
57 | 56 | ||
58 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 57 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { | |||
206 | .default_device = &omap3_stalker_dvi_device, | 205 | .default_device = &omap3_stalker_dvi_device, |
207 | }; | 206 | }; |
208 | 207 | ||
209 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { | 208 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = { |
210 | .supply = "vmmc", | 209 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
211 | }; | 210 | }; |
212 | 211 | ||
213 | static struct regulator_consumer_supply omap3stalker_vsim_supply = { | 212 | static struct regulator_consumer_supply omap3stalker_vsim_supply[] = { |
214 | .supply = "vmmc_aux", | 213 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
215 | }; | 214 | }; |
216 | 215 | ||
217 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 216 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -224,8 +223,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = { | |||
224 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 223 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
225 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | 224 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, |
226 | }, | 225 | }, |
227 | .num_consumer_supplies = 1, | 226 | .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply), |
228 | .consumer_supplies = &omap3stalker_vmmc1_supply, | 227 | .consumer_supplies = omap3stalker_vmmc1_supply, |
229 | }; | 228 | }; |
230 | 229 | ||
231 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 230 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -238,8 +237,8 @@ static struct regulator_init_data omap3stalker_vsim = { | |||
238 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 237 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
239 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | 238 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, |
240 | }, | 239 | }, |
241 | .num_consumer_supplies = 1, | 240 | .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply), |
242 | .consumer_supplies = &omap3stalker_vsim_supply, | 241 | .consumer_supplies = omap3stalker_vsim_supply, |
243 | }; | 242 | }; |
244 | 243 | ||
245 | static struct omap2_hsmmc_info mmc[] = { | 244 | static struct omap2_hsmmc_info mmc[] = { |
@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, | |||
321 | mmc[0].gpio_cd = gpio + 0; | 320 | mmc[0].gpio_cd = gpio + 0; |
322 | omap2_hsmmc_init(mmc); | 321 | omap2_hsmmc_init(mmc); |
323 | 322 | ||
324 | /* link regulators to MMC adapters */ | ||
325 | omap3stalker_vmmc1_supply.dev = mmc[0].dev; | ||
326 | omap3stalker_vsim_supply.dev = mmc[0].dev; | ||
327 | |||
328 | /* | 323 | /* |
329 | * Most GPIOs are for USB OTG. Some are mostly sent to | 324 | * Most GPIOs are for USB OTG. Some are mostly sent to |
330 | * the P2 connector; notably LEDA for the LCD backlight. | 325 | * the P2 connector; notably LEDA for the LCD backlight. |
@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { | |||
354 | .setup = omap3stalker_twl_gpio_setup, | 349 | .setup = omap3stalker_twl_gpio_setup, |
355 | }; | 350 | }; |
356 | 351 | ||
357 | static struct twl4030_usb_data omap3stalker_usb_data = { | ||
358 | .usb_mode = T2_USB_MODE_ULPI, | ||
359 | }; | ||
360 | |||
361 | static uint32_t board_keymap[] = { | 352 | static uint32_t board_keymap[] = { |
362 | KEY(0, 0, KEY_LEFT), | 353 | KEY(0, 0, KEY_LEFT), |
363 | KEY(0, 1, KEY_DOWN), | 354 | KEY(0, 1, KEY_DOWN), |
@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = { | |||
392 | .rep = 1, | 383 | .rep = 1, |
393 | }; | 384 | }; |
394 | 385 | ||
395 | static struct twl4030_madc_platform_data omap3stalker_madc_data = { | ||
396 | .irq_line = 1, | ||
397 | }; | ||
398 | |||
399 | static struct twl4030_codec_audio_data omap3stalker_audio_data; | ||
400 | |||
401 | static struct twl4030_codec_data omap3stalker_codec_data = { | ||
402 | .audio_mclk = 26000000, | ||
403 | .audio = &omap3stalker_audio_data, | ||
404 | }; | ||
405 | |||
406 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = | ||
407 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
408 | |||
409 | /* VDAC for DSS driving S-Video */ | ||
410 | static struct regulator_init_data omap3_stalker_vdac = { | ||
411 | .constraints = { | ||
412 | .min_uV = 1800000, | ||
413 | .max_uV = 1800000, | ||
414 | .apply_uV = true, | ||
415 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
416 | | REGULATOR_MODE_STANDBY, | ||
417 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
418 | | REGULATOR_CHANGE_STATUS, | ||
419 | }, | ||
420 | .num_consumer_supplies = 1, | ||
421 | .consumer_supplies = &omap3_stalker_vdda_dac_supply, | ||
422 | }; | ||
423 | |||
424 | /* VPLL2 for digital video outputs */ | ||
425 | static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = { | ||
426 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
427 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
428 | }; | ||
429 | |||
430 | static struct regulator_init_data omap3_stalker_vpll2 = { | ||
431 | .constraints = { | ||
432 | .name = "VDVI", | ||
433 | .min_uV = 1800000, | ||
434 | .max_uV = 1800000, | ||
435 | .apply_uV = true, | ||
436 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
437 | | REGULATOR_MODE_STANDBY, | ||
438 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
439 | | REGULATOR_CHANGE_STATUS, | ||
440 | }, | ||
441 | .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies), | ||
442 | .consumer_supplies = omap3_stalker_vpll2_supplies, | ||
443 | }; | ||
444 | |||
445 | static struct twl4030_platform_data omap3stalker_twldata = { | 386 | static struct twl4030_platform_data omap3stalker_twldata = { |
446 | .irq_base = TWL4030_IRQ_BASE, | ||
447 | .irq_end = TWL4030_IRQ_END, | ||
448 | |||
449 | /* platform_data for children goes here */ | 387 | /* platform_data for children goes here */ |
450 | .keypad = &omap3stalker_kp_data, | 388 | .keypad = &omap3stalker_kp_data, |
451 | .madc = &omap3stalker_madc_data, | ||
452 | .usb = &omap3stalker_usb_data, | ||
453 | .gpio = &omap3stalker_gpio_data, | 389 | .gpio = &omap3stalker_gpio_data, |
454 | .codec = &omap3stalker_codec_data, | ||
455 | .vdac = &omap3_stalker_vdac, | ||
456 | .vpll2 = &omap3_stalker_vpll2, | ||
457 | .vmmc1 = &omap3stalker_vmmc1, | 390 | .vmmc1 = &omap3stalker_vmmc1, |
458 | .vsim = &omap3stalker_vsim, | 391 | .vsim = &omap3stalker_vsim, |
459 | }; | 392 | }; |
@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = { | |||
474 | 407 | ||
475 | static int __init omap3_stalker_i2c_init(void) | 408 | static int __init omap3_stalker_i2c_init(void) |
476 | { | 409 | { |
410 | omap3_pmic_get_config(&omap3stalker_twldata, | ||
411 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
412 | TWL_COMMON_PDATA_AUDIO, | ||
413 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
414 | |||
415 | omap3stalker_twldata.vdac->constraints.apply_uV = true; | ||
416 | omap3stalker_twldata.vpll2->constraints.apply_uV = true; | ||
417 | omap3stalker_twldata.vpll2->constraints.name = "VDVI"; | ||
418 | |||
477 | omap3_pmic_init("twl4030", &omap3stalker_twldata); | 419 | omap3_pmic_init("twl4030", &omap3stalker_twldata); |
478 | omap_register_i2c_bus(2, 400, NULL, 0); | 420 | omap_register_i2c_bus(2, 400, NULL, 0); |
479 | omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, | 421 | omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, |
@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void) | |||
494 | 436 | ||
495 | static void __init omap3_stalker_init_irq(void) | 437 | static void __init omap3_stalker_init_irq(void) |
496 | { | 438 | { |
497 | omap_init_irq(); | 439 | omap3_init_irq(); |
498 | #ifdef CONFIG_OMAP_32K_TIMER | ||
499 | omap2_gp_clockevent_set_gptimer(12); | ||
500 | #endif | ||
501 | } | 440 | } |
502 | 441 | ||
503 | static struct platform_device *omap3_stalker_devices[] __initdata = { | 442 | static struct platform_device *omap3_stalker_devices[] __initdata = { |
@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
560 | .init_early = omap3_stalker_init_early, | 499 | .init_early = omap3_stalker_init_early, |
561 | .init_irq = omap3_stalker_init_irq, | 500 | .init_irq = omap3_stalker_init_irq, |
562 | .init_machine = omap3_stalker_init, | 501 | .init_machine = omap3_stalker_init, |
563 | .timer = &omap_timer, | 502 | .timer = &omap3_secure_timer, |
564 | MACHINE_END | 503 | MACHINE_END |