On Mon, Feb 27, 2023 at 05:36:59PM +0530, Krishna Yarlagadda wrote: > 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 patchset > - 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. > > 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 | 21 +++++++ > include/linux/spi/spi.h | 7 ++- > 3 files changed, 115 insertions(+), 5 deletions(-) > > -- > 2.17.1 > Funny that this is already in v5, I'm seeing this for the very first time. BR, Jarkko