[PATCH v5 0/6] mtd/spi-mem: Enable DQS control

From: Miquel Raynal

Date: Tue Nov 24 2026 - 09:43:58 EST


For his PHY tuning series on the Cadence QSPI controller embedded in TI
SoCs, Santhosh initially needed to access the availability of the DQS
(data strobe) signal. This is a chip dependent capability, which may
sometimes be enabled.

The SPI memory flag already exist but is too vague for it. Let the SPI
NAND core and SPI NOR core set this flag when relevant (per-chip for SPI
NAND, always for SPI NOR until we can do better). SPI controllers now
feature a DQS capability that they need to fill. Manufacturer drivers
and SPI controllers can now query the usability of the feature to use
it/enable it.

I contributed the spi-mem bit in the previous cycle but my changes were
too simple, and a more complex approach was actually needed.

As opposed to v4, this series applies directly on top of v7.4-rc2.

More changes will come on top, especially on the NOR and NAND sides,
plus more Cadence QSPI changes on top of Santhosh's series.

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
Changes in v5:
- Drop the dependency on Santhosh's series to make sure the spi-mem
changes can get in independently. The only conflict there is the fact
that both of us add a property to the the same binding.
- Kept only the SPI/spi-mem patches.
- Fix my understanding of the Winbond I/O configuration (not sent in this iteration)
- Also fix the location where SPI NAND sets the DQS flag (also not sent in this iteration)
- Link to v4: https://lore.kernel.org/r/20261120-winbond-nand-next-phy-tuning-v4-0-8c21e1f71f41@xxxxxxxxxxx

Changes in v4:
- Added a spi-dqs-not-wired DT property to describe boards where the DQS
line is not routed.
- Parsed the property in spi-mem.
- Renamed several helpers to explain what they do more obviously.
- Added a controller DQS capability;
- Expose that DQS is usable only when the memory supports it, the line
is wired and the controller supports it as well.
- Advertised the DQS capability in the Cadence QSPI driver.
- Advertised the DQS capability before the SSDR/ODTR variants are
negotiated.
- Only enabled the Winbond DQS output when spi_mem_dqs_is_usable() reports
it as usable, to avoid useless power consumption.
- Enabled DQS in SPI NOR (always).
- Dropped the already merged spi-mem capability patch from the series.
- Rebased on v7.4-rc2.
- Link to v3: https://lore.kernel.org/r/20260810-winbond-nand-next-phy-tuning-v3-0-a97c3a61e675@xxxxxxxxxxx

Changes in v3:
- Rebased on top of linux-spi/for-7.3 and dopped all existing
dependencies on the MTD bits.
- Link to v2: https://lore.kernel.org/r/20260807-winbond-nand-next-phy-tuning-v2-0-73595e89d6e3@xxxxxxxxxxx

Changes in v2:
- Dropped the RFC prefix.
- Rebased on top of v7.2-rc1.
- Dropped the spi patch for now, just allowing to use DQS on a few
Winbond SPI NANDs (can be improved later).
- Link to v1: https://lore.kernel.org/r/20260205-winbond-nand-next-phy-tuning-v1-0-5e7d3976f0f1@xxxxxxxxxxx

---
Miquel Raynal (6):
spi: spi-mem: Rename the DQS setter and pin field
spi: spi-mem: Clarify the conditions upon which DQS is usable
dt-bindings: spi: Document the spi-dqs-not-wired property
spi: spi-mem: Take the DQS wiring into account
spi: spi-mem: Take the controller DQS support into account
spi: cadence-quadspi: Advertise DQS support

.../bindings/spi/spi-peripheral-props.yaml | 10 ++++++++
drivers/spi/spi-cadence-quadspi.c | 2 ++
drivers/spi/spi-mem.c | 29 ++++++++++++++--------
include/linux/spi/spi-mem.h | 12 ++++++---
4 files changed, 38 insertions(+), 15 deletions(-)
---
base-commit: fd9230005e85472b81c1c7c16afe93dd878996b1
change-id: 20260205-winbond-nand-next-phy-tuning-aabefc018032

Best regards,
--
Miquel Raynal <miquel.raynal@xxxxxxxxxxx>