spi: spi-nxp-fspi: enter stop mode before reconfiguring MCR0 and DLL
authorHaibo Chen <haibo.chen@nxp.com>
Tue, 28 Jul 2026 10:18:09 +0000 (18:18 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 30 Jul 2026 12:13:49 +0000 (13:13 +0100)
commitb4bde5cfff8e43e948219f0a598e4bf057ecfba4
treee68bcca6de4a226f333021ddbe1e58439391f8ad
parent9c19d60fea9f46ed0c3394653ef4941f1a459968
spi: spi-nxp-fspi: enter stop mode before reconfiguring MCR0 and DLL

In nxp_fspi_select_mem() the RX sample clock source (MCR0[RXCLKSRC])
and the DLL control registers (DLLxCR) are reconfigured while the
FlexSPI module is still enabled. According to the FlexSPI reference
manual initialization sequence, MCR0 and the DLL control registers
should be programmed while the module is in stop mode, i.e. with
MCR0[MDIS] set to 1, and the module re-enabled (MCR0[MDIS] = 0)
afterwards.

Wrap the RX sample clock source selection and the DLL calibration/
override reconfiguration in a stop-mode window to align with the RM
and avoid reconfiguring timing-critical registers while the module is
active.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260728-fspi-clock-v2-2-dbe786a4a6eb@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-nxp-fspi.c