[PATCH v4 08/11] spi: cadence-quadspi: Check DQS usability before enabling DQS capture

From: Miquel Raynal

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


The DTR tuning path unconditionally enables DQS capture. But DQS is only
usable when the memory supports it, the DQS line is wired to the
controller and the controller is capable. Use the spi-mem helper that
combines these conditions instead of assuming DQS is always available.

This lets the driver fall back to delay-based capture for DTR memories
that do not have a usable DQS line.

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
drivers/spi/spi-cadence-quadspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 683924a4a274..05f64ebb1965 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -3538,7 +3538,7 @@ static int cqspi_am654_ospi_execute_tuning(struct spi_mem *mem,
f_pdata->dtr = op_is_dtr;

if (op_is_dtr) {
- f_pdata->use_dqs = true;
+ f_pdata->use_dqs = spi_mem_dqs_is_usable(mem);
cqspi_phy_pre_config(cqspi, f_pdata, false);
ret = cqspi_phy_tuning_ddr(f_pdata, mem);
} else {

--
2.56.0