summaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/hermes/variants/baseboard/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/prodrive/hermes/variants/baseboard/include')
-rw-r--r--src/mainboard/prodrive/hermes/variants/baseboard/include/eeprom.h33
-rw-r--r--src/mainboard/prodrive/hermes/variants/baseboard/include/variant/gpio.h12
-rw-r--r--src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h4
3 files changed, 49 insertions, 0 deletions
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 <soc/ramstage.h>
+
+#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);
diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/gpio.h b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/gpio.h
new file mode 100644
index 0000000000..50d18018f0
--- /dev/null
+++ b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/gpio.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef PCH_GPIO_H
+#define PCH_GPIO_H
+
+#include <soc/gpio.h>
+#include <intelblocks/gpio_defs.h>
+
+const struct pad_config *get_gpio_table(size_t *num);
+const struct pad_config *get_early_gpio_table(size_t *num);
+
+#endif /* PCH_GPIO_H */
diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h
new file mode 100644
index 0000000000..83cf232dd8
--- /dev/null
+++ b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h
@@ -0,0 +1,4 @@
+#include <soc/cnl_memcfg_init.h>
+
+/* Return memory configuration structure. */
+const struct cnl_mb_cfg *variant_memcfg_config(void);