From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Santhosh Kumar K <s-k6@ti.com>
Cc: <broonie@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>, <richard@nod.at>, <vigneshr@ti.com>,
<tudor.ambarus@linaro.org>, <pratyush@kernel.org>,
<mwalle@kernel.org>, <linux-spi@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-mtd@lists.infradead.org>, <praneeth@ti.com>,
<u-kumar1@ti.com>, <p-mantena@ti.com>, <a-dutta@ti.com>
Subject: Re: [RFC PATCH v2 00/12] spi: cadence-quadspi: add PHY tuning support
Date: Wed, 04 Feb 2026 11:29:07 +0100 [thread overview]
Message-ID: <87343ghkek.fsf@bootlin.com> (raw)
In-Reply-To: <20260113141617.1905039-1-s-k6@ti.com> (Santhosh Kumar K.'s message of "Tue, 13 Jan 2026 19:46:05 +0530")
Hi Santhosh,
On 13/01/2026 at 19:46:05 +0530, Santhosh Kumar K <s-k6@ti.com> wrote:
> This series implements PHY tuning support for the Cadence QSPI controller to
> enable reliable high-speed operations. Without PHY tuning, controllers use
> conservative timing that limits the performance. PHY tuning calibrates RX/TX
> delay lines to find optimal data capture timing windows, enabling operation up
> to the controller's maximum frequency.
>
> Background:
> High-speed SPI memory controllers require precise timing calibration for
> reliable operation. At higher frequencies, board-to-board variations make
> fixed timing parameters inadequate. The Cadence QSPI controller includes
> a PHY interface with programmable delay lines (0-127 taps) for RX and TX
> paths, but these require runtime calibration to find the valid timing window.
>
> Approach:
> Add SDR/DDR PHY tuning algorithms for the Cadence controller:
>
> SDR Mode Tuning (1D search):
> - Searches for two consecutive valid RX delay windows
> - Selects the larger window and uses its midpoint for maximum margin
> - TX delay fixed at maximum (127) as it's less critical in SDR
>
> DDR Mode Tuning (2D search):
> - Finds RX boundaries (rxlow/rxhigh) using TX window sweeps
> - Finds TX boundaries (txlow/txhigh) at fixed RX positions
> - Defines valid region corners and detects gaps via binary search
> - Applies temperature compensation for optimal point selection
> - Handles single or dual passing regions with different strategies
>
> DQS Support:
> - Adds optional DQS (Data Strobe) mode for improved timing margins
> - Configures read data capture to use dedicated strobe signal
I am glad to know this signal is useful. I do not consider the DT
property as being the correct way to carry this information ATM, so I
will investigate a bit a propose a solution that is more uniform with
the rest of the chips description we have today.
> Patch description:
> Infrastructure (1-5):
> - Patch 1: Add DT binding for spi-has-dqs property
> - Patch 2: Implement spi_mem_execute_tuning() API in SPI core
> - Patch 3-5: Refactor and integrate tuning in MTD SPI-NAND/NOR layers and call
> tuning during probe
>
> Cadence QSPI Implementation (6-12):
> - Patch 6-8: Preparatory refactoring and DQS support
> - Patch 9: Add PHY tuning infrastructure with placeholders
> - Patch 10: Implement complete SDR/DDR tuning algorithms
> - Patch 11: Restrict PHY frequency to calibrated operations only
> - Patch 12: Enable PHY for direct memory-mapped reads and large writes
>
> Testing:
> This series was tested on TI's
> AM62A SK with OSPI NAND flash and
> AM62P SK with OSPI NOR flash:
>
> Read throughput:
> |-------------------------------------|
> | | without PHY | with PHY |
> |-------------------------------------|
> |OSPI NOR | 37.5 MB/s | 216 MB/s |
> |-------------------------------------|
> |OSPI NAND | 9.2 MB/s | 35.1 MB/s |
> |-------------------------------------|
I am surprised by these numbers, I would expect these to get higher for
SPI NANDs. I will test the series and report my observations, especially
since there is also ODDR SPI NAND support now (in nand/next, should be
part of my upcoming merge request to Linus for 6.19+1);
> Write throughput:
> |-------------------------------------|
> | | without PHY | with PHY |
> |-------------------------------------|
> |OSPI NAND | 6 MB/s | 9.2 MB/s |
> |-------------------------------------|
Overall I want to say that this series has greatly improved already, I
am really looking forward seeing this merged. I have several comments to
make, but they are mostly minor improvements which won't be very
impacting.
The tuning procedure is very well described in the code as well, which
is appreciated.
Please remove the RFC prefix for v3, it is clearly no longer needed.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-02-04 10:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 14:16 [RFC PATCH v2 00/12] spi: cadence-quadspi: add PHY tuning support Santhosh Kumar K
2026-01-13 14:16 ` [RFC PATCH v2 01/12] spi: dt-bindings: add spi-has-dqs property Santhosh Kumar K
2026-02-04 10:46 ` Miquel Raynal
2026-02-05 17:46 ` Santhosh Kumar K
2026-02-05 18:06 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 02/12] spi: spi-mem: add controller tuning support Santhosh Kumar K
2026-01-13 14:16 ` [RFC PATCH v2 03/12] mtd: spinand: perform controller tuning during probe Santhosh Kumar K
2026-02-05 17:35 ` Miquel Raynal
2026-02-06 19:23 ` Santhosh Kumar K
2026-01-13 14:16 ` [RFC PATCH v2 04/12] mtd: spi-nor: extract read operation setup into helper Santhosh Kumar K
2026-01-13 14:16 ` [RFC PATCH v2 05/12] mtd: spi-nor: perform controller tuning during probe Santhosh Kumar K
2026-01-13 14:16 ` [RFC PATCH v2 06/12] spi: cadence-quadspi: move cqspi_readdata_capture earlier Santhosh Kumar K
2026-02-05 17:35 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 07/12] spi: cadence-quadspi: add DQS support to read data capture Santhosh Kumar K
2026-02-05 17:35 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 08/12] spi: cadence-quadspi: read 'has-dqs' DT property Santhosh Kumar K
2026-02-05 17:35 ` Miquel Raynal
2026-02-19 12:14 ` Michael Walle
2026-02-20 8:21 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 09/12] spi: cadence-quadspi: add PHY tuning infrastructure Santhosh Kumar K
2026-02-05 17:39 ` Miquel Raynal
2026-02-06 19:25 ` Santhosh Kumar K
2026-02-13 8:18 ` Miquel Raynal
2026-02-18 18:07 ` Santhosh Kumar K
2026-02-19 10:30 ` Miquel Raynal
2026-02-09 9:48 ` Michael Walle
2026-02-12 10:50 ` Miquel Raynal
2026-02-12 11:14 ` Michael Walle
2026-02-12 12:55 ` Miquel Raynal
2026-02-18 18:07 ` Santhosh Kumar K
2026-02-19 8:33 ` Michael Walle
2026-02-19 10:34 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 10/12] spi: cadence-quadspi: implement PHY tuning algorithm Santhosh Kumar K
2026-02-05 17:42 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 11/12] spi: cadence-quadspi: restrict PHY frequency to tuned operations Santhosh Kumar K
2026-02-05 17:47 ` Miquel Raynal
2026-02-06 19:27 ` Santhosh Kumar K
2026-02-13 8:21 ` Miquel Raynal
2026-03-17 15:17 ` Miquel Raynal
2026-01-13 14:16 ` [RFC PATCH v2 12/12] spi: cadence-quadspi: enable PHY for direct reads and writes Santhosh Kumar K
2026-02-05 17:51 ` Miquel Raynal
2026-02-04 10:29 ` Miquel Raynal [this message]
2026-02-05 15:48 ` [RFC PATCH v2 00/12] spi: cadence-quadspi: add PHY tuning support Miquel Raynal
2026-02-06 19:28 ` Santhosh Kumar K
2026-02-13 9:01 ` Miquel Raynal
2026-02-18 18:08 ` Santhosh Kumar K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87343ghkek.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=a-dutta@ti.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=p-mantena@ti.com \
--cc=praneeth@ti.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=s-k6@ti.com \
--cc=tudor.ambarus@linaro.org \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox