summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm
diff options
context:
space:
mode:
authorJett Rink <jettrink@google.com>2024-06-10 09:31:14 -0600
committerFelix Held <felix-coreboot@felixheld.de>2024-06-14 12:33:31 +0000
commitd41ad724cd2430558e4ecbb5e90b769555b68c34 (patch)
tree6d3a3d86a22012a49bea041b1f22d7d6e1916c3c /src/drivers/i2c/tpm
parentce9562f6628039e9bb28f60c318f29c56fc4d559 (diff)
tpm: Add Ti50 OpenTitan DID_VID
The OpenTitan HW implements the same firmware interface as the Ti50 H1D3C hardware variant; it just has a different DID_VID. Allow this new DID_VID to be recognized correctly. BUG=b:324940153 Change-Id: Iaacf6d88bc6067948756c465aac1cd8b24ecae1f Signed-off-by: Jett Rink <jettrink@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83033 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/drivers/i2c/tpm')
-rw-r--r--src/drivers/i2c/tpm/cr50.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c
index 3bc98c370a..5f5ca66d5f 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -34,7 +34,8 @@
#define CR50_TIMEOUT_LONG_MS 2000 /* Long timeout while waiting for TPM */
#define CR50_TIMEOUT_SHORT_MS 2 /* Short timeout during transactions */
#define CR50_DID_VID 0x00281ae0L
-#define TI50_DID_VID 0x504a6666L
+#define TI50_DT_DID_VID 0x504a6666L
+#define TI50_OT_DID_VID 0x50666666L
struct tpm_inf_dev {
int bus;
@@ -449,7 +450,8 @@ static tpm_result_t cr50_i2c_probe(uint32_t *did_vid)
rc = cr50_i2c_read(TPM_DID_VID(0), (uint8_t *)did_vid, 4);
/* Exit once DID and VID verified */
- if (!rc && (*did_vid == CR50_DID_VID || *did_vid == TI50_DID_VID)) {
+ if (!rc && (*did_vid == CR50_DID_VID || *did_vid == TI50_DT_DID_VID ||
+ *did_vid == TI50_OT_DID_VID)) {
printk(BIOS_INFO, "done! DID_VID 0x%08x\n", *did_vid);
return TPM_SUCCESS;
}