From 8cec500968ba4fe45bfef0c0f685e9733c166d10 Mon Sep 17 00:00:00 2001 From: Vince Liu Date: Wed, 2 Jul 2025 15:47:49 +0800 Subject: [PATCH] mb/google/skywalker: Configure firmware display for eDP panel Add eDP panel power-on sequences and initialize the display in the ramstage. Also Set display registers to normal mode if initialization flow is skipped to prevent abnormal behavior. BUG=b:400886838,b:422507985 BRANCH=none TEST=utility gbb --set --flash --flags=0x39, and check the firmware screen. utility gbb --set --flash --flags=0x0, and check the DUT screen. Signed-off-by: Bincai Liu Signed-off-by: Vince Liu Signed-off-by: Xiandong Wang Change-Id: I09edceefee9c17ce18681b85da8ca75f65ed2876 Reviewed-on: https://review.coreboot.org/c/coreboot/+/88273 Reviewed-by: Yu-Ping Wu Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) --- src/mainboard/google/skywalker/Kconfig | 2 ++ src/mainboard/google/skywalker/mainboard.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/mainboard/google/skywalker/Kconfig b/src/mainboard/google/skywalker/Kconfig index a868258643..9f8ca1bffa 100644 --- a/src/mainboard/google/skywalker/Kconfig +++ b/src/mainboard/google/skywalker/Kconfig @@ -26,6 +26,8 @@ config BOARD_SPECIFIC_OPTIONS select COMMON_CBFS_SPI_WRAPPER select SPI_FLASH select SPI_FLASH_INCLUDE_ALL_DRIVERS + select MAINBOARD_HAS_NATIVE_VGA_INIT + select HAVE_LINEAR_FRAMEBUFFER select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_BOARDID select EC_GOOGLE_CHROMEEC_SPI diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index 3327c038d1..fb5316201a 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +#include #include #include #include #include #include +#include #include #include #include @@ -101,6 +103,18 @@ static void mainboard_init(struct device *dev) if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE)) register_reset_to_bl31(GPIO_AP_EC_WARM_RST_REQ.id, true); + + if (display_init_required()) { + if (mtk_display_init() < 0) + printk(BIOS_ERR, "%s: Failed to init display\n", __func__); + } else { + printk(BIOS_INFO, "%s: Skipping display init; disabling secure mode\n", + __func__); + mtcmos_display_power_on(); + mtcmos_protect_display_bus(); + mtk_display_disable_secure_mode(); + } + } static void mainboard_enable(struct device *dev)