From 1017a8fc5f60e6d819d9f3a165c1d4aef766cda0 Mon Sep 17 00:00:00 2001 From: Dtrain Hsu Date: Thu, 28 Apr 2022 14:28:54 +0800 Subject: 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 Change-Id: Idb92be66927259732bfd27e4db2c9f242da7d200 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63918 Tested-by: build bot (Jenkins) Reviewed-by: Zhuohao Lee --- src/mainboard/google/brya/variants/kinox/Makefile.inc | 3 +++ src/mainboard/google/brya/variants/kinox/overridetree.cb | 8 ++++++++ src/mainboard/google/brya/variants/kinox/variant.c | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 src/mainboard/google/brya/variants/kinox/variant.c (limited to 'src/mainboard/google/brya') 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 +#include +#include + +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"; +} -- cgit v1.2.3