libpayload: Pass panel power-off commands to payloads

Introduce the lb_panel_poweroff/cb_panel_poweroff structs to pass the
panel power-off commands from coreboot to payloads.

Also add mipi_panel_parse_commands() to libpayload libc, so that
payloads can utilize it to parse the power-off commands.

BUG=b:474187570
TEST=emerge-jedi coreboot libpayload
BRANCH=skywalker

Change-Id: I652178c8075a1f3aee356502e682ef9a4f3d1cf8
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Yu-Ping Wu 2026-01-13 11:48:42 +08:00 committed by Yu-Ping Wu
commit 8cfc71d9e0
6 changed files with 29 additions and 0 deletions

View file

@ -91,6 +91,7 @@ enum {
LB_TAG_CAPSULE = 0x0046,
LB_TAG_CFR_ROOT = 0x0047,
LB_TAG_ROOT_BRIDGE_INFO = 0x0048,
LB_TAG_PANEL_POWEROFF = 0x0049,
/* The following options are CMOS-related */
LB_TAG_CMOS_OPTION_TABLE = 0x00c8,
LB_TAG_OPTION = 0x00c9,
@ -629,6 +630,14 @@ struct lb_cfr {
/* struct lb_cfr_option_form forms[] */
};
struct lb_panel_poweroff {
uint32_t tag;
uint32_t size;
/* MIPI DSI poweroff commands from panel_serializable_data. */
uint8_t cmd[];
};
enum boot_mode_t {
LB_BOOT_MODE_NORMAL,
LB_BOOT_MODE_LOW_BATTERY,