Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74048 )
Change subject: mb/google/corsola: Add detachable Starmie as variant ......................................................................
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 --- M src/mainboard/google/corsola/Kconfig M src/mainboard/google/corsola/Kconfig.name M src/mainboard/google/corsola/display.c 3 files changed, 41 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, but someone else must approve cong yang: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index e53ae82..3bb43bc 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -12,6 +12,10 @@ 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 @@ 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 902ed1d..90f3b48 100644 --- a/src/mainboard/google/corsola/Kconfig.name +++ b/src/mainboard/google/corsola/Kconfig.name @@ -25,3 +25,9 @@ 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 bfe3f05..22d8c39 100644 --- a/src/mainboard/google/corsola/display.c +++ b/src/mainboard/google/corsola/display.c @@ -125,14 +125,11 @@ .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 @@ 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 @@ 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;