diff options
| author | Haibo Chen <haibo.chen@nxp.com> | 2026-09-28 19:53:11 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-04 22:20:44 +0200 |
| commit | 94b6df050433875f493fb8298b58d7b0dc32eb9c (patch) | |
| tree | dc557239893765a1062302d94eaf9cd8f28f401f /tools/lib/python | |
| parent | 3d743adf090cd4c9a2120c1e02b0482e88aa0d2d (diff) | |
| download | linux-next-94b6df050433875f493fb8298b58d7b0dc32eb9c.tar.gz linux-next-94b6df050433875f493fb8298b58d7b0dc32eb9c.zip | |
spi: spi-nxp-fspi: exit stop mode before waiting for DLL lock
For 8D-8D-8D (octal DTR) mode the FlexSPI samples read data using
MCR0[RXCLKSRC] = 3 (flash-memory-provided read strobe on the DQS pad),
which requires the DLL to be locked. Per the i.MX95 Reference Manual
(FlexSPI chapter, "DLL configuration for sampling"), when the serial
root clock is above 100 MHz the DLL is enabled (DLLxCR[DLLEN] = 1,
OVRDEN = 0) and software must then wait for STS2[xREFLOCK] and
STS2[xSLVLOCK] to be asserted before starting a read or write. This DLL
lock is relative to the serial root clock.
While the module is in stop mode (MCR0[MDIS] = 1) the AHB and serial
clocks are gated off internally, so the serial root clock the DLL locks
against is not running. nxp_fspi_dll_calibration() both programs DLLxCR
and then polls STS2 for lock. When it runs entirely in stop mode the
STS2 REF/SLV lock bits never assert (observed as "DLL lock failed" with
STS2 = 0).
The MCR0 bit fields (RXCLKSRC) and the serial root clock rate still have
to be reconfigured in stop mode, so keep entering stop mode around that.
Only move the exit from stop mode (clearing MCR0[MDIS]) ahead of the DLL
calibration/override step, so that the serial root clock is running when
the DLL is calibrated and STS2 can report lock.
Fixes: b4bde5cfff8e ("spi: spi-nxp-fspi: enter stop mode before reconfiguring MCR0 and DLL")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://patch.msgid.link/20260928-fspi-fix-v1-1-a0f9288cd5c8@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
