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>
This commit is contained in:
Ruihai Zhou 2023-03-28 10:30:37 +08:00 committed by Felix Held
parent f9d72e3745
commit 0db0d20c00
3 changed files with 17 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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;