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>
This commit is contained in:
Vadim Bendebury 2016-03-28 00:44:54 -07:00 committed by Patrick Georgi
parent 19eb7509d3
commit 1e80ab341a
1 changed files with 13 additions and 0 deletions

View File

@ -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)