linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch V9 0/3] Tegra TPM driver with HW flow control
@ 2023-03-25 18:34 Krishna Yarlagadda
  2023-03-25 18:34 ` [Patch V9 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Krishna Yarlagadda @ 2023-03-25 18:34 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 devices may insert wait state on last clock cycle of ADDR phase.
For SPI controllers that support full-duplex transfers, this can be
detected using software by reading the MISO line. For SPI controllers
that only support half-duplex transfers, such as the Tegra QSPI, it is
not possible to detect the wait signal from software. The QSPI
controller in Tegra234 and Tegra241 implement hardware detection of the
wait signal which can be enabled in the controller for TPM devices.

Add HW flow control in TIS driver and a flag in SPI data to indicate
wait detection is required in HW. SPI controller driver determines if
this is supported. Add HW detection in Tegra QSPI controller.

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.

V9
 - renamed tpm spi transfer functions
V8:
 - fix compile warning.
V7:
 - updated patch description.
 - TPM flag set in probe.
 - minor comments.
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: Add hardware wait polling
  spi: tegra210-quad: Enable TPM wait polling

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

-- 
2.17.1


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

end of thread, other threads:[~2023-04-20 17:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 18:34 [Patch V9 0/3] Tegra TPM driver with HW flow control Krishna Yarlagadda
2023-03-25 18:34 ` [Patch V9 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
2023-03-29 22:40   ` Jarkko Sakkinen
2023-03-25 18:34 ` [Patch V9 2/3] tpm_tis-spi: Add hardware wait polling Krishna Yarlagadda
2023-03-29 22:41   ` Jarkko Sakkinen
2023-04-20  2:32   ` Jerry Snitselaar
2023-04-20  3:11     ` Jerry Snitselaar
2023-04-20 17:38       ` Krishna Yarlagadda
2023-03-25 18:34 ` [Patch V9 3/3] spi: tegra210-quad: Enable TPM " Krishna Yarlagadda
2023-03-29 22:18 ` [Patch V9 0/3] Tegra TPM driver with HW flow control Jarkko Sakkinen

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).