Re: [Patch V6 3/3] spi: tegra210-quad: Enable TPM wait polling

From: Thierry Reding
Date: Wed Mar 01 2023 - 08:41:11 EST


On Mon, Feb 27, 2023 at 10:51:08PM +0530, Krishna Yarlagadda wrote:
> Trusted Platform Module requires flow control. As defined in TPM
> interface specification, client would drive MISO line at same cycle as
> last address bit on MOSI.
> Tegra241 QSPI controller has TPM wait state detection feature which is
> enabled for TPM client devices reported in SPI device mode bits.
> Set half duplex flag for TPM device to detect and send entire message
> to controller in one shot.
>
> Signed-off-by: Krishna Yarlagadda <kyarlagadda@xxxxxxxxxx>
> ---
> drivers/spi/spi-tegra210-quad.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c
> index b967576b6c96..e1165584a20a 100644
> --- a/drivers/spi/spi-tegra210-quad.c
> +++ b/drivers/spi/spi-tegra210-quad.c
> @@ -142,6 +142,7 @@
>
> #define QSPI_GLOBAL_CONFIG 0X1a4
> #define QSPI_CMB_SEQ_EN BIT(0)
> +#define QSPI_TPM_WAIT_POLL_EN BIT(1)
>
> #define QSPI_CMB_SEQ_ADDR 0x1a8
> #define QSPI_ADDRESS_VALUE_SET(X) (((x) & 0xFFFF) << 0)
> @@ -164,6 +165,7 @@
> struct tegra_qspi_soc_data {
> bool has_dma;
> bool cmb_xfer_capable;
> + bool support_tpm;

Nit: this could be "supports_tpm" for slightly more consistency with
"has_dma".

Thierry

Attachment: signature.asc
Description: PGP signature