summaryrefslogtreecommitdiff
path: root/src/mainboard/google/gru
diff options
context:
space:
mode:
authorLin Huang <hl@rock-chips.com>2017-07-25 09:50:10 +0800
committerJulius Werner <jwerner@chromium.org>2017-08-01 20:00:21 +0000
commita2c5b2f2522346c7b0d4e27a583485bfe70fc896 (patch)
tree4123ce87eaf27765ea1edbc558cf3361d932ce35 /src/mainboard/google/gru
parent05c3e846223326620ccf3b880fa97f630d34a7ed (diff)
google/gru: Correct the Sdcard control gpio setting for Scarlet
in Scarlet the Sdcard control gpio differs from other board variants, So set the GPIO to high on Scarlet. Change-Id: I5fa19b212a716213462eea58b6242392d32a2c5c Signed-off-by: Lin Huang <hl@rock-chips.com> Reviewed-on: https://review.coreboot.org/20803 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard/google/gru')
-rw-r--r--src/mainboard/google/gru/mainboard.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 2542d74106..240a5493e8 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -167,13 +167,25 @@ static void configure_sdmmc(void)
{
gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */
- /* SDMMC_DET_L is different on Kevin board revision 0. */
- if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && (board_id() == 0))
- gpio_input(GPIO(4, D, 2));
+ /* set SDMMC_DET_L pin */
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
+ /*
+ * do not have external pull up, so need to
+ * set this pin internal pull up
+ */
+ gpio_input_pullup(GPIO(1, B, 3));
else
gpio_input(GPIO(4, D, 0));
- gpio_output(GPIO(2, D, 4), 0); /* Keep the max voltage */
+ /*
+ * Keep sd card io domain 3v
+ * In Scarlet this GPIO set to high will get 3v,
+ * With other board variants setting this GPIO low results in 3V.
+ */
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
+ gpio_output(GPIO(2, D, 4), 1);
+ else
+ gpio_output(GPIO(2, D, 4), 0);
gpio_input(GPIO(4, B, 0)); /* SDMMC0_D0 remove pull-up */
gpio_input(GPIO(4, B, 1)); /* SDMMC0_D1 remove pull-up */