aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c156
1 files changed, 13 insertions, 143 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d396e2d..933b25bb10de 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -40,7 +40,6 @@
40 40
41#include "mux.h" 41#include "mux.h"
42#include "hsmmc.h" 42#include "hsmmc.h"
43#include "timer-gp.h"
44#include "control.h" 43#include "control.h"
45#include "common-board-devices.h" 44#include "common-board-devices.h"
46 45
@@ -295,9 +294,6 @@ static void __init omap_4430sdp_init_early(void)
295{ 294{
296 omap2_init_common_infrastructure(); 295 omap2_init_common_infrastructure();
297 omap2_init_common_devices(NULL, NULL); 296 omap2_init_common_devices(NULL, NULL);
298#ifdef CONFIG_OMAP_32K_TIMER
299 omap2_gp_clockevent_set_gptimer(1);
300#endif
301} 297}
302 298
303static struct omap_musb_board_data musb_board_data = { 299static struct omap_musb_board_data musb_board_data = {
@@ -306,14 +302,6 @@ static struct omap_musb_board_data musb_board_data = {
306 .power = 100, 302 .power = 100,
307}; 303};
308 304
309static struct twl4030_usb_data omap4_usbphy_data = {
310 .phy_init = omap4430_phy_init,
311 .phy_exit = omap4430_phy_exit,
312 .phy_power = omap4430_phy_power,
313 .phy_set_clock = omap4430_phy_set_clk,
314 .phy_suspend = omap4430_phy_suspend,
315};
316
317static struct omap2_hsmmc_info mmc[] = { 305static struct omap2_hsmmc_info mmc[] = {
318 { 306 {
319 .mmc = 2, 307 .mmc = 2,
@@ -333,16 +321,7 @@ static struct omap2_hsmmc_info mmc[] = {
333}; 321};
334 322
335static struct regulator_consumer_supply sdp4430_vaux_supply[] = { 323static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
336 { 324 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
337 .supply = "vmmc",
338 .dev_name = "omap_hsmmc.1",
339 },
340};
341static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
342 {
343 .supply = "vmmc",
344 .dev_name = "omap_hsmmc.0",
345 },
346}; 325};
347 326
348static int omap4_twl6030_hsmmc_late_init(struct device *dev) 327static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -399,65 +378,10 @@ static struct regulator_init_data sdp4430_vaux1 = {
399 | REGULATOR_CHANGE_MODE 378 | REGULATOR_CHANGE_MODE
400 | REGULATOR_CHANGE_STATUS, 379 | REGULATOR_CHANGE_STATUS,
401 }, 380 },
402 .num_consumer_supplies = 1, 381 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
403 .consumer_supplies = sdp4430_vaux_supply, 382 .consumer_supplies = sdp4430_vaux_supply,
404}; 383};
405 384
406static struct regulator_init_data sdp4430_vaux2 = {
407 .constraints = {
408 .min_uV = 1200000,
409 .max_uV = 2800000,
410 .apply_uV = true,
411 .valid_modes_mask = REGULATOR_MODE_NORMAL
412 | REGULATOR_MODE_STANDBY,
413 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
414 | REGULATOR_CHANGE_MODE
415 | REGULATOR_CHANGE_STATUS,
416 },
417};
418
419static struct regulator_init_data sdp4430_vaux3 = {
420 .constraints = {
421 .min_uV = 1000000,
422 .max_uV = 3000000,
423 .apply_uV = true,
424 .valid_modes_mask = REGULATOR_MODE_NORMAL
425 | REGULATOR_MODE_STANDBY,
426 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
427 | REGULATOR_CHANGE_MODE
428 | REGULATOR_CHANGE_STATUS,
429 },
430};
431
432/* VMMC1 for MMC1 card */
433static struct regulator_init_data sdp4430_vmmc = {
434 .constraints = {
435 .min_uV = 1200000,
436 .max_uV = 3000000,
437 .apply_uV = true,
438 .valid_modes_mask = REGULATOR_MODE_NORMAL
439 | REGULATOR_MODE_STANDBY,
440 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
441 | REGULATOR_CHANGE_MODE
442 | REGULATOR_CHANGE_STATUS,
443 },
444 .num_consumer_supplies = 1,
445 .consumer_supplies = sdp4430_vmmc_supply,
446};
447
448static struct regulator_init_data sdp4430_vpp = {
449 .constraints = {
450 .min_uV = 1800000,
451 .max_uV = 2500000,
452 .apply_uV = true,
453 .valid_modes_mask = REGULATOR_MODE_NORMAL
454 | REGULATOR_MODE_STANDBY,
455 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
456 | REGULATOR_CHANGE_MODE
457 | REGULATOR_CHANGE_STATUS,
458 },
459};
460
461static struct regulator_init_data sdp4430_vusim = { 385static struct regulator_init_data sdp4430_vusim = {
462 .constraints = { 386 .constraints = {
463 .min_uV = 1200000, 387 .min_uV = 1200000,
@@ -471,74 +395,10 @@ static struct regulator_init_data sdp4430_vusim = {
471 }, 395 },
472}; 396};
473 397
474static struct regulator_init_data sdp4430_vana = {
475 .constraints = {
476 .min_uV = 2100000,
477 .max_uV = 2100000,
478 .valid_modes_mask = REGULATOR_MODE_NORMAL
479 | REGULATOR_MODE_STANDBY,
480 .valid_ops_mask = REGULATOR_CHANGE_MODE
481 | REGULATOR_CHANGE_STATUS,
482 },
483};
484
485static struct regulator_init_data sdp4430_vcxio = {
486 .constraints = {
487 .min_uV = 1800000,
488 .max_uV = 1800000,
489 .valid_modes_mask = REGULATOR_MODE_NORMAL
490 | REGULATOR_MODE_STANDBY,
491 .valid_ops_mask = REGULATOR_CHANGE_MODE
492 | REGULATOR_CHANGE_STATUS,
493 },
494};
495
496static struct regulator_init_data sdp4430_vdac = {
497 .constraints = {
498 .min_uV = 1800000,
499 .max_uV = 1800000,
500 .valid_modes_mask = REGULATOR_MODE_NORMAL
501 | REGULATOR_MODE_STANDBY,
502 .valid_ops_mask = REGULATOR_CHANGE_MODE
503 | REGULATOR_CHANGE_STATUS,
504 },
505};
506
507static struct regulator_init_data sdp4430_vusb = {
508 .constraints = {
509 .min_uV = 3300000,
510 .max_uV = 3300000,
511 .apply_uV = true,
512 .valid_modes_mask = REGULATOR_MODE_NORMAL
513 | REGULATOR_MODE_STANDBY,
514 .valid_ops_mask = REGULATOR_CHANGE_MODE
515 | REGULATOR_CHANGE_STATUS,
516 },
517};
518
519static struct regulator_init_data sdp4430_clk32kg = {
520 .constraints = {
521 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
522 },
523};
524
525static struct twl4030_platform_data sdp4430_twldata = { 398static struct twl4030_platform_data sdp4430_twldata = {
526 .irq_base = TWL6030_IRQ_BASE,
527 .irq_end = TWL6030_IRQ_END,
528
529 /* Regulators */ 399 /* Regulators */
530 .vmmc = &sdp4430_vmmc,
531 .vpp = &sdp4430_vpp,
532 .vusim = &sdp4430_vusim, 400 .vusim = &sdp4430_vusim,
533 .vana = &sdp4430_vana,
534 .vcxio = &sdp4430_vcxio,
535 .vdac = &sdp4430_vdac,
536 .vusb = &sdp4430_vusb,
537 .vaux1 = &sdp4430_vaux1, 401 .vaux1 = &sdp4430_vaux1,
538 .vaux2 = &sdp4430_vaux2,
539 .vaux3 = &sdp4430_vaux3,
540 .clk32kg = &sdp4430_clk32kg,
541 .usb = &omap4_usbphy_data
542}; 402};
543 403
544static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { 404static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
@@ -556,6 +416,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
556}; 416};
557static int __init omap4_i2c_init(void) 417static int __init omap4_i2c_init(void)
558{ 418{
419 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
420 TWL_COMMON_REGULATOR_VDAC |
421 TWL_COMMON_REGULATOR_VAUX2 |
422 TWL_COMMON_REGULATOR_VAUX3 |
423 TWL_COMMON_REGULATOR_VMMC |
424 TWL_COMMON_REGULATOR_VPP |
425 TWL_COMMON_REGULATOR_VANA |
426 TWL_COMMON_REGULATOR_VCXIO |
427 TWL_COMMON_REGULATOR_VUSB |
428 TWL_COMMON_REGULATOR_CLK32KG);
559 omap4_pmic_init("twl6030", &sdp4430_twldata); 429 omap4_pmic_init("twl6030", &sdp4430_twldata);
560 omap_register_i2c_bus(2, 400, NULL, 0); 430 omap_register_i2c_bus(2, 400, NULL, 0);
561 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 431 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
@@ -773,5 +643,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
773 .init_early = omap_4430sdp_init_early, 643 .init_early = omap_4430sdp_init_early,
774 .init_irq = gic_init_irq, 644 .init_irq = gic_init_irq,
775 .init_machine = omap_4430sdp_init, 645 .init_machine = omap_4430sdp_init,
776 .timer = &omap_timer, 646 .timer = &omap4_timer,
777MACHINE_END 647MACHINE_END