mb/google/corsola: Distinguish anx7625 and ps8640 for steelix
Steelix uses ps8640 for board revision < 2, and uses anx7625 for newer revisions. So we use board_id to distinguish anx7625 and ps8640. BUG=b:242018373 TEST=firmware bootsplash is shown on eDP panel of steelix. Change-Id: Ia6907d2e6e290375946afb13176ab9a26dedd671 Signed-off-by: Zanxi Chen <chenzanxi@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66650 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@chromium.org>
This commit is contained in:
@@ -40,8 +40,8 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select MAINBOARD_HAS_TPM2 if VBOOT
|
select MAINBOARD_HAS_TPM2 if VBOOT
|
||||||
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
select MAINBOARD_HAS_NATIVE_VGA_INIT
|
||||||
select HAVE_LINEAR_FRAMEBUFFER
|
select HAVE_LINEAR_FRAMEBUFFER
|
||||||
select DRIVER_ANALOGIX_ANX7625 if BOARD_GOOGLE_KINGLER
|
select DRIVER_ANALOGIX_ANX7625
|
||||||
select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_KRABBY_COMMON || BOARD_GOOGLE_STEELIX
|
select DRIVER_PARADE_PS8640
|
||||||
select RTC
|
select RTC
|
||||||
|
|
||||||
config MAINBOARD_DIR
|
config MAINBOARD_DIR
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <boardid.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#include <drivers/analogix/anx7625/anx7625.h>
|
#include <drivers/analogix/anx7625/anx7625.h>
|
||||||
@@ -124,18 +125,22 @@ static const struct edp_bridge ps8640_bridge = {
|
|||||||
.post_power_on = bridge_ps8640_post_power_on,
|
.post_power_on = bridge_ps8640_post_power_on,
|
||||||
};
|
};
|
||||||
|
|
||||||
_Static_assert(CONFIG(DRIVER_ANALOGIX_ANX7625) + CONFIG(DRIVER_PARADE_PS8640) == 1,
|
_Static_assert(CONFIG(BOARD_GOOGLE_KINGLER_COMMON) + CONFIG(BOARD_GOOGLE_KRABBY_COMMON) == 1,
|
||||||
"Exactly one of ANX7625 and PS8640 must be set");
|
"Exactly one of KINGLER and KRABBY must be set");
|
||||||
|
|
||||||
int configure_display(void)
|
int configure_display(void)
|
||||||
{
|
{
|
||||||
struct edid edid;
|
struct edid edid;
|
||||||
const u8 i2c_bus = I2C0;
|
const u8 i2c_bus = I2C0;
|
||||||
const struct edp_bridge *bridge;
|
const struct edp_bridge *bridge;
|
||||||
|
uint32_t board_version = board_id();
|
||||||
|
|
||||||
if (CONFIG(DRIVER_ANALOGIX_ANX7625))
|
if (CONFIG(BOARD_GOOGLE_KINGLER_COMMON))
|
||||||
bridge = &anx7625_bridge;
|
if (CONFIG(BOARD_GOOGLE_STEELIX) && board_version < 2)
|
||||||
else if (CONFIG(DRIVER_PARADE_PS8640))
|
bridge = &ps8640_bridge;
|
||||||
|
else
|
||||||
|
bridge = &anx7625_bridge;
|
||||||
|
else /* BOARD_GOOGLE_KRABBY_COMMON */
|
||||||
bridge = &ps8640_bridge;
|
bridge = &ps8640_bridge;
|
||||||
|
|
||||||
printk(BIOS_INFO, "%s: Starting display init\n", __func__);
|
printk(BIOS_INFO, "%s: Starting display init\n", __func__);
|
||||||
|
Reference in New Issue
Block a user