google/oak: Add initial support for Rowan

Update GPIO controls and mainboard configurations for Rowan.

[pg: use the opportunity to clean-up the gerrit-rebase task list with
the entirely unrelated Ignore-CL-Reviewed-on lines]

BUG=chrome-os-partner:62672
BRANCH=none
TEST=emerge-rowan coreboot

Change-Id: I110fb368b3d9fa9dfb2bf091342dfb511ff7c09c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f4252cbe94a7456108aaa522e170bca5dcb1fdd1
Original-Change-Id: I18ebc3ccf4c7d051839d7c50e9b0682ef8f09830
Original-Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/430557
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/341513
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/327003
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/355221
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/354670
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361360
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361361
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361362
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361363
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/382320
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/405110
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/405130
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/419795
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/424139
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430293
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430294
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430295
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427820
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427821
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427822
Reviewed-on: https://review.coreboot.org/18463
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Yidi Lin 2017-02-17 15:59:17 +08:00 committed by Patrick Georgi
parent 9e588004f6
commit 57debca234
5 changed files with 29 additions and 10 deletions

View file

@ -81,6 +81,7 @@ config MAINBOARD_PART_NUMBER
default "Oak" if BOARD_GOOGLE_OAK default "Oak" if BOARD_GOOGLE_OAK
default "Elm" if BOARD_GOOGLE_ELM default "Elm" if BOARD_GOOGLE_ELM
default "Hana" if BOARD_GOOGLE_HANA default "Hana" if BOARD_GOOGLE_HANA
default "Rowan" if BOARD_GOOGLE_ROWAN
config GBB_HWID config GBB_HWID
string string
@ -88,6 +89,7 @@ config GBB_HWID
default "OAK TEST 6858" if BOARD_GOOGLE_OAK default "OAK TEST 6858" if BOARD_GOOGLE_OAK
default "ELM TEST 3839" if BOARD_GOOGLE_ELM default "ELM TEST 3839" if BOARD_GOOGLE_ELM
default "HANA TEST 5855" if BOARD_GOOGLE_HANA default "HANA TEST 5855" if BOARD_GOOGLE_HANA
default "ROWAN TEST 5855" if BOARD_GOOGLE_ROWAN
# All Oak-derivatives count their board IDs as 0 being equivalent to Oak rev6. # All Oak-derivatives count their board IDs as 0 being equivalent to Oak rev6.
config BOARD_ID_ADJUSTMENT config BOARD_ID_ADJUSTMENT
@ -95,5 +97,6 @@ config BOARD_ID_ADJUSTMENT
default 0 if BOARD_GOOGLE_OAK default 0 if BOARD_GOOGLE_OAK
default 7 if BOARD_GOOGLE_ELM default 7 if BOARD_GOOGLE_ELM
default 11 if BOARD_GOOGLE_HANA default 11 if BOARD_GOOGLE_HANA
default 15 if BOARD_GOOGLE_ROWAN
endif # BOARD_GOOGLE_OAK endif # BOARD_GOOGLE_OAK

View file

@ -9,3 +9,7 @@ config BOARD_GOOGLE_ELM
config BOARD_GOOGLE_HANA config BOARD_GOOGLE_HANA
bool "Hana" bool "Hana"
select BOARD_GOOGLE_OAK_COMMON select BOARD_GOOGLE_OAK_COMMON
config BOARD_GOOGLE_ROWAN
bool "ROWAN"
select BOARD_GOOGLE_OAK_COMMON

View file

@ -26,7 +26,7 @@ void setup_chromeos_gpios(void)
gpio_input(WRITE_PROTECT); gpio_input(WRITE_PROTECT);
gpio_input_pullup(EC_IN_RW); gpio_input_pullup(EC_IN_RW);
gpio_input_pullup(EC_IRQ); gpio_input_pullup(EC_IRQ);
gpio_input_pullup(LID); gpio_input(LID);
gpio_input_pullup(POWER_BUTTON); gpio_input_pullup(POWER_BUTTON);
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5) if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
gpio_output(EC_SUSPEND_L, 1); gpio_output(EC_SUSPEND_L, 1);

View file

@ -17,8 +17,9 @@
#define __MAINBOARD_GOOGLE_OAK_GPIO_H__ #define __MAINBOARD_GOOGLE_OAK_GPIO_H__
#include <soc/pinmux.h> #include <soc/pinmux.h>
#define LID ((board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7) ? \ #define LID ((IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN)) ? PAD_KPROW1 \
PAD_EINT12 : PAD_SPI_CK) : ((board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7) ? PAD_EINT12 \
: PAD_SPI_CK))
enum { enum {

View file

@ -127,11 +127,15 @@ static void configure_usb(void)
setup_usb_host(); setup_usb_host();
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 3) { if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 3) {
/* Enable current limit */ /* Type C port 0 Over current alert pin */
gpio_output(PAD_CM2MCLK, 1);
/* Configure USB OC pins*/
gpio_input_pullup(PAD_MSDC3_DSL); gpio_input_pullup(PAD_MSDC3_DSL);
gpio_input_pullup(PAD_CMPCLK); if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN)) {
/* Enable USB3 type A port 0 5V load switch */
gpio_output(PAD_CM2MCLK, 1);
/* USB3 Type A port 0 power over current alert pin */
gpio_input_pullup(PAD_CMPCLK);
}
/* Type C port 1 over current alert pin */
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7) if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7)
gpio_input_pullup(PAD_PCM_SYNC); gpio_input_pullup(PAD_PCM_SYNC);
} }
@ -148,6 +152,9 @@ static void configure_usb(void)
static void configure_usb_hub(void) static void configure_usb_hub(void)
{ {
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN))
return;
/* set usb hub reset pin (low active) to high */ /* set usb hub reset pin (low active) to high */
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 4) if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 4)
gpio_output(PAD_UTXD3, 1); gpio_output(PAD_UTXD3, 1);
@ -257,9 +264,13 @@ static void mainboard_init(device_t dev)
mtk_dsi_pin_drv_ctrl(); mtk_dsi_pin_drv_ctrl();
if (display_init_required()) { if (display_init_required()) {
configure_backlight(); if (IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN)) {
configure_display(); /* display initialization for Rowan */
display_startup(); } else {
configure_backlight();
configure_display();
display_startup();
}
} else { } else {
printk(BIOS_INFO, "Skipping display init.\n"); printk(BIOS_INFO, "Skipping display init.\n");
} }