mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
spi: nxp-fspi: reset the FLSHxCR1 registers
[ Upstream commit 18495676f7 ]
Reset the FLSHxCR1 registers to default value. ROM may set the register
value and it affects the SPI NAND normal functions.
Signed-off-by: Han Xu <han.xu@nxp.com>
Link: https://lore.kernel.org/r/20230906183254.235847-1-han.xu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
50662d21e4
commit
25850bf83d
@@ -1029,6 +1029,13 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
|
||||
fspi_writel(f, FSPI_AHBCR_PREF_EN | FSPI_AHBCR_RDADDROPT,
|
||||
base + FSPI_AHBCR);
|
||||
|
||||
/* Reset the FLSHxCR1 registers. */
|
||||
reg = FSPI_FLSHXCR1_TCSH(0x3) | FSPI_FLSHXCR1_TCSS(0x3);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHA1CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHA2CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHB1CR1);
|
||||
fspi_writel(f, reg, base + FSPI_FLSHB2CR1);
|
||||
|
||||
/* AHB Read - Set lut sequence ID for all CS. */
|
||||
fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA1CR2);
|
||||
fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA2CR2);
|
||||
|
||||
Reference in New Issue
Block a user