aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/myst/variants
diff options
context:
space:
mode:
authorJon Murphy <jpmurphy@google.com>2023-03-29 18:51:12 -0600
committerFelix Held <felix-coreboot@felixheld.de>2023-04-21 13:46:09 +0000
commit1236b333b42c8376d672093456e6485e7cde5bc4 (patch)
tree79d512d5e1059f64d7e27e83c58948bc19a0ecb6 /src/mainboard/google/myst/variants
parent79b864958338ac682f27d74f0fac2ae26b9a7a20 (diff)
mb/google/myst: Enable AP <-> GSC communication
Configure GSC I2C and Interrupt GPIOs during the early initialization. Add devicetree configuration for GSC device and enable the required config items. BUG=b:275959717 TEST=builds Change-Id: I6e235356b252a7b68a42da128ffd3189a829f117 Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74111 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/myst/variants')
-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
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__ */