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:
parent
9e588004f6
commit
57debca234
5 changed files with 29 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue