gru: set correct gpio for SD card detect
The only outlier at this time is Kevin rev 0, treat it specially, the rest of the targets use the same GPIO. BRANCH=none BUG=none TEST=gru still boots off SD card just fine Change-Id: Ic5183f08dd1119f9588f243bd9e9c080d84687f9 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/344151 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
4cecbcaaf4
commit
5d4e3a8aa4
1 changed files with 5 additions and 11 deletions
|
|
@ -24,19 +24,13 @@ 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 */
|
||||
/*
|
||||
* 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. */
|
||||
|
||||
/* 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));
|
||||
break;
|
||||
default:
|
||||
else
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue