From 89e5b67c36f5cdbd0f5b102cf901a40e4f499612 Mon Sep 17 00:00:00 2001 From: Xin Xie Date: Tue, 15 Mar 2011 12:05:25 -0700 Subject: ARM: tegra: ventana: use PWM-only mode on the SM1 Original-Change-Id: I77b3df9125208e687af02d321c1e3ff9b5c041ca Reviewed-on: http://git-master/r/23057 Reviewed-by: Xin Xie Tested-by: Xin Xie Reviewed-by: Varun Colbert Rebase-Id: Rc47774650bc007e8878110502a1c84375eae2925 --- arch/arm/mach-tegra/board-ventana-power.c | 37 +++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'arch/arm/mach-tegra/board-ventana-power.c') diff --git a/arch/arm/mach-tegra/board-ventana-power.c b/arch/arm/mach-tegra/board-ventana-power.c index d496b86117d9..daf89b8c8d8d 100644 --- a/arch/arm/mach-tegra/board-ventana-power.c +++ b/arch/arm/mach-tegra/board-ventana-power.c @@ -107,7 +107,15 @@ static struct regulator_consumer_supply tps658621_ldo9_supply[] = { REGULATOR_SUPPLY("avdd_amp", NULL), }; -#define REGULATOR_INIT(_id, _minmv, _maxmv, on) \ +/* + * Current TPS6586x is known for having a voltage glitch if current load changes + * from low to high in auto PWM/PFM mode for CPU's Vdd line. + */ +static struct tps6586x_settings sm1_config = { + .sm_pwm_mode = PWM_ONLY, +}; + +#define REGULATOR_INIT(_id, _minmv, _maxmv, on, config) \ { \ .constraints = { \ .min_uV = (_minmv)*1000, \ @@ -121,24 +129,25 @@ static struct regulator_consumer_supply tps658621_ldo9_supply[] = { }, \ .num_consumer_supplies = ARRAY_SIZE(tps658621_##_id##_supply),\ .consumer_supplies = tps658621_##_id##_supply, \ + .driver_data = config, \ } #define ON 1 #define OFF 0 -static struct regulator_init_data sm0_data = REGULATOR_INIT(sm0, 725, 1500, ON); -static struct regulator_init_data sm1_data = REGULATOR_INIT(sm1, 725, 1500, ON); -static struct regulator_init_data sm2_data = REGULATOR_INIT(sm2, 3000, 4550, ON); -static struct regulator_init_data ldo0_data = REGULATOR_INIT(ldo0, 1250, 3300, OFF); -static struct regulator_init_data ldo1_data = REGULATOR_INIT(ldo1, 725, 1500, ON); -static struct regulator_init_data ldo2_data = REGULATOR_INIT(ldo2, 725, 1500, OFF); -static struct regulator_init_data ldo3_data = REGULATOR_INIT(ldo3, 1250, 3300, OFF); -static struct regulator_init_data ldo4_data = REGULATOR_INIT(ldo4, 1700, 2475, OFF); -static struct regulator_init_data ldo5_data = REGULATOR_INIT(ldo5, 1250, 3300, ON); -static struct regulator_init_data ldo6_data = REGULATOR_INIT(ldo6, 1250, 1800, OFF); -static struct regulator_init_data ldo7_data = REGULATOR_INIT(ldo7, 1250, 3300, OFF); -static struct regulator_init_data ldo8_data = REGULATOR_INIT(ldo8, 1250, 3300, OFF); -static struct regulator_init_data ldo9_data = REGULATOR_INIT(ldo9, 1250, 3300, OFF); +static struct regulator_init_data sm0_data = REGULATOR_INIT(sm0, 725, 1500, ON, NULL); +static struct regulator_init_data sm1_data = REGULATOR_INIT(sm1, 725, 1500, ON, &sm1_config); +static struct regulator_init_data sm2_data = REGULATOR_INIT(sm2, 3000, 4550, ON, NULL); +static struct regulator_init_data ldo0_data = REGULATOR_INIT(ldo0, 1250, 3300, OFF, NULL); +static struct regulator_init_data ldo1_data = REGULATOR_INIT(ldo1, 725, 1500, ON, NULL); +static struct regulator_init_data ldo2_data = REGULATOR_INIT(ldo2, 725, 1500, OFF, NULL); +static struct regulator_init_data ldo3_data = REGULATOR_INIT(ldo3, 1250, 3300, OFF, NULL); +static struct regulator_init_data ldo4_data = REGULATOR_INIT(ldo4, 1700, 2475, OFF, NULL); +static struct regulator_init_data ldo5_data = REGULATOR_INIT(ldo5, 1250, 3300, ON, NULL); +static struct regulator_init_data ldo6_data = REGULATOR_INIT(ldo6, 1250, 1800, OFF, NULL); +static struct regulator_init_data ldo7_data = REGULATOR_INIT(ldo7, 1250, 3300, OFF, NULL); +static struct regulator_init_data ldo8_data = REGULATOR_INIT(ldo8, 1250, 3300, OFF, NULL); +static struct regulator_init_data ldo9_data = REGULATOR_INIT(ldo9, 1250, 3300, OFF, NULL); static struct tps6586x_rtc_platform_data rtc_data = { .irq = TEGRA_NR_IRQS + TPS6586X_INT_RTC_ALM1, -- cgit v1.2.3