BACKPORT: tpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)
authorVincent Palatin <vpalatin@chromium.org>
Wed, 30 Jan 2013 00:56:41 +0000 (16:56 -0800)
committerChromeBot <chrome-bot@google.com>
Thu, 31 Jan 2013 02:22:47 +0000 (18:22 -0800)
commitf222bc145b56b19579e68dacd97607c3fed83d4d
tree37e08b90695a7196698e7f8802f73cd6665536ee
parent03f9957645280e0fcb52abbaf14bcbf6b9c37df1
BACKPORT: tpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)

This driver adds support for Infineon's new SLB 9645 TT 1.2 I2C TPMs,
which supports clockstretching, combined reads and a bus speed of
up to 400khz. The device also has a new device id.

The driver works now also fine with device trees, so you can instantiate
your device by adding:
 +       tpm {
 +               compatible = "infineon,slb9645tt";
 +               reg = <0x20>;
 +       };
for SLB 9645 devices or
 +       tpm {
 +               compatible = "infineon,slb9635tt";
 +               reg = <0x20>;
 +       };
for older SLB 9635 devices to your device tree.
tpm_i2c_infineon is also retained as a compatible id as a fallback to
slb9635 protocol.

The driver was tested on Beaglebone.

Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
BUG=chrome-os-partner:17506
TEST=boot on Snow (with SLB9635) and Spring (with SLB9645)
and check tpm_tis_i2c traces in the kernel log.

Change-Id: I1d229a027dad193e7409261ee1039600cd7fdb01
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42332
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Documentation/devicetree/bindings/i2c/trivial-devices.txt
drivers/char/tpm/tpm_tis_i2c.c