summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-harmony-pinmux.c
diff options
context:
space:
mode:
authorPreetham Chandru <pchandru@nvidia.com>2011-11-29 17:53:13 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2012-03-24 01:57:17 -0700
commit6d4d267b516c341e46b72b6f09d72aa74c5cf001 (patch)
tree449b16481a78b83891e12e9554d57d04612782fa /arch/arm/mach-tegra/board-harmony-pinmux.c
parentbbdb4167ba7c23f63110e2b07196273145e77132 (diff)
tegra: harmony: wifi: add board support for WiFi
The SDIO WiFi module requires power from external PMU and 1.2V regulator. The module gets powered on if - (1) all power sources are enabled, and (2) power (down) and reset (down) pins are enabled as per spec. To enable mmc/SDIO driver to detect the WiFi hardware, the WiFi chip has to be powered-up before mmc driver does probing. So, steps should be as following: (1) required regulators are on, (2) power/reset of WiFi are enabled, (3) mmc does probing. Later time, when WiFi driver module is loaded and registers with SDIO, the SDIO driver knows which H/W the driver has to be associated with. Bug: 908534 Change-Id: I6510bced5fa9b8b3314c00180f2694903b23145c Reviewed-on: http://git-master/r/#change,47808,patchset=2 Signed-off-by: Preetham Chandru <pchandru@nvidia.com> Reviewed-on: http://git-master/r/67121 Reviewed-by: Mursalin Akon <makon@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com> Rebase-Id: R2cfab6ffed6a810c57178a1387e74cb6ccf7258c
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-pinmux.c')
-rw-r--r--arch/arm/mach-tegra/board-harmony-pinmux.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c
index c7019e129ec0..15bdf47240bf 100644
--- a/arch/arm/mach-tegra/board-harmony-pinmux.c
+++ b/arch/arm/mach-tegra/board-harmony-pinmux.c
@@ -26,6 +26,22 @@
#include "board-harmony.h"
#include "board-pinmux.h"
+#define DEFAULT_DRIVE(_name) \
+ { \
+ .pingroup = TEGRA_DRIVE_PINGROUP_##_name, \
+ .hsm = TEGRA_HSM_DISABLE, \
+ .schmitt = TEGRA_SCHMITT_ENABLE, \
+ .drive = TEGRA_DRIVE_DIV_1, \
+ .pull_down = TEGRA_PULL_31, \
+ .pull_up = TEGRA_PULL_31, \
+ .slew_rising = TEGRA_SLEW_SLOWEST, \
+ .slew_falling = TEGRA_SLEW_SLOWEST, \
+ }
+
+static __initdata struct tegra_drive_pingroup_config harmony_drive_pinmux[] = {
+ DEFAULT_DRIVE(SDIO1),
+};
+
static __initdata struct tegra_pingroup_config harmony_pinmux[] = {
{TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_ATB, TEGRA_MUX_SDIO4, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
@@ -112,13 +128,13 @@ static __initdata struct tegra_pingroup_config harmony_pinmux[] = {
{TEGRA_PINGROUP_SDB, TEGRA_MUX_PWM, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_SDC, TEGRA_MUX_PWM, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_SDD, TEGRA_MUX_PWM, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
- {TEGRA_PINGROUP_SDIO1, TEGRA_MUX_SDIO1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
+ {TEGRA_PINGROUP_SDIO1, TEGRA_MUX_SDIO1, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_SLXA, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_SLXC, TEGRA_MUX_SPDIF, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_SLXD, TEGRA_MUX_SPDIF, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
{TEGRA_PINGROUP_SLXK, TEGRA_MUX_PCIE, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
- {TEGRA_PINGROUP_SPDI, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
- {TEGRA_PINGROUP_SPDO, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
+ {TEGRA_PINGROUP_SPDI, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
+ {TEGRA_PINGROUP_SPDO, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_SPIA, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_SPIB, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
{TEGRA_PINGROUP_SPIC, TEGRA_MUX_GMI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
@@ -168,4 +184,7 @@ static struct tegra_board_pinmux_conf conf = {
void __init harmony_pinmux_init(void)
{
tegra_board_pinmux_init(&conf, NULL);
+ tegra_drive_pinmux_config_table(harmony_drive_pinmux,
+ ARRAY_SIZE(harmony_drive_pinmux));
+
}