[coreboot-gerrit] Change in coreboot[master]: google/gru: change the sd power sequence

Patrick Georgi (Code Review) gerrit at coreboot.org
Tue Apr 25 10:51:30 CEST 2017


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/19430 )

Change subject: google/gru: change the sd power sequence
......................................................................


google/gru: change the sd power sequence

In the safety considerations, we should make sure the slot of SD is
enabled first, since we want to the power switch of corresponding is
powered up.

The different boards have the different power switch for sdmmc.
Some power switch IC need turn on delay for long time.

let's move the slot power of SD to romstage and avoid explicit delays
or per-board.

BRANCH=none
BUG=b:35813418, b:35573103
TEST=check the signal for children of gru, and boot up from sd card.

Change-Id: Id164e4c4c900c6b1ca0251fc27db4cd36c56f6ff
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: ea1b01cc13628033b85251dbb44407f075efdc85
Original-Change-Id: I48ab543143d3de9be46608fc12d78e09decf8d79
Original-Signed-off-by: Caesar Wang <wxt at rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/447076
Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
Reviewed-on: https://review.coreboot.org/19430
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth at google.com>
---
M src/mainboard/google/gru/mainboard.c
M src/mainboard/google/gru/romstage.c
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  build bot (Jenkins): Verified
  Martin Roth: Looks good to me, approved



diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 1c823f3..b8a3e55 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -155,7 +155,6 @@
 
 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 Kevin board revision 0. */
diff --git a/src/mainboard/google/gru/romstage.c b/src/mainboard/google/gru/romstage.c
index 7c0dfd0..d644f7d 100644
--- a/src/mainboard/google/gru/romstage.c
+++ b/src/mainboard/google/gru/romstage.c
@@ -20,6 +20,7 @@
 #include <arch/mmu.h>
 #include <cbfs.h>
 #include <cbmem.h>
+#include <gpio.h>
 #include <console/console.h>
 #include <delay.h>
 #include <program_loading.h>
@@ -49,6 +50,13 @@
 	udelay(500);
 }
 
+static void prepare_sdmmc(void)
+{
+	/* Enable main SD rail early to allow ramp time before enabling SDIO
+	 * rail. */
+	gpio_output(GPIO(4, D, 5), 1);	/* SDMMC_PWR_EN */
+}
+
 static void prepare_usb(void)
 {
 	/*
@@ -68,6 +76,7 @@
 	/* Init DVS to conservative values. */
 	init_dvs_outputs();
 
+	prepare_sdmmc();
 	prepare_usb();
 
 	sdram_init(get_sdram_config());

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id164e4c4c900c6b1ca0251fc27db4cd36c56f6ff
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list