tpm: Add tpm_tis_i2c backend for tpm_tis_core
Implement the TCG I2C Interface driver, as specified in the TCG PC Client Platform TPM Profile (PTP) specification for TPM 2.0 v1.04 revision 14, section 8, I2C Interface Definition. This driver supports Guard Times. That is, if required by the TPM, the driver has to wait by a vendor-specific time after each I2C read/write. The specific time is read from the TPM_I2C_INTERFACE_CAPABILITY register. Unfortunately, the TCG specified almost but not quite compatible register addresses. Therefore, the TIS register addresses need to be mapped to I2C ones. The locality is stripped because for now, only locality 0 is supported. Add a sanity check to I2C reads of e.g. TPM_ACCESS and TPM_STS. This is to detect communication errors and issues due to non-standard behaviour (E.g. the clock stretching quirk in the BCM2835, see 4dbfb5f4). In case the sanity check fails, attempt a retry. Co-developed-by:Johannes Holland <johannes.holland@infineon.com> Signed-off-by:
Johannes Holland <johannes.holland@infineon.com> Co-developed-by:
Amir Mizinski <amirmizi6@gmail.com> Signed-off-by:
Amir Mizinski <amirmizi6@gmail.com> Signed-off-by:
Alexander Steffen <Alexander.Steffen@infineon.com> Reviewed-by:
Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by:
Jarkko Sakkinen <jarkko@kernel.org>
-
mentioned in commit 1abe841f
-
mentioned in commit a883da13
-
mentioned in commit 1abe841f
-
mentioned in commit e1d0e3c5
-
mentioned in commit 6224acfc
-
mentioned in commit 1cd19d48
-
mentioned in commit a883da13
-
mentioned in commit 1cd19d48
-
mentioned in commit 6224acfc
-
mentioned in commit 6aeca572
-
mentioned in commit 43d4e811
-
mentioned in commit e5745604
-
mentioned in commit 3ca0d714
-
mentioned in commit 0fe0d24b
-
mentioned in commit 0fe0d24b
-
mentioned in commit 35f85f04
-
mentioned in commit 07914bef
-
mentioned in commit 44494049
-
mentioned in commit 2214ded2
-
mentioned in commit 0d7c2300
-
mentioned in commit 0d7c2300
-
mentioned in commit 0d7c2300
-
mentioned in commit 9d24e4c0
-
mentioned in commit d6db8d91
-
mentioned in commit 29ef5dd8
-
mentioned in commit d772116a
-
mentioned in commit 266151a4