summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-05-23 20:36:38 +0530
committerNiket Sirsi <nsirsi@nvidia.com>2011-05-27 15:43:05 -0700
commit6cd522b4e41f2e3e29273d968360c74e5791f453 (patch)
treee378a26d5a5bccf1641f0f609d87a605b01cd7ec
parent098ea391265043dc10ca5023b5881fd0d3a2c34d (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 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>
-rw-r--r--arch/arm/mach-tegra/board-cardhu-power.c28
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. */