Skip to content

Commit aad628c

Browse files
PeterHueweKent Yoder
authored andcommitted
char/tpm: Add new driver for Infineon I2C TIS TPM
This patch adds a driver to support Infineon's SLB 9635 TT 1.2 Soft I2C TPMs which follow the TGC TIS 1.2 TPM specification[1] and Infineon's I2C Protocol Stack Specification 0.20. The I2C Protocol Stack Specification is a simple adaption of the LPC TIS Protocol to the I2C Bus. The I2C TPMs can be used when LPC Bus is not available (i.e. non x86 architectures like ARM). The driver is based on the tpm_tis.c driver by Leendert van Dorn and Kyleen Hall and has quite similar functionality. Tested on Nvidia ARM Tegra2 Development Platform and Beagleboard (ARM OMAP) Tested with the Trousers[2] TSS API Testsuite v 0.3 [3] Compile-tested on x86 (32/64-bit) Updates since version 2.1.4: - included "Lock the I2C adapter for a sequence of requests", by Bryan Freed - use __i2c_transfer instead of own implementation of unlocked i2c_transfer - use struct dev_pm_ops for power management via SIMPLE_DEV_PM_OPS Updates since version 2.1.3: - use proper probing mechanism * either add the tpm using I2C_BOARD_INFO to your board file or probe it * during runtime e.g on BeagleBoard using : * "echo tpm_i2c_infineon 0x20 > /sys/bus/i2c/devices/i2c-2/new_device" - fix possible endless loop if hardware misbehaves - improved return codes - consistent spelling i2c/tpm -> I2C/TPM - remove hardcoded sleep values and msleep usage - removed debug statements - added check for I2C functionality - renaming to tpm_i2c_infineon Updates since version 2.1.2: - added sysfs entries for duration and timeouts - updated to new tpm_do_selftest Updates since version 2.1.0: - improved error handling - implemented workarounds needed by the tpm - fixed typos References: [1] http://www.trustedcomputinggroup.org/resources/pc_client_work_group_pc_client_ specific_tpm_interface_specification_tis_version_12/ [2] http://trousers.sourceforge.net/ [3] http://sourceforge.net/projects/trousers/files/TSS%20API%20test%20suite/0.3/ Reviewed-by: Andi Shyti <andi.shyti@gmail.com> Acked-by: Marcel Selhorst <tpmdd@selhorst.net> Signed-off-by: Peter Huewe <peter.huewe@infineon.com> Signed-off-by: Bryan Freed <bfreed@chromium.org> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
1 parent 51b743f commit aad628c

File tree

3 files changed

+707
-0
lines changed

3 files changed

+707
-0
lines changed

drivers/char/tpm/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ config TCG_TIS
3333
from within Linux. To compile this driver as a module, choose
3434
M here; the module will be called tpm_tis.
3535

36+
config TCG_TIS_I2C_INFINEON
37+
tristate "TPM Interface Specification 1.2 Interface (I2C - Infineon)"
38+
depends on I2C
39+
---help---
40+
If you have a TPM security chip that is compliant with the
41+
TCG TIS 1.2 TPM specification and Infineon's I2C Protocol Stack
42+
Specification 0.20 say Yes and it will be accessible from within
43+
Linux.
44+
To compile this driver as a module, choose M here; the module
45+
will be called tpm_tis_i2c_infineon.
46+
3647
config TCG_NSC
3748
tristate "National Semiconductor TPM Interface"
3849
depends on X86

drivers/char/tpm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ifdef CONFIG_ACPI
66
obj-$(CONFIG_TCG_TPM) += tpm_bios.o
77
endif
88
obj-$(CONFIG_TCG_TIS) += tpm_tis.o
9+
obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o
910
obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
1011
obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
1112
obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o

0 commit comments

Comments
 (0)