Eric Lai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63011 )
Change subject: drivers/i2c/tpm: Add workaround for Ti50 ......................................................................
drivers/i2c/tpm: Add workaround for Ti50
Ti50 FW under 0.15 is not support board cfg. And ODM stocks are 0.12 pre-flashed. Add workaroud for the old Ti50 chip.
BUG=b:224650720 TEST=no I2C errors in coreboot. [ERROR] cr50_i2c_read: Address write failed [INFO ] .I2C stop bit not received
Signed-off-by: Eric Lai eric_lai@quanta.corp-partner.google.com Change-Id: Ieec7842ca66b4c690df04a400cebcf45138c745d --- M src/drivers/i2c/tpm/Kconfig M src/drivers/i2c/tpm/cr50.c M src/mainboard/google/brya/Kconfig 3 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/63011/1
diff --git a/src/drivers/i2c/tpm/Kconfig b/src/drivers/i2c/tpm/Kconfig index dcf9060..61e9c80 100644 --- a/src/drivers/i2c/tpm/Kconfig +++ b/src/drivers/i2c/tpm/Kconfig @@ -24,6 +24,12 @@ help Board has a generic I2C TPM support
+config MAINBOARD_HAS_I2C_TI50 + bool + default n + help + Board has a Ti50 I2C TPM support + config DRIVER_TIS_DEFAULT bool depends on I2C_TPM diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index ce2278b..726dfa7 100644 --- a/src/drivers/i2c/tpm/cr50.c +++ b/src/drivers/i2c/tpm/cr50.c @@ -500,7 +500,10 @@ printk(BIOS_DEBUG, "cr50 TPM 2.0 (i2c %u:0x%02x id 0x%x)\n", bus, dev_addr, did_vid >> 16);
- if (tpm_first_access_this_boot()) { + /* Ti50 FW version under 0.15 doesn't support board cfg + TODO: remove this flag after all stocks Ti50 uprev to 0.15 or above + */ + if (!CONFIG(MAINBOARD_HAS_I2C_TI50) && tpm_first_access_this_boot()) { /* This is called for the side-effect of printing the version string. */ cr50_get_firmware_version(&ver); cr50_set_board_cfg(); diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig index 199db11..0139d54 100644 --- a/src/mainboard/google/brya/Kconfig +++ b/src/mainboard/google/brya/Kconfig @@ -60,6 +60,7 @@ def_bool n select BOARD_GOOGLE_BRYA_COMMON select CHROMEOS_DRAM_PART_NUMBER_IN_CBI if CHROMEOS + select MAINBOARD_HAS_I2C_TI50 select MEMORY_SOLDERDOWN select SOC_INTEL_ALDERLAKE_PCH_N select SOC_INTEL_CSE_LITE_COMPRESS_ME_RW