summaryrefslogtreecommitdiff
path: root/src/mainboard/google/myst
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/myst')
-rw-r--r--src/mainboard/google/myst/Kconfig16
-rw-r--r--src/mainboard/google/myst/bootblock.c6
-rw-r--r--src/mainboard/google/myst/mainboard.c1
-rw-r--r--src/mainboard/google/myst/variants/baseboard/devicetree.cb9
-rw-r--r--src/mainboard/google/myst/variants/baseboard/gpio.c15
-rw-r--r--src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h3
6 files changed, 48 insertions, 2 deletions
diff --git a/src/mainboard/google/myst/Kconfig b/src/mainboard/google/myst/Kconfig
index 8739506af9..76061fe8e1 100644
--- a/src/mainboard/google/myst/Kconfig
+++ b/src/mainboard/google/myst/Kconfig
@@ -18,13 +18,24 @@ config BOARD_SPECIFIC_OPTIONS
select ELOG_GSMI
select FW_CONFIG
select FW_CONFIG_SOURCE_CHROMEEC_CBI
+ select I2C_TPM
select MAINBOARD_HAS_CHROMEOS
+ select MAINBOARD_HAS_TPM2
select SOC_AMD_COMMON_BLOCK_USE_ESPI
select SOC_AMD_PHOENIX
+ select TPM_GOOGLE_TI50
config DEVICETREE
default "variants/baseboard/devicetree.cb"
+config DRIVER_TPM_I2C_BUS
+ hex
+ default 0x02
+
+config DRIVER_TPM_I2C_ADDR
+ hex
+ default 0x50
+
config FMDFILE
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/chromeos.fmd"
@@ -52,4 +63,9 @@ config VBOOT
select VBOOT_SEPARATE_VERSTAGE
select VBOOT_STARTS_IN_BOOTBLOCK
+# TODO(b/277087492): Enable GSC CBFS verification
+config VBOOT_GSCVD
+ bool
+ default n
+
endif # BOARD_GOOGLE_BASEBOARD_MYST
diff --git a/src/mainboard/google/myst/bootblock.c b/src/mainboard/google/myst/bootblock.c
index 4d4d7e7468..e9d69e32bc 100644
--- a/src/mainboard/google/myst/bootblock.c
+++ b/src/mainboard/google/myst/bootblock.c
@@ -18,7 +18,11 @@ void mb_set_up_early_espi(void)
void bootblock_mainboard_early_init(void)
{
- /* TODO(b/275959717): Perform mainboard initialization */
+ size_t num_gpios;
+ const struct soc_amd_gpio *gpios;
+
+ variant_tpm_gpio_table(&gpios, &num_gpios);
+ gpio_configure_pads(gpios, num_gpios);
}
void bootblock_mainboard_init(void)
diff --git a/src/mainboard/google/myst/mainboard.c b/src/mainboard/google/myst/mainboard.c
index 3a25e8c834..44e8f67fa7 100644
--- a/src/mainboard/google/myst/mainboard.c
+++ b/src/mainboard/google/myst/mainboard.c
@@ -5,6 +5,7 @@
#include <baseboard/variants.h>
#include <console/console.h>
#include <device/device.h>
+#include <drivers/i2c/tpm/chip.h>
#include <soc/acpi.h>
#include <variant/ec.h>
diff --git a/src/mainboard/google/myst/variants/baseboard/devicetree.cb b/src/mainboard/google/myst/variants/baseboard/devicetree.cb
index 466b2dcc1b..085e464e8f 100644
--- a/src/mainboard/google/myst/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/myst/variants/baseboard/devicetree.cb
@@ -186,6 +186,13 @@ chip soc/amd/phoenix
device ref uart_0 on end # UART0
device ref i2c_0 on end
device ref i2c_1 on end
- device ref i2c_2 on end
+ device ref i2c_2 on
+ chip drivers/i2c/tpm
+ register "hid" = ""GOOG0005""
+ register "desc" = ""Ti50 TPM""
+ register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_84)"
+ device i2c 50 alias ti50 on end
+ end
+ end
device ref i2c_3 on end
end # chip soc/amd/phoenix
diff --git a/src/mainboard/google/myst/variants/baseboard/gpio.c b/src/mainboard/google/myst/variants/baseboard/gpio.c
index b2eccfff6e..56b814309c 100644
--- a/src/mainboard/google/myst/variants/baseboard/gpio.c
+++ b/src/mainboard/google/myst/variants/baseboard/gpio.c
@@ -168,6 +168,15 @@ static const struct soc_amd_gpio base_gpio_table[] = {
PAD_GPO(GPIO_157, HIGH),
};
+static const struct soc_amd_gpio tpm_gpio_table[] = {
+ /* I2C2_SCL */
+ PAD_NF(GPIO_113, I2C2_SCL, PULL_NONE),
+ /* I2C2_SDA */
+ PAD_NF(GPIO_114, I2C2_SDA, PULL_NONE),
+ /* GSC_SOC_INT_L */
+ PAD_INT(GPIO_84, PULL_NONE, EDGE_LOW, STATUS_DELIVERY),
+};
+
/* GPIO configuration in bootblock */
static const struct soc_amd_gpio bootblock_gpio_table[] = {
/* TODO(b/275965982): Fill bootblock gpio configuration */
@@ -208,6 +217,12 @@ void variant_espi_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
*gpio = espi_gpio_table;
}
+__weak void variant_tpm_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
+{
+ *size = ARRAY_SIZE(tpm_gpio_table);
+ *gpio = tpm_gpio_table;
+}
+
__weak void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = 0;
diff --git a/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h
index a39d2bf742..d5c251369e 100644
--- a/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h
@@ -21,4 +21,7 @@ void variant_espi_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
*/
void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
+/* This function provides GPIO settings for TPM i2c bus. */
+void variant_tpm_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
+
#endif /* __BASEBOARD_VARIANTS_H__ */