Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57022 )
Change subject: HACK: Herobrine: Reinit TPM INT GPIO ......................................................................
HACK: Herobrine: Reinit TPM INT GPIO
We noticed at some point after running the blobs that we started getting TPM communication errors and realized that some QC blob was reconfiguring this GPIO during execution. We haven't debugged to which blob actually does this, so basically reinitializing the TPM interrupt GPIO excessively to get around this issue for now.
Signed-off-by: Shelley Chen shchen@google.com Change-Id: I30426cc0392a640fb6d3b1d0fafca7e9a67a76c3 --- M src/mainboard/google/herobrine/boardid.c M src/mainboard/google/herobrine/chromeos.c 2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/57022/1
diff --git a/src/mainboard/google/herobrine/boardid.c b/src/mainboard/google/herobrine/boardid.c index a2e69d5..2f7ad03 100644 --- a/src/mainboard/google/herobrine/boardid.c +++ b/src/mainboard/google/herobrine/boardid.c @@ -6,6 +6,8 @@ #include <commonlib/bsd/cb_err.h> #include <console/console.h> #include <gpio.h> +#include <security/tpm/tis.h> +
uint32_t board_id(void) { diff --git a/src/mainboard/google/herobrine/chromeos.c b/src/mainboard/google/herobrine/chromeos.c index 6237f4f..a995975 100644 --- a/src/mainboard/google/herobrine/chromeos.c +++ b/src/mainboard/google/herobrine/chromeos.c @@ -4,6 +4,7 @@ #include <bootmode.h> #include "board.h" #include <security/tpm/tis.h> +#include <soc/qupv3_i2c_common.h>
void setup_chromeos_gpios(void) { @@ -29,7 +30,15 @@ lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); }
+void mainboard_blob_fix(void); int tis_plat_irq_status(void) { + mainboard_blob_fix(); return gpio_irq_status(GPIO_H1_AP_INT); } + +void mainboard_blob_fix(void) +{ + gpio_input_irq(GPIO_H1_AP_INT, IRQ_TYPE_RISING_EDGE, GPIO_PULL_UP); + i2c_init(CONFIG_DRIVER_TPM_I2C_BUS, I2C_SPEED_FAST); /* H1/TPM I2C */ +}