[coreboot-gerrit] Patch set updated for coreboot: google/gru: kevin: use board version specific SD detect GPIO pin

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Sat May 7 09:03:14 CEST 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14728

-gerrit

commit fc3917a6cd0233cf4bd885f75aee738e4e36aae3
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Fri Apr 22 12:25:07 2016 -0700

    google/gru: kevin: use board version specific SD detect GPIO pin
    
    This change reflects Kevin schematics differences, Gru will have to be
    addressed separately.
    
    BRANCH=None
    BUG=None
    TEST=the code still works fine on Kevin proto 1.
    
    Change-Id: Iecae0e82e6bd4d185b49587b6053dcef8ad2162d
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: e821bbebe902a293b1e78cdd868f6bf3548ddd30
    Original-Change-Id: Icd606285aeca1e19189f5e3d24c09b376942708b
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/340429
    Original-Reviewed-by: Patrick Georgi <patrick at georgi-clan.de>
---
 src/mainboard/google/gru/mainboard.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index c24584e..e91f289 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);
 }
 



More information about the coreboot-gerrit mailing list