From d1a42b6fa92ed2c6a03e7a9ad8bbfd9fe8988e91 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 10 Aug 2022 15:28:15 -0600 Subject: mb/google/guybrush: Pass in Cr50 IRQ to PSP Different guybrush boards have different TPM IRQs. This change passes in the correct GPIO to the TPM. BUG=b:241824257 TEST=Boot guybrush and verify GPIO 3 was passed and that OEM Crypto test passes Signed-off-by: Raul E Rangel Change-Id: I61954fa4493fd56e528b616ca65166a31917f557 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66615 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Karthik Ramasubramanian --- src/mainboard/google/guybrush/mainboard.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/guybrush/mainboard.c b/src/mainboard/google/guybrush/mainboard.c index cab570672d..f6f7ccb81d 100644 --- a/src/mainboard/google/guybrush/mainboard.c +++ b/src/mainboard/google/guybrush/mainboard.c @@ -4,9 +4,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -115,11 +117,22 @@ void __weak variant_devtree_update(void) { } +static void configure_psp_tpm_gpio(void) +{ + const struct device *cr50_dev = DEV_PTR(cr50); + struct drivers_i2c_tpm_config *cfg = config_of(cr50_dev); + + psp_set_tpm_irq_gpio(cfg->irq_gpio.pins[0]); +} + static void mainboard_init(void *chip_info) { mainboard_configure_gpios(); mainboard_ec_init(); variant_devtree_update(); + + /* Run this after variant_devtree_update so the IRQ is correct. */ + configure_psp_tpm_gpio(); } static void mainboard_write_blken(void) -- cgit v1.2.3