diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-05-23 20:36:38 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:45:54 -0800 |
commit | 5eb9c631adab55804ce0b341a7749a529350aa51 (patch) | |
tree | e880d49f2160e8181f2d3b6b32d1b4da743b54f2 /arch | |
parent | 5e3afb14713f65642d84e6d1fe3706cd8c3e2541 (diff) |
arm: tegra: cardhu: Configuring DEV_SLP and gpio2 for A04
Configuring the tps6591x into DEV_SLP mode and
gpio2 of tps6591x into sleep mode for E1291-A04 board.
This is required in order to have the gpio2 follow the
'CORE_PWR_REQ' pin in E1291-A04. GPIO2 of tps6591x is
connected to the EN of the DC-DC converter which supply
core voltage.
bug 821295
Original-Change-Id: I01a8fa6c056872cff84dd0f2ae7601cee298ebcf
Reviewed-on: http://git-master/r/32614
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Rebase-Id: R7eb913eabd4b8a51a688eb3bd09dff1ffc5c9545
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index a906298bbc21..c85bd4cb11e6 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -334,6 +334,26 @@ static struct tps6591x_subdev_info tps_devs_e1198_skubit0_1[] = { #endif }; +#define TPS_GPIO_INIT_PDATA(gpio_nr, _init_apply, _sleep_en, _pulldn_en, _output_en, _output_val) \ + [gpio_nr] = { \ + .sleep_en = _sleep_en, \ + .pulldn_en = _pulldn_en, \ + .output_mode_en = _output_en, \ + .output_val = _output_val, \ + .init_apply = _init_apply, \ + } +static struct tps6591x_gpio_init_data tps_gpio_pdata_e1291_a04[] = { + TPS_GPIO_INIT_PDATA(0, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(1, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(2, 1, 1, 0, 1, 1), + TPS_GPIO_INIT_PDATA(3, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(4, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(5, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(6, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(7, 0, 0, 0, 0, 0), + TPS_GPIO_INIT_PDATA(8, 0, 0, 0, 0, 0), +}; + static struct tps6591x_platform_data tps_platform = { .irq_base = TPS6591X_IRQ_BASE, .gpio_base = TPS6591X_GPIO_BASE, @@ -416,6 +436,14 @@ int __init cardhu_regulator_init(void) } } + /* E1291-A04: Enable DEV_SLP and enable sleep on GPIO2 */ + if ((board_info.board_id == BOARD_E1291) && (board_info.fab == 0x4)) { + tps_platform.dev_slp_en = true; + tps_platform.gpio_init_data = tps_gpio_pdata_e1291_a04; + tps_platform.num_gpioinit_data = + ARRAY_SIZE(tps_gpio_pdata_e1291_a04); + } + i2c_register_board_info(4, cardhu_regulators, 1); /* Resgister the TPS6236x for all boards whose sku bit 0 is set. */ |