diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/gru/mainboard.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index c24584e1b5..e91f289759 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -14,6 +14,7 @@ * */ +#include <boardid.h> #include <device/device.h> #include <gpio.h> #include <soc/clock.h> @@ -23,8 +24,21 @@ 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 */ + /* + * SDMMC_DET_L is different on different board revisions. + * Ideally this and other deviations should come from a table + * which could be looked up by board revision. + */ + switch (board_id()) { + case 0: /* This is for Kevin proto 1. */ + gpio_input(GPIO(4, D, 2)); + break; + default: + gpio_input(GPIO(4, D, 0)); + break; + } gpio_output(GPIO(2, D, 4), 0); /* Keep the max voltage */ + write32(&rk3399_grf->iomux_sdmmc, IOMUX_SDMMC); } |