[PATCH v4 09/11] mtd: spi-nor: Advertise DQS support for octal DTR flashes

From: Miquel Raynal

Date: Fri Nov 20 2026 - 12:15:55 EST


The SPI NOR core does not advertise the DQS capability to the controller,
so spi_mem_dqs_is_usable() returns false for SPI NOR flashes even when
they support DQS. Controllers able to use DQS read data capture are
therefore not able to enable it with octal DTR flashes.

Advertise the DQS pin when the read protocol is octal DTR. DQS support is
a per-flash capability which should be described in the flash_info tables,
but there is no flag for it yet. Keep a TODO in the code and enable the
feature by default for all octal DTR flashes until the per-flash
description is added.

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
drivers/mtd/spi-nor/core.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index ecf5fdf38471..b78c8fb5a101 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3638,6 +3638,13 @@ static int spi_nor_probe(struct spi_mem *spimem)
return -ENOMEM;
}

+ /*
+ * TODO: DQS support is a per-flash capability which should be described
+ * in the flash_info tables, it is considered enabled by default.
+ */
+ if (nor->read_proto == SNOR_PROTO_8_8_8_DTR)
+ spi_mem_set_dqs_pin_available(spimem);
+
/*
* Populate the persistent template and run PHY tuning before dirmap
* creation so the validated frequency feeds into the dirmap op.

--
2.56.0