All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/11] mtd/spi-mem: Enable DQS control
@ 2026-11-20 17:14 ` Miquel Raynal
  0 siblings, 0 replies; 28+ messages in thread
From: Miquel Raynal @ 2026-11-20 17:14 UTC (permalink / raw)
  To: Mark Brown, Richard Weinberger, Vignesh Raghavendra, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Pratyush Yadav, Michael Walle,
	Takahiro Kuwano
  Cc: Thomas Petazzoni, praneeth, u-kumar1, p-mantena, a-dutta, s-k6,
	linux-spi, linux-kernel, linux-mtd, devicetree, Miquel Raynal

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. For
applying this series, I would expect all the spi-mem and spi bits to be
taken by Mark, either based on an immutable branch (in which case the
mtd bits can also get in during the same cycle) or directly through b4
(and we will wait for the next cycle to merge the patches). There will
be a temporary regression if we span those patches over two releases:
the PHY tuning will not be optimal because it won't be using the DQS
capability for a period of time. Hence, merging everything in a
single release would be better, but not stricly needed either.

This series applies on top of v7.4-rc2 and Santhosh's PHY tuning series.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
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@bootlin.com

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@bootlin.com

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@bootlin.com

---
Miquel Raynal (11):
      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
      spi: cadence-quadspi: Decouple the read capture bypass from DQS
      spi: cadence-quadspi: Check DQS usability before enabling DQS capture
      mtd: spi-nor: Advertise DQS support for octal DTR flashes
      mtd: spi-nand: Set the DQS spi-mem capability if available
      mtd: spi-nand: winbond: Enable the DQS pin on W35N**JW series

 .../bindings/spi/spi-peripheral-props.yaml         | 10 ++++++++
 drivers/mtd/nand/spi/core.c                        |  3 +++
 drivers/mtd/nand/spi/winbond.c                     | 10 +++++---
 drivers/mtd/spi-nor/core.c                         |  7 ++++++
 drivers/spi/spi-cadence-quadspi.c                  | 11 +++++---
 drivers/spi/spi-mem.c                              | 29 ++++++++++++++--------
 include/linux/mtd/spinand.h                        |  1 +
 include/linux/spi/spi-mem.h                        | 12 ++++++---
 8 files changed, 61 insertions(+), 22 deletions(-)
---
base-commit: fd9230005e85472b81c1c7c16afe93dd878996b1
change-id: 20260205-winbond-nand-next-phy-tuning-aabefc018032
prerequisite-message-id: <20261105105832.2134313-1-s-k6@ti.com>
prerequisite-patch-id: 7e80450b6b26ac3240d561a7f9f0e5fe177a89b7
prerequisite-patch-id: 865537f117247ff4312d629514dd06f1f38f1d47
prerequisite-patch-id: 5200192ca3b2cc4a2fdf8afff7ee5c757fdb66b5
prerequisite-patch-id: f41f68176da636e14a8221fde30b3a32cd155bdd
prerequisite-patch-id: d23997b62c52e24d7d92a3f795b2d64ad32a6dc7
prerequisite-patch-id: 7d0c439461665f7c41639343042ddb96937d2838
prerequisite-patch-id: d8770bcd1d4f60e882cdd4ad6f35409a08dc2402
prerequisite-patch-id: 5b96154a5b95e52afc0e3f128212921984713615
prerequisite-patch-id: 500bd167644ed25f95ee48bf7992d79d611b036a
prerequisite-patch-id: 65a2ee2f666180289b3c38aef3e238803ba93f27
prerequisite-patch-id: a58a38e05737feb5f097cafe49f814a4f4a1b252
prerequisite-patch-id: d0717fa96dbc2f99111be023238973932a6c59b4
prerequisite-patch-id: 817e0b94d11c4e7884c962781ff20131a9db1aa9
prerequisite-patch-id: 16ba1c3be3824059d975c0e48a7056b061c2d652
prerequisite-patch-id: f7d67c3465c65f61ec878b6d3f049addd44316af
prerequisite-patch-id: d023f74d37fe6be398aa45a5de3cd70f775cb37a
prerequisite-patch-id: c146c437ba46a28dc74dcebe4c66ff8107ce31a3
prerequisite-patch-id: 14cf3f31d431b4622a4f225939b8d3d3eee21085
prerequisite-patch-id: 95db84235391fa3a39c1947f19411634d762e1f9

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2026-11-20 17:51 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 17:14 [PATCH v4 00/11] mtd/spi-mem: Enable DQS control Miquel Raynal
2026-11-20 17:14 ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 01/11] spi: spi-mem: Rename the DQS setter and pin field Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 02/11] spi: spi-mem: Clarify the conditions upon which DQS is usable Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 03/11] dt-bindings: spi: Document the spi-dqs-not-wired property Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 04/11] spi: spi-mem: Take the DQS wiring into account Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 05/11] spi: spi-mem: Take the controller DQS support " Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 06/11] spi: cadence-quadspi: Advertise DQS support Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 07/11] spi: cadence-quadspi: Decouple the read capture bypass from DQS Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 08/11] spi: cadence-quadspi: Check DQS usability before enabling DQS capture Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 09/11] mtd: spi-nor: Advertise DQS support for octal DTR flashes Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:14 ` [PATCH v4 10/11] mtd: spi-nand: Set the DQS spi-mem capability if available Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:30   ` sashiko-bot
2026-11-20 17:30     ` sashiko-bot
2026-11-20 17:14 ` [PATCH v4 11/11] mtd: spi-nand: winbond: Enable the DQS pin on W35N**JW series Miquel Raynal
2026-11-20 17:14   ` Miquel Raynal
2026-11-20 17:51 ` [PATCH v4 00/11] mtd/spi-mem: Enable DQS control Mark Brown
2026-11-20 17:51   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.