summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2016-03-28 00:44:54 -0700
committerPatrick Georgi <pgeorgi@google.com>2016-05-09 08:45:55 +0200
commit1e80ab341ad93a08b3bce11bcd10f3f9b9d7a6a1 (patch)
treee4a3baa6c1a8e6817e2c20676b0d8dd579ebbe37 /src/mainboard/google
parent19eb7509d380fd5d9e6d083ad0d2633820c8db4b (diff)
google/gru: power up SD card
Make sure SD card is powered up properly. Please refer to TRM V0.3 Part1 Page 324 for sdmmc pinmux. BRANCH=none BUG=chrome-os-partner:51537 TEST=With other patches, boot into chromeos prompt Change-Id: Ib53b05c1fce851ca7cbcc2207fce2dce3b1bfe9a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: d37e688a458749e331a50c2ebf2018cba6629823 Original-Change-Id: I9f67c0bc16ddefa5ebe52a10c6d9e54194828a89 Original-Signed-off-by: Lin Huang <hl@rock-chips.com> Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/337192 Reviewed-on: https://review.coreboot.org/14718 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/gru/mainboard.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 649f16296c..c24584e1b5 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -15,9 +15,22 @@
*/
#include <device/device.h>
+#include <gpio.h>
+#include <soc/clock.h>
+#include <soc/grf.h>
+
+static void configure_sdmmc(void)
+{
+ gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */
+ gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */
+ gpio_input(GPIO(4, D, 2)); /* SDMMC_DET_L */
+ gpio_output(GPIO(2, D, 4), 0); /* Keep the max voltage */
+ write32(&rk3399_grf->iomux_sdmmc, IOMUX_SDMMC);
+}
static void mainboard_init(device_t dev)
{
+ configure_sdmmc();
}
static void mainboard_enable(device_t dev)