aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-06-24 10:02:09 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-08-05 02:32:24 -0400
commit320bbb86b3645ff8b13c13849adc90cff6a8918c (patch)
tree59697ca864442d51b257b9731bcae4f06d047cd9 /arch/arm/mach-pxa
parent9c3fca2ee6a4a89a64ac72b8159ae5c2be6bb38f (diff)
[ARM] pxa/z2: Add regulator support
Register TPS65021 regulator in Zipit Z2. 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')
-rw-r--r--arch/arm/mach-pxa/z2.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index 967e8cb8d6fc..07d8bd8c4c61 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -27,6 +27,7 @@
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/gpio_keys.h> 28#include <linux/gpio_keys.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/regulator/machine.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -610,6 +611,75 @@ static inline void z2_spi_init(void) {}
610#endif 611#endif
611 612
612/****************************************************************************** 613/******************************************************************************
614 * Core power regulator
615 ******************************************************************************/
616#if defined(CONFIG_REGULATOR_TPS65023) || \
617 defined(CONFIG_REGULATOR_TPS65023_MODULE)
618static struct regulator_consumer_supply z2_tps65021_consumers[] = {
619 {
620 .supply = "vcc_core",
621 }
622};
623
624static struct regulator_init_data z2_tps65021_info[] = {
625 {
626 .constraints = {
627 .name = "vcc_core range",
628 .min_uV = 800000,
629 .max_uV = 1600000,
630 .always_on = 1,
631 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
632 },
633 .consumer_supplies = z2_tps65021_consumers,
634 .num_consumer_supplies = ARRAY_SIZE(z2_tps65021_consumers),
635 }, {
636 .constraints = {
637 .name = "DCDC2",
638 .min_uV = 3300000,
639 .max_uV = 3300000,
640 .always_on = 1,
641 },
642 }, {
643 .constraints = {
644 .name = "DCDC3",
645 .min_uV = 1800000,
646 .max_uV = 1800000,
647 .always_on = 1,
648 },
649 }, {
650 .constraints = {
651 .name = "LDO1",
652 .min_uV = 1000000,
653 .max_uV = 3150000,
654 .always_on = 1,
655 },
656 }, {
657 .constraints = {
658 .name = "LDO2",
659 .min_uV = 1050000,
660 .max_uV = 3300000,
661 .always_on = 1,
662 },
663 }
664};
665
666static struct i2c_board_info __initdata z2_pi2c_board_info[] = {
667 {
668 I2C_BOARD_INFO("tps65021", 0x48),
669 .platform_data = &z2_tps65021_info,
670 },
671};
672
673static void __init z2_pmic_init(void)
674{
675 pxa27x_set_i2c_power_info(NULL);
676 i2c_register_board_info(1, ARRAY_AND_SIZE(z2_pi2c_board_info));
677}
678#else
679static inline void z2_pmic_init(void) {}
680#endif
681
682/******************************************************************************
613 * Machine init 683 * Machine init
614 ******************************************************************************/ 684 ******************************************************************************/
615static void __init z2_init(void) 685static void __init z2_init(void)
@@ -629,6 +699,7 @@ static void __init z2_init(void)
629 z2_pwm_init(); 699 z2_pwm_init();
630 z2_leds_init(); 700 z2_leds_init();
631 z2_keys_init(); 701 z2_keys_init();
702 z2_pmic_init();
632} 703}
633 704
634MACHINE_START(ZIPIT2, "Zipit Z2") 705MACHINE_START(ZIPIT2, "Zipit Z2")