diff options
author | Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> | 2022-04-28 14:28:54 +0800 |
---|---|---|
committer | Paul Fagerburg <pfagerburg@chromium.org> | 2022-05-31 13:42:38 +0000 |
commit | 1017a8fc5f60e6d819d9f3a165c1d4aef766cda0 (patch) | |
tree | 7fb38cf30aa37c328ee702c8f7ae030d9d1f70de | |
parent | 9a476605066ea2fb624bc60139817ab911eecd2b (diff) |
mb/google/brya/var/kinox: Select VBT based on FW_CONFIG
Select vbt bin files based on DB_DISPLAY field of FW_CONFIG.
BUG=b:233690293
TEST=emerge-brask coreboot
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: Idb92be66927259732bfd27e4db2c9f242da7d200
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63918
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
-rw-r--r-- | src/mainboard/google/brya/variants/kinox/Makefile.inc | 3 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/kinox/overridetree.cb | 8 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/kinox/variant.c | 15 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/kinox/Makefile.inc b/src/mainboard/google/brya/variants/kinox/Makefile.inc index 27174f45bf..81f5ec41a4 100644 --- a/src/mainboard/google/brya/variants/kinox/Makefile.inc +++ b/src/mainboard/google/brya/variants/kinox/Makefile.inc @@ -1,6 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only bootblock-y += gpio.c + romstage-y += gpio.c romstage-y += memory.c + ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-y += variant.c diff --git a/src/mainboard/google/brya/variants/kinox/overridetree.cb b/src/mainboard/google/brya/variants/kinox/overridetree.cb index d5fd7cf180..2646b630fa 100644 --- a/src/mainboard/google/brya/variants/kinox/overridetree.cb +++ b/src/mainboard/google/brya/variants/kinox/overridetree.cb @@ -1,3 +1,11 @@ +fw_config + field DB_DISPLAY 0 3 + option DB_ABSENT 0 + option DB_HDMI 1 + option DB_DP 2 + end +end + chip soc/intel/alderlake # Intel Common SoC Config #+-------------------+---------------------------+ diff --git a/src/mainboard/google/brya/variants/kinox/variant.c b/src/mainboard/google/brya/variants/kinox/variant.c new file mode 100644 index 0000000000..dbc05ade80 --- /dev/null +++ b/src/mainboard/google/brya/variants/kinox/variant.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <drivers/intel/gma/opregion.h> +#include <fw_config.h> + +const char *mainboard_vbt_filename(void) +{ + if (fw_config_probe(FW_CONFIG(DB_DISPLAY, DB_HDMI))) { + printk(BIOS_INFO, "Use vbt-kinox_HDMI.bin\n"); + return "vbt-kinox_HDMI.bin"; + } + printk(BIOS_INFO, "Use vbt.bin\n"); + return "vbt.bin"; +} |