[PATCH 1/2 v2] spi: add SPI_MOSI_IDLE_LOW support from device tree

From: charles-antoine . couret

Date: Sun Mar 29 2026 - 08:59:12 EST


From: Charles-Antoine Couret <charles-antoine.couret@xxxxxxx>

This flag was introduced but was not added as device tree property which is
limiting the possibility to use this flag on real devices.

This flag can be configured as done for other flags.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@xxxxxxx>
---
drivers/spi/spi.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9b1125556d29..489a64e20305 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2363,6 +2363,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
spi->mode |= SPI_LSB_FIRST;
if (of_property_read_bool(nc, "spi-cs-high"))
spi->mode |= SPI_CS_HIGH;
+ if (of_property_read_bool(nc, "spi-mosi-idle-low"))
+ spi->mode |= SPI_MOSI_IDLE_LOW;

/* Device DUAL/QUAD mode */

--
2.53.0