[coreboot-gerrit] Change in coreboot[master]: google/gru: Correct the Sdcard control gpio setting for Scarlet

Lin Huang (Code Review) gerrit at coreboot.org
Fri Jul 28 04:40:58 CEST 2017


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 at 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 */

-- 
To view, visit https://review.coreboot.org/20803
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fa19b212a716213462eea58b6242392d32a2c5c
Gerrit-Change-Number: 20803
Gerrit-PatchSet: 1
Gerrit-Owner: Lin Huang <hl at rock-chips.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170728/d55f36ed/attachment.html>


More information about the coreboot-gerrit mailing list