diff options
author | Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> | 2023-03-28 10:30:37 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-04-14 12:09:56 +0000 |
commit | 0db0d20c003d5e21f95dbeebe87229798ab104b1 (patch) | |
tree | dbb1001b3e9820592f9363c44aa964ecd288769b /src/mainboard/google/corsola | |
parent | f9d72e3745a742d154d2d56ecaf58d7ff217b0d2 (diff) |
mb/google/corsola: Add detachable Starmie as variant
The 'Starmie' is a mt8186 detachable reference design that will share
most of Corsola design. For AP firmware, there will be a few changes,
mostly in display (MIPI interface and w/o bridge), so we create it
as a variant in Corsola.
BUG=b:275470328
BRANCH=corsola
TEST=./util/abuild/abuild -t google/corsola -b starmie -a
Change-Id: Ic1556ad0031e9a24bf26fa84d7713b7b7928312a
Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/corsola')
-rw-r--r-- | src/mainboard/google/corsola/Kconfig | 5 | ||||
-rw-r--r-- | src/mainboard/google/corsola/Kconfig.name | 6 | ||||
-rw-r--r-- | src/mainboard/google/corsola/display.c | 11 |
3 files changed, 17 insertions, 5 deletions
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index e53ae8259d..3bb43bc4c4 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -12,6 +12,10 @@ config BOARD_GOOGLE_KRABBY_COMMON def_bool n select BOARD_GOOGLE_CORSOLA_COMMON +config BOARD_GOOGLE_STARMIE_COMMON + def_bool n + select BOARD_GOOGLE_CORSOLA_COMMON + if BOARD_GOOGLE_CORSOLA_COMMON config VBOOT @@ -54,6 +58,7 @@ config MAINBOARD_PART_NUMBER default "Tentacruel" if BOARD_GOOGLE_TENTACRUEL default "Magikarp" if BOARD_GOOGLE_MAGIKARP default "Voltorb" if BOARD_GOOGLE_VOLTORB + default "Starmie" if BOARD_GOOGLE_STARMIE config BOOT_DEVICE_SPI_FLASH_BUS int diff --git a/src/mainboard/google/corsola/Kconfig.name b/src/mainboard/google/corsola/Kconfig.name index 902ed1db5e..90f3b480fc 100644 --- a/src/mainboard/google/corsola/Kconfig.name +++ b/src/mainboard/google/corsola/Kconfig.name @@ -25,3 +25,9 @@ config BOARD_GOOGLE_TENTACRUEL config BOARD_GOOGLE_MAGIKARP bool "-> Magikarp" select BOARD_GOOGLE_KRABBY_COMMON + +comment "Starmie" + +config BOARD_GOOGLE_STARMIE + bool "-> Starmie" + select BOARD_GOOGLE_STARMIE_COMMON diff --git a/src/mainboard/google/corsola/display.c b/src/mainboard/google/corsola/display.c index bfe3f05ebb..22d8c399fd 100644 --- a/src/mainboard/google/corsola/display.c +++ b/src/mainboard/google/corsola/display.c @@ -125,14 +125,11 @@ static const struct edp_bridge ps8640_bridge = { .post_power_on = bridge_ps8640_post_power_on, }; -_Static_assert(CONFIG(BOARD_GOOGLE_KINGLER_COMMON) + CONFIG(BOARD_GOOGLE_KRABBY_COMMON) == 1, - "Exactly one of KINGLER and KRABBY must be set"); - int configure_display(void) { struct edid edid; const u8 i2c_bus = I2C0; - const struct edp_bridge *bridge; + const struct edp_bridge *bridge = NULL; uint32_t board_version = board_id(); if (CONFIG(BOARD_GOOGLE_KINGLER_COMMON)) @@ -140,9 +137,12 @@ int configure_display(void) bridge = &ps8640_bridge; else bridge = &anx7625_bridge; - else /* BOARD_GOOGLE_KRABBY_COMMON */ + else if (CONFIG(BOARD_GOOGLE_KRABBY_COMMON)) bridge = &ps8640_bridge; + if (!bridge) + return -1; + printk(BIOS_INFO, "%s: Starting display init\n", __func__); mtk_i2c_bus_init(i2c_bus, I2C_SPEED_FAST); @@ -181,6 +181,7 @@ int configure_display(void) return -1; } + assert(bridge->post_power_on); if (bridge->post_power_on(i2c_bus, &edid) < 0) { printk(BIOS_ERR, "%s: Failed to post power on bridge\n", __func__); return -1; |