diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2011-04-21 09:43:48 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:27 -0800 |
commit | e87a6b275ecdcbd14ea4b412a2d47e15a2983d63 (patch) | |
tree | 3d1b797a1f213284066200f1f08ecf3b927d4d86 /arch/arm/mach-tegra/board-whistler-power.c | |
parent | 2280d866884faaa013f8f906153a705ef7c42a87 (diff) |
ARM: tegra: whistler: Power down/up core rail
program pwren signal of max8907c regulator to power down/up core rail on
deep sleep enter/exit deep sleep mode.
core_timer and core_off_timer changed as per K32.
separate_req set to false as whistler pmu has combined power requests.
Bug 817378
Change-Id: Ia95a61360079f919a039572cf8fd4597db9efd50
Reviewed-on: http://git-master/r/28435
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R690a39529c184fea5be02af9223f7479874fd3e4
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-power.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-power.c b/arch/arm/mach-tegra/board-whistler-power.c index 425a5e6d8828..bbfd4f529ad7 100644 --- a/arch/arm/mach-tegra/board-whistler-power.c +++ b/arch/arm/mach-tegra/board-whistler-power.c @@ -207,10 +207,27 @@ static struct platform_device *whistler_max8907c_power_devices[] = { &max8907c_LDO20_device, }; +static int whistler_max8907c_setup(void) +{ + int ret; + + /* + * Configure PWREN, and attach CPU V1 rail to it. + * TODO: h/w events (power cycle, reset, battery low) auto-disables PWREN. + * Only soft reset (not supported) requires s/w to disable PWREN explicitly + */ + ret = max8907c_pwr_en_config(); + if (ret != 0) + return ret; + + return max8907c_pwr_en_attach(); +} + static struct max8907c_platform_data max8907c_pdata = { .num_subdevs = ARRAY_SIZE(whistler_max8907c_power_devices), .subdevs = whistler_max8907c_power_devices, .irq_base = TEGRA_NR_IRQS, + .max8907c_setup = whistler_max8907c_setup, }; static struct i2c_board_info __initdata whistler_regulators[] = { @@ -225,9 +242,9 @@ static struct tegra_suspend_platform_data whistler_suspend_data = { .cpu_timer = 2000, .cpu_off_timer = 1000, .suspend_mode = TEGRA_SUSPEND_LP0, - .core_timer = 0x7e7e, - .core_off_timer = 0xf, - .separate_req = true, + .core_timer = 0x7e, + .core_off_timer = 0xc00, + .separate_req = false, .corereq_high = true, .sysclkreq_high = true, .wake_enb = TEGRA_WAKE_KBC_EVENT, @@ -255,6 +272,8 @@ int __init whistler_regulator_init(void) i2c_register_board_info(4, whistler_regulators, 1); + tegra_deep_sleep = max8907c_deep_sleep; + tegra_init_suspend(&whistler_suspend_data); return 0; |