diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-05-20 21:12:43 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-06-18 03:07:33 -0400 |
commit | 54e70bffd8575580a60a879692ba41931b927c52 (patch) | |
tree | 99e4bb21f0eacd0d25f103c8674f35794c63a07f /arch/arm/mach-pxa/vpac270.c | |
parent | 9b2dbdc7c98c7a6ae5935cc1b130c130a1074bec (diff) |
[ARM] pxa/vpac270: Add PMIC support
This patch adds support for the MAX1587A used on Voipac PXA270 board.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/vpac270.c')
-rw-r--r-- | arch/arm/mach-pxa/vpac270.c | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index fb4b801dab03..08115b318e3d 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dm9000.h> | 25 | #include <linux/dm9000.h> |
26 | #include <linux/ucb1400.h> | 26 | #include <linux/ucb1400.h> |
27 | #include <linux/ata_platform.h> | 27 | #include <linux/ata_platform.h> |
28 | #include <linux/regulator/max1586.h> | ||
28 | 29 | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
@@ -465,7 +466,6 @@ static struct i2c_board_info __initdata vpac270_i2c_devs[] = { | |||
465 | 466 | ||
466 | static void __init vpac270_rtc_init(void) | 467 | static void __init vpac270_rtc_init(void) |
467 | { | 468 | { |
468 | pxa_set_i2c_info(NULL); | ||
469 | i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs)); | 469 | i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs)); |
470 | } | 470 | } |
471 | #else | 471 | #else |
@@ -588,6 +588,59 @@ static inline void vpac270_ide_init(void) {} | |||
588 | #endif | 588 | #endif |
589 | 589 | ||
590 | /****************************************************************************** | 590 | /****************************************************************************** |
591 | * Core power regulator | ||
592 | ******************************************************************************/ | ||
593 | #if defined(CONFIG_REGULATOR_MAX1586) || \ | ||
594 | defined(CONFIG_REGULATOR_MAX1586_MODULE) | ||
595 | static struct regulator_consumer_supply vpac270_max1587a_consumers[] = { | ||
596 | { | ||
597 | .supply = "vcc_core", | ||
598 | } | ||
599 | }; | ||
600 | |||
601 | static struct regulator_init_data vpac270_max1587a_v3_info = { | ||
602 | .constraints = { | ||
603 | .name = "vcc_core range", | ||
604 | .min_uV = 900000, | ||
605 | .max_uV = 1705000, | ||
606 | .always_on = 1, | ||
607 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
608 | }, | ||
609 | .consumer_supplies = vpac270_max1587a_consumers, | ||
610 | .num_consumer_supplies = ARRAY_SIZE(vpac270_max1587a_consumers), | ||
611 | }; | ||
612 | |||
613 | static struct max1586_subdev_data vpac270_max1587a_subdevs[] = { | ||
614 | { | ||
615 | .name = "vcc_core", | ||
616 | .id = MAX1586_V3, | ||
617 | .platform_data = &vpac270_max1587a_v3_info, | ||
618 | } | ||
619 | }; | ||
620 | |||
621 | static struct max1586_platform_data vpac270_max1587a_info = { | ||
622 | .subdevs = vpac270_max1587a_subdevs, | ||
623 | .num_subdevs = ARRAY_SIZE(vpac270_max1587a_subdevs), | ||
624 | .v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */ | ||
625 | }; | ||
626 | |||
627 | static struct i2c_board_info __initdata vpac270_pi2c_board_info[] = { | ||
628 | { | ||
629 | I2C_BOARD_INFO("max1586", 0x14), | ||
630 | .platform_data = &vpac270_max1587a_info, | ||
631 | }, | ||
632 | }; | ||
633 | |||
634 | static void __init vpac270_pmic_init(void) | ||
635 | { | ||
636 | i2c_register_board_info(1, ARRAY_AND_SIZE(vpac270_pi2c_board_info)); | ||
637 | } | ||
638 | #else | ||
639 | static inline void vpac270_pmic_init(void) {} | ||
640 | #endif | ||
641 | |||
642 | |||
643 | /****************************************************************************** | ||
591 | * Machine init | 644 | * Machine init |
592 | ******************************************************************************/ | 645 | ******************************************************************************/ |
593 | static void __init vpac270_init(void) | 646 | static void __init vpac270_init(void) |
@@ -597,7 +650,10 @@ static void __init vpac270_init(void) | |||
597 | pxa_set_ffuart_info(NULL); | 650 | pxa_set_ffuart_info(NULL); |
598 | pxa_set_btuart_info(NULL); | 651 | pxa_set_btuart_info(NULL); |
599 | pxa_set_stuart_info(NULL); | 652 | pxa_set_stuart_info(NULL); |
653 | pxa_set_i2c_info(NULL); | ||
654 | pxa27x_set_i2c_power_info(NULL); | ||
600 | 655 | ||
656 | vpac270_pmic_init(); | ||
601 | vpac270_lcd_init(); | 657 | vpac270_lcd_init(); |
602 | vpac270_mmc_init(); | 658 | vpac270_mmc_init(); |
603 | vpac270_nor_init(); | 659 | vpac270_nor_init(); |