[coreboot-gerrit] New patch to review for coreboot: google/gru: Add support for Gru rev1

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Tue Aug 2 18:16:47 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16028

-gerrit

commit 8a97922f13f174e74e1229f4ce6380918ad12503
Author: Julius Werner <jwerner at chromium.org>
Date:   Fri Jul 29 16:15:04 2016 -0700

    google/gru: Add support for Gru rev1
    
    This patch adds support for the Gru rev1 board. This board differs from
    rev0 by no longer relying on the I2C backlight booster and requiring the
    same ODT SDRAM settings as newer Kevin boards.
    
    BRANCH=None
    BUG=chrome-os-partner:55087
    TEST=None
    
    Change-Id: I1428760540a0aaaa0c02c6cb5b0981294ba4df33
    Signed-off-by: Martin Roth <martinroth at chromium.org>
    Original-Commit-Id: 8de7bcc78c6c48c251c85185e238cea7812f7a28
    Original-Change-Id: I3cb49bc644190f35300e6c618b2934956fa88e5b
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/364624
    Original-Reviewed-by: Douglas Anderson <dianders at chromium.org>
---
 src/mainboard/google/gru/mainboard.c     |  2 +-
 src/mainboard/google/gru/sdram_configs.c | 27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 7ec377f..ca71dad 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -231,7 +231,7 @@ void mainboard_power_on_backlight(void)
 {
 	gpio_output(GPIO(1, C, 1), 1);  /* BL_EN */
 
-	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
+	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU) && board_id() == 0)
 		enable_backlight_booster();
 }
 
diff --git a/src/mainboard/google/gru/sdram_configs.c b/src/mainboard/google/gru/sdram_configs.c
index 709156f..6403e98 100644
--- a/src/mainboard/google/gru/sdram_configs.c
+++ b/src/mainboard/google/gru/sdram_configs.c
@@ -51,18 +51,25 @@ static enum dram_speeds get_sdram_index(void)
 
 	id = board_id();
 
-	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN)) {
-		if (id < 3)
+	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN))
+		switch (id) {
+		case 0:
+		case 1:
+		case 2:
 			return dram_200MHz;
-		else if (id == 3)
+		case 3:
 			return dram_666MHz_NO_ODT;
-		else
-			return  dram_800MHz;
-	}
-	else if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
-		return dram_800MHz_NO_ODT;
-	else
-		return dram_200MHz;
+		default:
+			return dram_800MHz;
+		}
+
+	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
+		switch (id) {
+		case 0:
+			return dram_800MHz_NO_ODT;
+		default:
+			return dram_800MHz;
+		}
 }
 
 const struct rk3399_sdram_params *get_sdram_config()



More information about the coreboot-gerrit mailing list