From 4a0dee21ae97ea10eadae3bf5286ea6938b8eb89 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 2 Dec 2021 11:45:50 +0100 Subject: [PATCH] mb/prodrive/hermes: Add VBT for Avalanche systems The Hermes mainboard is used in different system configurations. The current VBT for Poseidon systems is unsuitable for Avalanche systems because display ports are connected differently. Add a new field in the BMC config EEPROM layout and use it to choose the correct VBT for every system configuration. Change-Id: I2647f2ae3f496b9ad75980ba86beb7800fdb0668 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/59838 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/mainboard/prodrive/hermes/Makefile.inc | 2 ++ src/mainboard/prodrive/hermes/avalanche-data.vbt | Bin 0 -> 4608 bytes src/mainboard/prodrive/hermes/eeprom.h | 1 + src/mainboard/prodrive/hermes/mainboard.c | 11 +++++++++++ 4 files changed, 14 insertions(+) create mode 100644 src/mainboard/prodrive/hermes/avalanche-data.vbt diff --git a/src/mainboard/prodrive/hermes/Makefile.inc b/src/mainboard/prodrive/hermes/Makefile.inc index caaddec7be..63be66c655 100644 --- a/src/mainboard/prodrive/hermes/Makefile.inc +++ b/src/mainboard/prodrive/hermes/Makefile.inc @@ -10,3 +10,5 @@ ramstage-y += ramstage.c ramstage-y += mainboard.c ramstage-y += eeprom.c ramstage-y += smbios.c + +$(call add_vbt_to_cbfs, vbt-avalanche.bin, avalanche-data.vbt) diff --git a/src/mainboard/prodrive/hermes/avalanche-data.vbt b/src/mainboard/prodrive/hermes/avalanche-data.vbt new file mode 100644 index 0000000000000000000000000000000000000000..c3513310bbabe8fc182566ad1b0913e39447dd8f GIT binary patch literal 4608 zcmeHKU2GIp6h5=FzjtP~vr{7NiuLdl*e$fo7N}TDob7J0OBZ(AEzJ^5y1)+Du+Z8c zEe7M7G|GdLKA=H^(ifr<6Y62m5^NfGj_eyQ=^K;!_@RlBQOqV%7~j8NFX>}@C-frb2A_$e zi7BzJ$>CBFcTFDNr;l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j EFYt=Y9{>OV literal 0 HcmV?d00001 diff --git a/src/mainboard/prodrive/hermes/eeprom.h b/src/mainboard/prodrive/hermes/eeprom.h index a42a3d7520..4b609dfeab 100644 --- a/src/mainboard/prodrive/hermes/eeprom.h +++ b/src/mainboard/prodrive/hermes/eeprom.h @@ -63,6 +63,7 @@ _Static_assert(sizeof(struct eeprom_board_settings) == (10 + sizeof(uint32_t)), struct __packed eeprom_bmc_settings { uint8_t pcie_mux; uint8_t hsi; + uint8_t efp3_displayport; }; #define HERMES_SERIAL_NUMBER_LENGTH 32 diff --git a/src/mainboard/prodrive/hermes/mainboard.c b/src/mainboard/prodrive/hermes/mainboard.c index 81ed641078..6ca9613b09 100644 --- a/src/mainboard/prodrive/hermes/mainboard.c +++ b/src/mainboard/prodrive/hermes/mainboard.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,16 @@ #include "eeprom.h" #include "gpio.h" +const char *mainboard_vbt_filename(void) +{ + const struct eeprom_bmc_settings *bmc_cfg = get_bmc_settings(); + + if (bmc_cfg && bmc_cfg->efp3_displayport) + return "vbt-avalanche.bin"; + else + return "vbt.bin"; /* Poseidon */ +} + /* FIXME: Example code below */ static void mb_configure_dp1_pwr(bool enable)