From b646e28769f27ee2812925f63fe2f73c67e23c9e Mon Sep 17 00:00:00 2001 From: Christian Walter Date: Thu, 9 Jan 2020 15:42:42 +0100 Subject: mb/prodrive/hermes: Add new mainboard port This patch adds support for the Prodrive Hermes mainboard. Tested with CoffeeLakeFspBinPkg FSP 7.0.68.41. Untested: * CNVi * Intel Graphics Tested: * CPU Intel Xeon E2288G * CPU Intel Core i3-9100F * CPU Intel Core i7 9700KF * CPU Intel Core i7 9700E * CPU Intel Core i7 9700F * CPU Intel Core i5 9600K * CPU Intel Pentium Gold G5400 * PCIe Link Width x8 on Slot6 by changing PCIe mux * All four DDR4 slots in different configurations * USB2.0 HDR1 * USB2.0 HDR2 * USB3.0 HDR * Slot1 * Slot2 * Slot3 * Slot4 * Slot6 * M2.M NVMEe * Ethernet PHYs 0-4 * Aspeed BMC PCIe * Aspeed BMC USB * Aspeed Graphics init * USB3 backplane all working * I801 SMBUS Not Working: * Intel HDA Change-Id: Id7d051d3fa6823618691d5572087c9ae589c2862 Signed-off-by: Christian Walter Signed-off-by: Patrick Rudolph Signed-off-by: Christian Walter Reviewed-on: https://review.coreboot.org/c/coreboot/+/38303 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- .../hermes/variants/baseboard/include/eeprom.h | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h (limited to 'src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h') diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h b/src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h new file mode 100644 index 0000000000..c41ead28ab --- /dev/null +++ b/src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include + +#define HOSTC 0x40 +#define SMBUS_IO_BASE 0xefa0 +#define HOSTC_I2C_EN (1 << 2) +#define I2C_ADDR_EEPROM 0x57 + +#if ENV_ROMSTAGE +#define FSP_UPD_SIGNATURE FSPM_UPD_SIGNATURE +#define EEPROM_OFFSET_FSP_SIGNATURE 0 +#define EEPROM_OFFSET_FSP_CONFIG 0 + +#define GET_VALUE(x) {.offset = sizeof(FSP_UPD_HEADER) + sizeof(FSPM_ARCH_UPD) \ + + offsetof(FSP_M_CONFIG, x), .size = member_size(FSP_M_CONFIG, x)} +#else + +#define FSP_UPD_SIGNATURE FSPS_UPD_SIGNATURE +#define EEPROM_OFFSET_FSP_SIGNATURE 0x0600 +#define EEPROM_OFFSET_FSP_CONFIG (EEPROM_OFFSET_FSP_SIGNATURE + sizeof(FSP_UPD_HEADER)) +#define GET_VALUE(x) {.offset = offsetof(FSP_S_CONFIG, x), \ + .size = member_size(FSP_S_CONFIG, x)} +#endif // ENV_ROMSTAGE + +typedef struct { + size_t offset; + size_t size; +} fsp_params; + +bool read_write_config(u8 addr, void *blob, size_t read_offset, size_t write_offset, + size_t size); +int check_signature(u8 addr); -- cgit v1.2.3