diff options
Diffstat (limited to 'src/mainboard/google/myst/variants')
3 files changed, 26 insertions, 1 deletions
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__ */ |