<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/char/tpm/Makefile, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/char/tpm/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/char/tpm/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-03T20:56:20Z</updated>
<entry>
<title>tpm: Add tpm_tis_i2c backend for tpm_tis_core</title>
<updated>2022-08-03T20:56:20Z</updated>
<author>
<name>Alexander Steffen</name>
<email>Alexander.Steffen@infineon.com</email>
</author>
<published>2022-06-08T17:31:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bbc23a07b0728c820d665d0054b2e2a6d01f0a98'/>
<id>urn:sha1:bbc23a07b0728c820d665d0054b2e2a6d01f0a98</id>
<content type='text'>
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 4dbfb5f4401f). In
case the sanity check fails, attempt a retry.

Co-developed-by: Johannes Holland &lt;johannes.holland@infineon.com&gt;
Signed-off-by: Johannes Holland &lt;johannes.holland@infineon.com&gt;
Co-developed-by: Amir Mizinski &lt;amirmizi6@gmail.com&gt;
Signed-off-by: Amir Mizinski &lt;amirmizi6@gmail.com&gt;
Signed-off-by: Alexander Steffen &lt;Alexander.Steffen@infineon.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>char: tpm: add i2c driver for cr50</title>
<updated>2021-02-16T08:40:27Z</updated>
<author>
<name>Duncan Laurie</name>
<email>dlaurie@chromium.org</email>
</author>
<published>2020-12-07T14:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3a253caaad11cf4ac371dd6549a9ec6e2f2152fa'/>
<id>urn:sha1:3a253caaad11cf4ac371dd6549a9ec6e2f2152fa</id>
<content type='text'>
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 &lt;dlaurie@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Fabien Lahoudere &lt;fabien.lahoudere@collabora.com&gt;
Signed-off-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Tested-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>tpm: tis: add support for MMIO TPM on SynQuacer</title>
<updated>2020-10-01T21:21:02Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2020-07-28T03:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d5ae56a4fe5178e289e763450362d87800f9dcac'/>
<id>urn:sha1:d5ae56a4fe5178e289e763450362d87800f9dcac</id>
<content type='text'>
When fitted, the SynQuacer platform exposes its SPI TPM via a MMIO
window that is backed by the SPI command sequencer in the SPI bus
controller. This arrangement has the limitation that only byte size
accesses are supported, and so we'll need to provide a separate module
that take this into account.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: Revert tpm_tis_spi_mod.ko to tpm_tis_spi.ko.</title>
<updated>2020-02-17T18:46:34Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2020-02-04T12:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=faaca0a0d48e7b122f6e7e2521f4f6fc487d0451'/>
<id>urn:sha1:faaca0a0d48e7b122f6e7e2521f4f6fc487d0451</id>
<content type='text'>
Revert tpm_tis_spi_mod.ko back to tpm_tis_spi.ko as the rename could
break user space scripts. This can be achieved by renaming tpm_tis_spi.c
as tpm_tis_spi_main.c. Then tpm_tis_spi-y can be used inside the
makefile.

Cc: Andrey Pronin &lt;apronin@chromium.org&gt;
Cc: Stephen Boyd &lt;swboyd@chromium.org&gt;
Cc: stable@vger.kernel.org # 5.5.x
Fixes: 797c0113c9a4 ("tpm: tpm_tis_spi: Support cr50 devices")
Reported-by: Alexander Steffen &lt;Alexander.Steffen@infineon.com&gt;
Tested-by: Alexander Steffen &lt;Alexander.Steffen@infineon.com&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: tpm_tis_spi: Support cr50 devices</title>
<updated>2019-11-12T19:45:37Z</updated>
<author>
<name>Andrey Pronin</name>
<email>apronin@chromium.org</email>
</author>
<published>2019-09-20T18:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=797c0113c9a481d4554988d70b5b52fae657262f'/>
<id>urn:sha1:797c0113c9a481d4554988d70b5b52fae657262f</id>
<content type='text'>
Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50
firmware. The firmware running on the currently supported H1 Secure
Microcontroller requires a special driver to handle its specifics:

 - need to ensure a certain delay between SPI transactions, or else
   the chip may miss some part of the next transaction
 - if there is no SPI activity for some time, it may go to sleep,
   and needs to be waken up before sending further commands
 - access to vendor-specific registers

Cr50 firmware has a requirement to wait for the TPM to wakeup before
sending commands over the SPI bus. Otherwise, the firmware could be in
deep sleep and not respond. The method to wait for the device to wakeup
is slightly different than the usual flow control mechanism described in
the TCG SPI spec. Add a completion to tpm_tis_spi_transfer() before we
start a SPI transfer so we can keep track of the last time the TPM
driver accessed the SPI bus to support the flow control mechanism.

Split the cr50 logic off into a different file to keep it out of the
normal code flow of the existing SPI driver while making it all part of
the same module when the code is optionally compiled into the same
module. Export a new function, tpm_tis_spi_init(), and the associated
read/write/transfer APIs so that we can do this. Make the cr50 code wrap
the tpm_tis_spi_phy struct with its own struct to override the behavior
of tpm_tis_spi_transfer() by supplying a custom flow control hook. This
shares the most code between the core driver and the cr50 support
without combining everything into the core driver or exporting module
symbols.

Signed-off-by: Andrey Pronin &lt;apronin@chromium.org&gt;
Cc: Andrey Pronin &lt;apronin@chromium.org&gt;
Cc: Duncan Laurie &lt;dlaurie@chromium.org&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Guenter Roeck &lt;groeck@chromium.org&gt;
Cc: Alexander Steffen &lt;Alexander.Steffen@infineon.com&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
[swboyd@chromium.org: Replace boilerplate with SPDX tag, drop
suspended bit and remove ifdef checks in cr50.h, migrate to functions
exported in tpm_tis_spi.h, combine into one module instead of two]
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE</title>
<updated>2019-09-02T14:08:35Z</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2019-07-05T20:47:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=09e574831b277a3f77d78ceadd08a3859a84fdb3'/>
<id>urn:sha1:09e574831b277a3f77d78ceadd08a3859a84fdb3</id>
<content type='text'>
Add a driver for a firmware TPM running inside TEE.

Documentation of the firmware TPM:
https://www.microsoft.com/en-us/research/publication/ftpm-software-implementation-tpm-chip/ .

Implementation of the firmware TPM:
https://github.com/Microsoft/ms-tpm-20-ref/tree/master/Samples/ARM32-FirmwareTPM

Tested-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Thirupathaiah Annapureddy &lt;thiruan@microsoft.com&gt;
Signed-off-by: Thirupathaiah Annapureddy &lt;thiruan@microsoft.com&gt;
Co-authored-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: factor out tpm 1.x duration calculation to tpm1-cmd.c</title>
<updated>2018-11-13T11:46:29Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2018-10-19T18:22:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b2d6e6de005edf5f2f46b7abacb69a0a1ce75c23'/>
<id>urn:sha1:b2d6e6de005edf5f2f46b7abacb69a0a1ce75c23</id>
<content type='text'>
Factor out TPM 1.x commands calculation into tpm1-cmd.c file.
and change the prefix from tpm_ to tpm1_.
No functional change is done here.

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: sort objects in the Makefile</title>
<updated>2018-11-13T11:46:29Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2018-10-19T18:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=100b16a6f2906624764b75684922bcdc67404847'/>
<id>urn:sha1:100b16a6f2906624764b75684922bcdc67404847</id>
<content type='text'>
Make the tpm Makefile a bit more in order by putting
objects in one column.

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: Move shared eventlog functions to common.c</title>
<updated>2018-05-09T11:45:46Z</updated>
<author>
<name>Thiebaud Weksteen</name>
<email>tweek@google.com</email>
</author>
<published>2018-04-12T10:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9b01b53566298812cb38a2e72d034ac8131c20d6'/>
<id>urn:sha1:9b01b53566298812cb38a2e72d034ac8131c20d6</id>
<content type='text'>
Functions and structures specific to TPM1 are renamed from tpm* to tpm1*.

Signed-off-by: Thiebaud Weksteen &lt;tweek@google.com&gt;
Suggested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tpm: Move eventlog files to a subdirectory</title>
<updated>2018-05-09T11:45:46Z</updated>
<author>
<name>Thiebaud Weksteen</name>
<email>tweek@google.com</email>
</author>
<published>2018-04-12T10:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0bfb23746052168620c5b52f49d8a47c3bb022fa'/>
<id>urn:sha1:0bfb23746052168620c5b52f49d8a47c3bb022fa</id>
<content type='text'>
Signed-off-by: Thiebaud Weksteen &lt;tweek@google.com&gt;
Suggested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
</content>
</entry>
</feed>
