From b5a703e5a0fe8fc953b3e351983105d140dd33ba Mon Sep 17 00:00:00 2001 From: Yang Wu Date: Mon, 2 Mar 2026 20:26:54 +0800 Subject: [PATCH] mb/google/skywalker: Add mainboard_prepare_cr50_reset() The LCD MIPI panel requires proper power-off commands before reset. Skipping them may cause overpotential conditions, leading to image stickiness or flicker. On MTK platforms, CR50 reset is the only reboot path in coreboot. Add mainboard_prepare_cr50_reset() implementation on skywalker to power off the MIPI panel before issuing CR50 reset. BUG=b:474187570 TEST=emerge-jedi coreboot chromeos-bootimage BRANCH=skywalker Change-Id: I46a654e03ca2e7374cdaf05729f12b182669a64f Signed-off-by: Yang Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/91507 Reviewed-by: Yu-Ping Wu Reviewed-by: Paul Menzel Reviewed-by: Yidi Lin Reviewed-by: Zhengqiao Xia Tested-by: build bot (Jenkins) --- src/mainboard/google/skywalker/mainboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index a36e3fa7a2..f7191e9140 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "gpio.h" #include "panel.h" @@ -107,6 +108,13 @@ static void power_on_fpmcu(void) gpio_output(GPIO_FP_RST_1V8_S3_L, 1); } +void mainboard_prepare_cr50_reset(void) +{ + printk(BIOS_INFO, "%s: Powering MIPI panel off\n", __func__); + if (mtk_mipi_panel_poweroff() < 0) + printk(BIOS_ERR, "%s: Failed to power off MIPI panel\n", __func__); +} + enum mtk_storage_type mainboard_get_storage_type(void) { uint32_t index = storage_id();