summaryrefslogtreecommitdiff
path: root/src/mainboard/google/oak
diff options
context:
space:
mode:
authorYidi Lin <yidi.lin@mediatek.com>2017-02-17 15:59:17 +0800
committerPatrick Georgi <pgeorgi@google.com>2017-02-23 17:41:22 +0100
commit57debca234af42b2b60aa58d42283871122f6b43 (patch)
tree751b52dd1c0e10ad737c1b221d92d1a9926555fe /src/mainboard/google/oak
parent9e588004f6133e671971f352ed4f086c9f938025 (diff)
downloadcoreboot-57debca234af42b2b60aa58d42283871122f6b43.tar.xz
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>
Diffstat (limited to 'src/mainboard/google/oak')
-rw-r--r--src/mainboard/google/oak/Kconfig3
-rw-r--r--src/mainboard/google/oak/Kconfig.name4
-rw-r--r--src/mainboard/google/oak/chromeos.c2
-rw-r--r--src/mainboard/google/oak/gpio.h5
-rw-r--r--src/mainboard/google/oak/mainboard.c25
5 files changed, 29 insertions, 10 deletions
diff --git a/src/mainboard/google/oak/Kconfig b/src/mainboard/google/oak/Kconfig
index 01bd0bcffb..083ed9ced5 100644
--- a/src/mainboard/google/oak/Kconfig
+++ b/src/mainboard/google/oak/Kconfig
@@ -81,6 +81,7 @@ config MAINBOARD_PART_NUMBER
default "Oak" if BOARD_GOOGLE_OAK
default "Elm" if BOARD_GOOGLE_ELM
default "Hana" if BOARD_GOOGLE_HANA
+ default "Rowan" if BOARD_GOOGLE_ROWAN
config GBB_HWID
string
@@ -88,6 +89,7 @@ config GBB_HWID
default "OAK TEST 6858" if BOARD_GOOGLE_OAK
default "ELM TEST 3839" if BOARD_GOOGLE_ELM
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.
config BOARD_ID_ADJUSTMENT
@@ -95,5 +97,6 @@ config BOARD_ID_ADJUSTMENT
default 0 if BOARD_GOOGLE_OAK
default 7 if BOARD_GOOGLE_ELM
default 11 if BOARD_GOOGLE_HANA
+ default 15 if BOARD_GOOGLE_ROWAN
endif # BOARD_GOOGLE_OAK
diff --git a/src/mainboard/google/oak/Kconfig.name b/src/mainboard/google/oak/Kconfig.name
index 95e4a3d4c9..40a97e6cdb 100644
--- a/src/mainboard/google/oak/Kconfig.name
+++ b/src/mainboard/google/oak/Kconfig.name
@@ -9,3 +9,7 @@ config BOARD_GOOGLE_ELM
config BOARD_GOOGLE_HANA
bool "Hana"
select BOARD_GOOGLE_OAK_COMMON
+
+config BOARD_GOOGLE_ROWAN
+ bool "ROWAN"
+ select BOARD_GOOGLE_OAK_COMMON
diff --git a/src/mainboard/google/oak/chromeos.c b/src/mainboard/google/oak/chromeos.c
index 60c24e76ae..fe4574e89c 100644
--- a/src/mainboard/google/oak/chromeos.c
+++ b/src/mainboard/google/oak/chromeos.c
@@ -26,7 +26,7 @@ void setup_chromeos_gpios(void)
gpio_input(WRITE_PROTECT);
gpio_input_pullup(EC_IN_RW);
gpio_input_pullup(EC_IRQ);
- gpio_input_pullup(LID);
+ gpio_input(LID);
gpio_input_pullup(POWER_BUTTON);
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
gpio_output(EC_SUSPEND_L, 1);
diff --git a/src/mainboard/google/oak/gpio.h b/src/mainboard/google/oak/gpio.h
index ba74c8816c..3c0f51afb6 100644
--- a/src/mainboard/google/oak/gpio.h
+++ b/src/mainboard/google/oak/gpio.h
@@ -17,8 +17,9 @@
#define __MAINBOARD_GOOGLE_OAK_GPIO_H__
#include <soc/pinmux.h>
-#define LID ((board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7) ? \
- PAD_EINT12 : PAD_SPI_CK)
+#define LID ((IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN)) ? PAD_KPROW1 \
+ : ((board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 7) ? PAD_EINT12 \
+ : PAD_SPI_CK))
enum {
diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c
index ad5ecd4bd9..7cb6a68507 100644
--- a/src/mainboard/google/oak/mainboard.c
+++ b/src/mainboard/google/oak/mainboard.c
@@ -127,11 +127,15 @@ static void configure_usb(void)
setup_usb_host();
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 3) {
- /* Enable current limit */
- gpio_output(PAD_CM2MCLK, 1);
- /* Configure USB OC pins*/
+ /* Type C port 0 Over current alert pin */
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)
gpio_input_pullup(PAD_PCM_SYNC);
}
@@ -148,6 +152,9 @@ static void configure_usb(void)
static void configure_usb_hub(void)
{
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN))
+ return;
+
/* set usb hub reset pin (low active) to high */
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT > 4)
gpio_output(PAD_UTXD3, 1);
@@ -257,9 +264,13 @@ static void mainboard_init(device_t dev)
mtk_dsi_pin_drv_ctrl();
if (display_init_required()) {
- configure_backlight();
- configure_display();
- display_startup();
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_ROWAN)) {
+ /* display initialization for Rowan */
+ } else {
+ configure_backlight();
+ configure_display();
+ display_startup();
+ }
} else {
printk(BIOS_INFO, "Skipping display init.\n");
}