summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-07-03 00:58:13 -0700
committerYe Li <ye.li@nxp.com>2019-07-30 01:45:13 -0700
commit256fcd3df1b0a0b9c0fb730fabb7497800cda3a6 (patch)
treea142c6603bde05cab7c88b034bab7eb66e875e34 /drivers
parent6736f4f750e66431330d6405dbe78042a3b20110 (diff)
MLK-22179-1 fsl_fspi: Add a config to enable dummy DQS loopback from pad
Set MCR0 RXCLKSRC to 1 to enable DQS loopback from pad to support higher frequency. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/fsl_fspi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/fsl_fspi.c b/drivers/spi/fsl_fspi.c
index 460d284401..c438dcccb3 100644
--- a/drivers/spi/fsl_fspi.c
+++ b/drivers/spi/fsl_fspi.c
@@ -1105,8 +1105,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
fspi_module_disable(&fspi->priv, 1);
/* Enable the module and set to proper value*/
+#ifdef CONFIG_FSPI_DQS_LOOPBACK
+ fspi_write32(fspi->priv.flags, &regs->mcr0,
+ 0xFFFF0010);
+#else
fspi_write32(fspi->priv.flags, &regs->mcr0,
0xFFFF0000);
+#endif
total_size = FSL_FSPI_FLASH_SIZE * FSL_FSPI_FLASH_NUM >> 10;
/*
@@ -1214,8 +1219,13 @@ static int fsl_fspi_probe(struct udevice *bus)
fspi_module_disable(priv, 1);
/* Enable the module and set to proper value*/
+#ifdef CONFIG_FSPI_DQS_LOOPBACK
+ fspi_write32(priv->flags, &priv->regs->mcr0,
+ 0xFFFF0010);
+#else
fspi_write32(priv->flags, &priv->regs->mcr0,
0xFFFF0000);
+#endif
/* Reset the DLL register to default value */
fspi_write32(priv->flags, &priv->regs->dllacr, 0x0100);