From 5e6771b1cb2ee4f12c7991e04c0f0f9acf9c3e0a Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 29 Jul 2016 16:15:04 -0700 Subject: 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 Original-Commit-Id: 8de7bcc78c6c48c251c85185e238cea7812f7a28 Original-Change-Id: I3cb49bc644190f35300e6c618b2934956fa88e5b Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/364624 Original-Reviewed-by: Douglas Anderson Reviewed-on: https://review.coreboot.org/16028 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/mainboard/google/gru/mainboard.c | 2 +- src/mainboard/google/gru/sdram_configs.c | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index 7ec377f201..ca71dad902 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 709156f8a4..6403e98cdc 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() -- cgit v1.2.3