diff options
author | Preetham Chandru <pchandru@nvidia.com> | 2011-12-19 15:09:27 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-30 10:51:58 +0530 |
commit | 93556c661e856495355ddbae5cc70a9e8e9adb89 (patch) | |
tree | 57b269a38e6eded25d6efa7018eb095bc3631ad0 /arch/arm/mach-tegra | |
parent | c7627fe8d01e90c66a469dfee6088c020f881210 (diff) |
arm: tegra3: Enable vbus1 & vbus3 for PM311 & PM305.
Enabled vbus1 & vbus3 for PM311 & PM305 boards. In PM311 & PM305 the gpios
used to enable vbu1 and vbus3 are TEGRA_GPIO_PCC7 & TEGRA_GPIO_PCC6
Bug: 914114
Change-Id: Id52cf6399526cb135968370478b5ac1bd53fe364
Signed-off-by: Preetham Chandru R
Reviewed-on: http://git-master/r/72409
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-pinmux.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 51 |
2 files changed, 63 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-pinmux.c b/arch/arm/mach-tegra/board-cardhu-pinmux.c index b836ccf6f591..6648c90e489f 100644 --- a/arch/arm/mach-tegra/board-cardhu-pinmux.c +++ b/arch/arm/mach-tegra/board-cardhu-pinmux.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/board-cardhu-pinmux.c * - * Copyright (C) 2010-2011 NVIDIA Corporation + * Copyright (C) 2011 NVIDIA Corporation * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -422,6 +422,13 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_e118x[] = { DEFAULT_PINMUX(GMI_AD15, NAND, PULL_UP, TRISTATE, INPUT), }; +static __initdata struct tegra_pingroup_config cardhu_pinmux_pm311[] = { + /* Power rails GPIO */ + DEFAULT_PINMUX(SPI2_SCK, SPI2, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(PEX_L2_RST_N, PCIE, PULL_UP, TRISTATE, INPUT), + DEFAULT_PINMUX(PEX_L2_CLKREQ_N, PCIE, PULL_UP, TRISTATE, INPUT), +}; + static __initdata struct tegra_pingroup_config cardhu_pinmux_cardhu[] = { DEFAULT_PINMUX(LCD_CS0_N, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_SCK, DISPLAYA, NORMAL, NORMAL, INPUT), @@ -652,8 +659,13 @@ int __init cardhu_pinmux_init(void) case BOARD_PM305: case BOARD_PM311: case BOARD_E1257: - tegra_pinmux_config_table(cardhu_pinmux_e118x, + if (board_info.board_id == BOARD_PM311 || board_info.board_id == BOARD_PM305) { + tegra_pinmux_config_table(cardhu_pinmux_pm311, + ARRAY_SIZE(cardhu_pinmux_pm311)); + } else { + tegra_pinmux_config_table(cardhu_pinmux_e118x, ARRAY_SIZE(cardhu_pinmux_e118x)); + } tegra_pinmux_config_table(unused_pins_lowpower, ARRAY_SIZE(unused_pins_lowpower)); tegra_pinmux_config_table(gmi_pins_269, diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index f82740280bf2..e38c83f9e919 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -732,6 +732,14 @@ GREG_INIT(17, en_vddio_vid_oc_pm269, en_vddio_vid_oc, "master_5v_switch", 0, 0, TEGRA_GPIO_PP2, false, 0, TEGRA_PINGROUP_DAP3_DOUT, enable_load_switch_rail, disable_load_switch_rail); +/* Specific to pm311 */ +GREG_INIT(15, en_usb1_vbus_oc_pm311, en_usb1_vbus_oc, "master_5v_switch", + 0, 0, TEGRA_GPIO_PCC7, false, 0, TEGRA_PINGROUP_GMI_RST_N, + enable_load_switch_rail, disable_load_switch_rail); +GREG_INIT(16, en_usb3_vbus_oc_pm311, en_usb3_vbus_oc, "master_5v_switch", + 0, 0, TEGRA_GPIO_PCC6, false, 0, TEGRA_PINGROUP_GMI_AD15, + enable_load_switch_rail, disable_load_switch_rail); + /* Specific to E1187/E1186/E1256 */ GREG_INIT(14, dis_5v_switch_e118x, dis_5v_switch, "vdd_5v0_sys", 0, 0, TEGRA_GPIO_PX2, true, 0, 0, 0, 0); @@ -833,6 +841,25 @@ GREG_INIT(6, en_vdd_pnl1_pm313, en_vdd_pnl1, "vdd_3v3_devices", ADD_GPIO_REG(en_usb3_vbus_oc_e118x), \ ADD_GPIO_REG(en_vddio_vid_oc_pm269), +#define PM311_GPIO_REG \ + ADD_GPIO_REG(en_5v_cp), \ + ADD_GPIO_REG(en_5v0), \ + ADD_GPIO_REG(en_ddr), \ + ADD_GPIO_REG(en_3v3_sys), \ + ADD_GPIO_REG(en_3v3_modem), \ + ADD_GPIO_REG(cam1_ldo_en), \ + ADD_GPIO_REG(cam2_ldo_en), \ + ADD_GPIO_REG(cam3_ldo_en), \ + ADD_GPIO_REG(en_vdd_com), \ + ADD_GPIO_REG(en_3v3_fuse_pm269), \ + ADD_GPIO_REG(en_3v3_emmc), \ + ADD_GPIO_REG(en_3v3_pex_hvdd_pm269), \ + ADD_GPIO_REG(en_1v8_cam), \ + ADD_GPIO_REG(dis_5v_switch_e118x), \ + ADD_GPIO_REG(en_usb1_vbus_oc_pm311), \ + ADD_GPIO_REG(en_usb3_vbus_oc_pm311), \ + ADD_GPIO_REG(en_vddio_vid_oc_pm269), + #define E1247_DISPLAY_GPIO_REG \ ADD_GPIO_REG(en_vdd_bl_pm269), \ ADD_GPIO_REG(en_vdd_pnl1_pm269), @@ -930,6 +957,18 @@ static struct gpio_switch_regulator_subdev_data *gswitch_subdevs_pm269_pm313[] = PM313_DISPLAY_GPIO_REG }; +/* Gpio switch regulator platform data for PM311*/ +static struct gpio_switch_regulator_subdev_data *gswitch_subdevs_pm311[] = { + PM311_GPIO_REG + E1247_DISPLAY_GPIO_REG +}; + +/* Gpio switch regulator platform data for PM11*/ +static struct gpio_switch_regulator_subdev_data *gswitch_subdevs_pm311_pm313[] = { + PM311_GPIO_REG + PM313_DISPLAY_GPIO_REG +}; + /* Gpio switch regulator platform data for E1291 A03*/ static struct gpio_switch_regulator_subdev_data *gswitch_subdevs_e1291_a03[] = { COMMON_GPIO_REG @@ -999,9 +1038,17 @@ int __init cardhu_gpio_switch_regulator_init(void) } break; - case BOARD_PM269: - case BOARD_PM305: case BOARD_PM311: + case BOARD_PM305: + gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm311); + gswitch_pdata.subdevs = gswitch_subdevs_pm311; + if (display_board_info.board_id == BOARD_DISPLAY_PM313) { + gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm311_pm313); + gswitch_pdata.subdevs = gswitch_subdevs_pm311_pm313; + } + break; + + case BOARD_PM269: case BOARD_E1257: gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm269); gswitch_pdata.subdevs = gswitch_subdevs_pm269; |