linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch V6 0/3] Tegra TPM driver with HW flow control
@ 2023-02-27 17:21 Krishna Yarlagadda
  2023-02-27 17:21 ` [Patch V6 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Krishna Yarlagadda @ 2023-02-27 17:21 UTC (permalink / raw)
  To: robh+dt, broonie, peterhuewe, jgg, jarkko, krzysztof.kozlowski+dt,
	linux-spi, linux-tegra, linux-integrity, linux-kernel
  Cc: thierry.reding, jonathanh, skomatineni, ldewangan,
	Krishna Yarlagadda

TPM interface spec defines flow control where TPM device would drive
MISO at same cycle as last address bit sent by controller on MOSI. This
state of wait can be detected by software reading the MISO line or
by controller hardware. Support sending transfers to controller in
single message and handle flow control in hardware. Half duplex
controllers have to support flow control in hardware.

Tegra234 and Tegra241 chips have QSPI controller that supports TPM
Interface Specification (TIS) flow control.
Since the controller only supports half duplex, SW wait polling
(flow control using full duplex transfers) method implemented in
tpm_tis_spi_main.c will not work and have to us HW flow control.

Updates in this patch set 
 - Tegra QSPI identifies itself as half duplex.
 - TPM TIS SPI driver skips flow control for half duplex and send
   transfers in single message for controller to handle it.
 - TPM device identifies as TPM device for controller to detect and
   enable HW TPM wait poll feature.

Verified with a TPM device on Tegra241 ref board using TPM2 tools.

V6:
 - Fix typo in chip name Tegra234.
 - Debug logs change skipped to be sent later.
 - Consistent usage of soc flag.
V5:
 - No SPI bus locking.
V4:
 - Split api change to different patch.
 - Describe TPM HW flow control.
V3:
 - Use SPI device mode flag and SPI controller flags.
 - Drop usage of device tree flags.
 - Generic TPM half duplex controller handling.
 - HW & SW flow control for TPM. Drop additional driver.
V2:
 - Fix dt schema errors.

Krishna Yarlagadda (3):
  spi: Add TPM HW flow flag
  tpm_tis-spi: Support hardware wait polling
  spi: tegra210-quad: Enable TPM wait polling

 drivers/char/tpm/tpm_tis_spi_main.c | 92 ++++++++++++++++++++++++++++-
 drivers/spi/spi-tegra210-quad.c     | 14 +++++
 include/linux/spi/spi.h             |  7 ++-
 3 files changed, 108 insertions(+), 5 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-01 15:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27 17:21 [Patch V6 0/3] Tegra TPM driver with HW flow control Krishna Yarlagadda
2023-02-27 17:21 ` [Patch V6 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
2023-03-01 13:34   ` Thierry Reding
2023-03-01 15:27     ` Krishna Yarlagadda
2023-02-27 17:21 ` [Patch V6 2/3] tpm_tis-spi: Support hardware wait polling Krishna Yarlagadda
2023-03-01 13:37   ` Thierry Reding
2023-02-27 17:21 ` [Patch V6 3/3] spi: tegra210-quad: Enable TPM " Krishna Yarlagadda
2023-03-01 13:39   ` Thierry Reding
2023-03-01 13:41   ` Thierry Reding
2023-03-01 13:51   ` Jon Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).