Lin Huang has uploaded this change for review. ( https://review.coreboot.org/20803
Change subject: google/gru: Correct the Sdcard control gpio setting for Scarlet ......................................................................
google/gru: Correct the Sdcard control gpio setting for Scarlet
in Scarlet Sdcard control gpio different with other project, let's correct it.
Change-Id: I5fa19b212a716213462eea58b6242392d32a2c5c Signed-off-by: Lin Huang hl@rock-chips.com --- M src/mainboard/google/gru/bootblock.c M src/mainboard/google/gru/mainboard.c 2 files changed, 13 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/20803/1
diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c index d0a5182..c5ab28a 100644 --- a/src/mainboard/google/gru/bootblock.c +++ b/src/mainboard/google/gru/bootblock.c @@ -44,7 +44,7 @@ */ write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 0));
- /* Scarlet gpio2ab iodomain is 1.8V */ + /* Scarlet gpio4cd iodomain is 1.8V */ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)) write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 3));
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index 2542d74..d39a7fc 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -167,13 +167,21 @@ { 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)) + gpio_input(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 + * other project set this gpio to low will get 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 */