From 3c4e0ad5616dd6f8090c2a3bc0fe013a80a4040e Mon Sep 17 00:00:00 2001 From: Leo Chou Date: Wed, 6 Sep 2023 16:40:40 +0800 Subject: [PATCH] mb/google/nissa/var/pujjo: Select VBT based on FW_CONFIG for pujjo1e Select pujjo1e vbt bin files based on PANEL_IVO_BOE field of FW_CONFIG. BUG=b:299852789 TEST=emerge-nissa coreboot Signed-off-by: Leo Chou Change-Id: I344f97331e79e713af47ad743e27794e21be4ca3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77688 Tested-by: build bot (Jenkins) Reviewed-by: Nick Vaccaro --- .../google/brya/variants/pujjo/overridetree.cb | 4 ++++ src/mainboard/google/brya/variants/pujjo/variant.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/mainboard/google/brya/variants/pujjo/overridetree.cb b/src/mainboard/google/brya/variants/pujjo/overridetree.cb index 3dffd31741..f1bee666ba 100644 --- a/src/mainboard/google/brya/variants/pujjo/overridetree.cb +++ b/src/mainboard/google/brya/variants/pujjo/overridetree.cb @@ -45,6 +45,10 @@ fw_config option LTE_EM060_ABSENT 0 option LTE_EM060_PRESENT 1 end + field PANEL_IVO_BOE 21 + option IVO_BOE_ABSENT 0 + option IVO_BOE_PRESENT 1 + end end diff --git a/src/mainboard/google/brya/variants/pujjo/variant.c b/src/mainboard/google/brya/variants/pujjo/variant.c index 97e7e557d4..695f043978 100644 --- a/src/mainboard/google/brya/variants/pujjo/variant.c +++ b/src/mainboard/google/brya/variants/pujjo/variant.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include @@ -68,3 +70,13 @@ void variant_init(void) gpio_configure_pads(fm350_perst_pad, ARRAY_SIZE(fm350_perst_pad)); } } + +const char *mainboard_vbt_filename(void) +{ + if (fw_config_probe(FW_CONFIG(PANEL_IVO_BOE, IVO_BOE_PRESENT))) { + printk(BIOS_INFO, "Use vbt-pujjo1e.bin\n"); + return "vbt-pujjo1e.bin"; + } + printk(BIOS_INFO, "Use vbt.bin\n"); + return "vbt.bin"; +}