From 9f6a871414d2e8e6b9444a6707c8de67c3396142 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Wed, 5 Feb 2025 16:12:30 +0800 Subject: [PATCH] mb/google/rauru: Support the panel with a load switch control The Rauru follower device goes `load switch` path to ensure the discharge timing meets the panel power-off sequence. Refactor panel.c to support this hardware change. Remove PANEL from fw_config since this is a board-specific change. BRANCH=rauru BUG=b:339580836 TEST=verify firmware screen on Navi Change-Id: I57dcaa2a0b5af94fe3fa3eaf04e9f3159c51d144 Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/86282 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/rauru/devicetree.cb | 7 ------- src/mainboard/google/rauru/panel.c | 14 +++++++------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/mainboard/google/rauru/devicetree.cb b/src/mainboard/google/rauru/devicetree.cb index 55cc91c307..1705dbeb9b 100644 --- a/src/mainboard/google/rauru/devicetree.cb +++ b/src/mainboard/google/rauru/devicetree.cb @@ -8,13 +8,6 @@ fw_config end end -fw_config - field PANEL 18 21 - option DEFAULT 0 - option OLED 1 - end -end - chip soc/mediatek/mt8196 device cpu_cluster 0 on end diff --git a/src/mainboard/google/rauru/panel.c b/src/mainboard/google/rauru/panel.c index 8564f4ca04..37e4001159 100644 --- a/src/mainboard/google/rauru/panel.c +++ b/src/mainboard/google/rauru/panel.c @@ -27,23 +27,23 @@ static struct panel_description panel = { .orientation = LB_FB_ORIENTATION_NORMAL, }; -static void power_on_oled_panel(void) +static void power_on_load_switch(void) { gpio_output(GPIO_EN_PP3300_EDP_X, 1); gpio_set_mode(GPIO_EDP_HPD_1V8, GPIO_FUNC(EINT13, EDP_TX_HPD)); } -static struct panel_description oled_panel = { +static struct panel_description edp_panel = { .configure_backlight = configure_backlight, - .power_on = power_on_oled_panel, + .power_on = power_on_load_switch, .disp_path = DISP_PATH_EDP, .orientation = LB_FB_ORIENTATION_NORMAL, }; struct panel_description *get_active_panel(void) { - if (fw_config_probe(FW_CONFIG(PANEL, OLED))) { - return &oled_panel; - } - return &panel; + if (CONFIG(BOARD_GOOGLE_RAURU)) + return &panel; + + return &edp_panel; }