From a2c5b2f2522346c7b0d4e27a583485bfe70fc896 Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Tue, 25 Jul 2017 09:50:10 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/20803 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner Reviewed-by: Paul Menzel --- src/mainboard/google/gru/mainboard.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/mainboard/google') 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 */ -- cgit v1.2.3