diff options
author | Fabrizio Castro <fabrizio.castro.jz@renesas.com> | 2023-09-27 17:25:08 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-09 13:14:28 +0100 |
commit | a4f7ef6db74197898c48236ad01f8e0eccc1e52b (patch) | |
tree | b327efefc7b35465b9120e2e58f86d42f1c17eca /drivers/spi/Kconfig | |
parent | 4056d88866e5941ebd15fb2523119f0ddc5186da (diff) | |
download | lwn-a4f7ef6db74197898c48236ad01f8e0eccc1e52b.tar.gz lwn-a4f7ef6db74197898c48236ad01f8e0eccc1e52b.zip |
spi: rzv2m-csi: Add target mode support
The CSI IP found inside the Renesas RZ/V2M SoC supports
both SPI host and SPI target roles.
When working in target mode, the CSI IP has the option
of using its Slave Selection (SS) pin to enable TX and RX
operations. Since the SPI target cannot control the clock,
when working as target it's best not to stop operations
during a transfer, as by doing so the IP will not send or
receive data, regardless of clock and active level on pin SS.
A side effect from not stopping operations is that the RX
FIFO needs to be flushed, word by word, when RX data needs
to be discarded.
Finally, when in target mode timings are tighter, as missing a
deadline translates to errors being thrown, resulting in
aborting the transfer. In order to speed things up, we can
avoid waiting for the TX FIFO to be empty, we can just wait
for the RX FIFO to contain at least the number of words that
we expect.
Add target support to the currently existing CSI driver.
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Link: https://lore.kernel.org/r/20230927162508.328736-3-fabrizio.castro.jz@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/Kconfig')
-rw-r--r-- | drivers/spi/Kconfig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 2c21d5b96fdc..d4ac184bce95 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -862,7 +862,8 @@ config SPI_RZV2M_CSI tristate "Renesas RZ/V2M CSI controller" depends on ARCH_RENESAS || COMPILE_TEST help - SPI driver for Renesas RZ/V2M Clocked Serial Interface (CSI) + SPI driver for Renesas RZ/V2M Clocked Serial Interface (CSI). + CSI supports both SPI host and SPI target roles. config SPI_QCOM_QSPI tristate "QTI QSPI controller" |