Skip to content

Commit 3a253ca

Browse files
Duncan Lauriejarkkojs
authored andcommitted
char: tpm: add i2c driver for cr50
Add TPM 2.0 compatible I2C interface for chips with cr50 firmware. The firmware running on the currently supported H1 MCU requires a special driver to handle its specific protocol, and this makes it unsuitable to use tpm_tis_core_* and instead it must implement the underlying TPM protocol similar to the other I2C TPM drivers. - All 4 bytes of status register must be read/written at once. - FIFO and burst count is limited to 63 and must be drained by AP. - Provides an interrupt to indicate when read response data is ready and when the TPM is finished processing write data. This driver is based on the existing infineon I2C TPM driver, which most closely matches the cr50 i2c protocol behavior. Signed-off-by: Duncan Laurie <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Fabien Lahoudere <[email protected]> Signed-off-by: Adrian Ratiu <[email protected]> Tested-by: Adrian Ratiu <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent d87719c commit 3a253ca

File tree

3 files changed

+802
-0
lines changed

3 files changed

+802
-0
lines changed

drivers/char/tpm/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ config TCG_TIS_SYNQUACER
8686
To compile this driver as a module, choose M here;
8787
the module will be called tpm_tis_synquacer.
8888

89+
config TCG_TIS_I2C_CR50
90+
tristate "TPM Interface Specification 2.0 Interface (I2C - CR50)"
91+
depends on I2C
92+
select TCG_CR50
93+
help
94+
This is a driver for the Google cr50 I2C TPM interface which is a
95+
custom microcontroller and requires a custom i2c protocol interface
96+
to handle the limitations of the hardware. To compile this driver
97+
as a module, choose M here; the module will be called tcg_tis_i2c_cr50.
98+
8999
config TCG_TIS_I2C_ATMEL
90100
tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)"
91101
depends on I2C

drivers/char/tpm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ obj-$(CONFIG_TCG_TIS_SPI) += tpm_tis_spi.o
2727
tpm_tis_spi-y := tpm_tis_spi_main.o
2828
tpm_tis_spi-$(CONFIG_TCG_TIS_SPI_CR50) += tpm_tis_spi_cr50.o
2929

30+
obj-$(CONFIG_TCG_TIS_I2C_CR50) += tpm_tis_i2c_cr50.o
31+
3032
obj-$(CONFIG_TCG_TIS_I2C_ATMEL) += tpm_i2c_atmel.o
3133
obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o
3234
obj-$(CONFIG_TCG_TIS_I2C_NUVOTON) += tpm_i2c_nuvoton.o

0 commit comments

Comments
 (0)