From 1e80ab341ad93a08b3bce11bcd10f3f9b9d7a6a1 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 28 Mar 2016 00:44:54 -0700 Subject: 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 Original-Commit-Id: d37e688a458749e331a50c2ebf2018cba6629823 Original-Change-Id: I9f67c0bc16ddefa5ebe52a10c6d9e54194828a89 Original-Signed-off-by: Lin Huang Original-Signed-off-by: Vadim Bendebury 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 --- src/mainboard/google/gru/mainboard.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') 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 +#include +#include +#include + +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) -- cgit v1.2.3