From 5af56ddf92766c42402f00c9f21a04a72c8bf4a7 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Thu, 15 Jan 2026 16:59:06 +0800 Subject: [PATCH] mb/google/skywalker: Implement lb_board() to pass LB_TAG_PANEL_POWEROFF To allow payloads to run MIPI panel power-off commands, create a new LB_TAG_PANEL_POWEROFF record and pass it to payloads. BUG=b:474187570 TEST=emerge-jedi coreboot BRANCH=skywalker Change-Id: Ie11e1e78129188cc26d56764449fbafafa8fa316 Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/90768 Reviewed-by: Chen-Tsung Hsieh Reviewed-by: Julius Werner Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) --- src/mainboard/google/skywalker/mainboard.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index a0a89fc215..a36e3fa7a2 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -1,6 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +#include #include +#include +#include +#include #include #include #include @@ -166,3 +170,23 @@ struct chip_operations mainboard_ops = { .name = CONFIG_MAINBOARD_PART_NUMBER, .enable_dev = mainboard_enable, }; + +void lb_board(struct lb_header *header) +{ + const struct panel_serializable_data *mipi_data = mtk_get_mipi_panel_data(); + + if (!mipi_data) + return; + + size_t cmd_len = mipi_panel_get_commands_len(mipi_data->poweroff); + + if (!cmd_len) + return; + + struct lb_panel_poweroff *panel_poweroff = + (struct lb_panel_poweroff *)lb_new_record(header); + panel_poweroff->tag = LB_TAG_PANEL_POWEROFF; + panel_poweroff->size = ALIGN_UP(sizeof(*panel_poweroff) + cmd_len, + LB_ENTRY_ALIGN); + memcpy(panel_poweroff->cmd, mipi_data->poweroff, cmd_len); +}