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 <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Yidi Lin 2025-02-05 16:12:30 +08:00
commit 9f6a871414
2 changed files with 7 additions and 14 deletions

View file

@ -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

View file

@ -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;
}