Tegra114: Dalmore: Add SDIO3 pad config to pinctrl_config table
authorTom Warren <twarren@nvidia.com>
Mon, 18 Mar 2013 21:47:55 +0000 (14:47 -0700)
committerTom Warren <twarren@nvidia.com>
Mon, 25 Mar 2013 16:56:07 +0000 (09:56 -0700)
SDIO1 (the SD-card slot on Dalmore) needs to have its pads setup
before the MMC driver is added.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
arch/arm/include/asm/arch-tegra114/gp_padctrl.h
board/nvidia/dalmore/dalmore.c
board/nvidia/dalmore/pinmux-config-dalmore.h

index 1ef1a1484df61f1457dbca7f0e2af7d124e23a57..41ce67780754278fac4e92e53376aa0aed32c4ee 100644 (file)
@@ -74,4 +74,10 @@ struct apb_misc_gp_ctlr {
        u32     aocfg0;         /* 0x1AC: APB_MISC_GP_AOCFG0PADCTRL */
 };
 
+/* SDMMC1/3 settings from section 27.5 of T114 TRM */
+#define SDIOCFG_DRVUP_SLWF     0
+#define SDIOCFG_DRVDN_SLWR     0
+#define SDIOCFG_DRVUP          0x24
+#define SDIOCFG_DRVDN          0x14
+
 #endif /* _TEGRA114_GP_PADCTRL_H_ */
index 2020a5f00d2fa62c15a8a735a18377ab94ebbc25..7449b5b99d560d770769f803aebb39bf1e9553ea 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <asm/arch/pinmux.h>
+#include <asm/arch/gp_padctrl.h>
 #include "pinmux-config-dalmore.h"
 
 /*
@@ -32,4 +33,7 @@ void pinmux_init(void)
 
        pinmux_config_table(unused_pins_lowpower,
                ARRAY_SIZE(unused_pins_lowpower));
+
+       /* Initialize any non-default pad configs (APB_MISC_GP regs) */
+       padgrp_config_table(dalmore_padctrl, ARRAY_SIZE(dalmore_padctrl));
 }
index 3ef6f4eaf6f39bad36cc11f6a97240cd442f0df4..8c05a1517c1171337ec7d1baa8013f509d6fb496 100644 (file)
@@ -361,4 +361,10 @@ static struct pingroup_config tegra114_pinmux_set_nontristate[] = {
 
        DEFAULT_PINMUX(SDMMC3_CD_N,     SDMMC3, UP,       NORMAL,   INPUT),
 };
+
+static struct padctrl_config dalmore_padctrl[] = {
+       /* (_padgrp, _slwf, _slwr, _drvup, _drvdn, _lpmd, _schmt, _hsm) */
+       DEFAULT_PADCFG(SDIO3, SDIOCFG_DRVUP_SLWF, SDIOCFG_DRVDN_SLWR, \
+               SDIOCFG_DRVUP, SDIOCFG_DRVDN, NONE, NONE, NONE),
+};
 #endif /* PINMUX_CONFIG_COMMON_H */