SPI: omap2-mcspi: Fix SPI CS behaviour around cs_change in SPI transfers
Get series with b4
b4 am [email protected] change-id 20250606-cs_change_fix-bb51ac0f2bcbVersions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | spi: omap2-mcspi: Disable multi mode when CS should be kept asserted after messagedrivers/ | +9 | 0 replies | |
| 2/2 | spi: omap2-mcspi: Disable multi-mode when the previous message kept CS asserteddrivers/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] SPI: omap2-mcspi: Fix SPI CS behaviour around cs_change in SPI transfers
These patches fix the behaviour of the SPI Chip Select of the OMAP2 MCSPI driver used on TI SoCs.
The omap2-mcspi driver supports the use of multi mode (multichannel in TI documentation). In this mode, the CS is asserted and deasserted by the hardware.
The multi mode is disabled for messages when cs_change=0 for all transfers (e.g when CS is kept asserted between transfers of a same message).
The multi mode also needs to be disabled for messages when cs_change=1 on the last transfer (e.g when CS is kept asserted after the WHOLE message), and the message right after.
Currently, that is not the case and it CS is deasserted by hardware when it shouldn't.
This breaks peripheral drivers that send multiple messages with the CS asserted in between.
Patch 1 ensures that multi mode is disabled when cs_change=1 on the last transfer of the message.
Patch 2 ensures that multi mode is disable on a message following one with cs_change=1 on the last transfer.
This is the case for the TPM TIS SPI driver that uses this logic for flow control purposes.
Tested on an AM6442 platform with a TPM ST33HTPH2X32AHE4.
---
Félix Piédallu (2):
spi: omap2-mcspi: Disable multi mode when CS should be kept asserted after message
spi: omap2-mcspi: Disable multi-mode when the previous message kept CS asserted
drivers/spi/spi-omap2-mcspi.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-)
---
base-commit: c46b66be7eb595e66e93eda13149e0d4f90924ea
change-id: 20250606-cs_change_fix-bb51ac0f2bcb
Best regards,
Signature · 1 line
Félix Piédallu <[email protected]>