diff options
author | Zanxi Chen <chenzanxi@huaqin.corp-partner.google.com> | 2022-08-11 17:09:17 +0800 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-08-14 21:18:19 +0000 |
commit | 492ce254753de3ac1ae5040dd41c91dd7165e3e6 (patch) | |
tree | 9df330828165619148755a1dec82486660b31407 /src | |
parent | 1e811069b3eceaf23cabdf2a988ccb223bb3238c (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/corsola/Kconfig | 4 | ||||
-rw-r--r-- | src/mainboard/google/corsola/display.c | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index db07066a66..13687bb44c 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -40,8 +40,8 @@ config BOARD_SPECIFIC_OPTIONS select MAINBOARD_HAS_TPM2 if VBOOT select MAINBOARD_HAS_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER - select DRIVER_ANALOGIX_ANX7625 if BOARD_GOOGLE_KINGLER - select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_KRABBY_COMMON || BOARD_GOOGLE_STEELIX + select DRIVER_ANALOGIX_ANX7625 + select DRIVER_PARADE_PS8640 select RTC config MAINBOARD_DIR diff --git a/src/mainboard/google/corsola/display.c b/src/mainboard/google/corsola/display.c index 2f52175355..dc66de23bd 100644 --- a/src/mainboard/google/corsola/display.c +++ b/src/mainboard/google/corsola/display.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <assert.h> +#include <boardid.h> #include <console/console.h> #include <delay.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, }; -_Static_assert(CONFIG(DRIVER_ANALOGIX_ANX7625) + CONFIG(DRIVER_PARADE_PS8640) == 1, - "Exactly one of ANX7625 and PS8640 must be set"); +_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; - - if (CONFIG(DRIVER_ANALOGIX_ANX7625)) - bridge = &anx7625_bridge; - else if (CONFIG(DRIVER_PARADE_PS8640)) + uint32_t board_version = board_id(); + + if (CONFIG(BOARD_GOOGLE_KINGLER_COMMON)) + if (CONFIG(BOARD_GOOGLE_STEELIX) && board_version < 2) + bridge = &ps8640_bridge; + else + bridge = &anx7625_bridge; + else /* BOARD_GOOGLE_KRABBY_COMMON */ bridge = &ps8640_bridge; printk(BIOS_INFO, "%s: Starting display init\n", __func__); |