Skip to content

Commit 84d0431

Browse files
fschrempfbroonie
authored andcommitted
spi: Add a driver for the Freescale/NXP QuadSPI controller
This driver is derived from the SPI NOR driver at mtd/spi-nor/fsl-quadspi.c. It uses the new SPI memory interface of the SPI framework to issue flash memory operations to up to four connected flash chips (2 buses with 2 CS each). The controller does not support generic SPI messages. This patch also disables the build of the "old" driver and reuses its Kconfig option CONFIG_SPI_FSL_QUADSPI to replace it. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Acked-by: Han Xu <han.xu@nxp.com> Reviewed-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Tested-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Tested-by: Han Xu <han.xu@nxp.com> Reviewed-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent bfeffd1 commit 84d0431

5 files changed

Lines changed: 978 additions & 10 deletions

File tree

‎drivers/mtd/spi-nor/Kconfig‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ config SPI_CADENCE_QUADSPI
5050
device with a Cadence QSPI controller and want to access the
5151
Flash as an MTD device.
5252

53-
config SPI_FSL_QUADSPI
54-
tristate "Freescale Quad SPI controller"
55-
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
56-
depends on HAS_IOMEM
57-
help
58-
This enables support for the Quad SPI controller in master mode.
59-
This controller does not support generic SPI. It only supports
60-
SPI NOR.
61-
6253
config SPI_HISI_SFC
6354
tristate "Hisilicon SPI-NOR Flash Controller(SFC)"
6455
depends on ARCH_HISI || COMPILE_TEST

‎drivers/mtd/spi-nor/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o
33
obj-$(CONFIG_SPI_ASPEED_SMC) += aspeed-smc.o
44
obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-quadspi.o
5-
obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o
65
obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o
76
obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o
87
obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o

‎drivers/spi/Kconfig‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,17 @@ config SPI_FSL_LPSPI
268268
help
269269
This enables Freescale i.MX LPSPI controllers in master mode.
270270

271+
config SPI_FSL_QUADSPI
272+
tristate "Freescale QSPI controller"
273+
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
274+
depends on HAS_IOMEM
275+
help
276+
This enables support for the Quad SPI controller in master mode.
277+
Up to four flash chips can be connected on two buses with two
278+
chipselects each.
279+
This controller does not support generic SPI messages. It only
280+
supports the high-level SPI memory interface.
281+
271282
config SPI_GPIO
272283
tristate "GPIO-based bitbanging SPI Master"
273284
depends on GPIOLIB || COMPILE_TEST

‎drivers/spi/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ obj-$(CONFIG_SPI_FSL_DSPI) += spi-fsl-dspi.o
4545
obj-$(CONFIG_SPI_FSL_LIB) += spi-fsl-lib.o
4646
obj-$(CONFIG_SPI_FSL_ESPI) += spi-fsl-espi.o
4747
obj-$(CONFIG_SPI_FSL_LPSPI) += spi-fsl-lpspi.o
48+
obj-$(CONFIG_SPI_FSL_QUADSPI) += spi-fsl-qspi.o
4849
obj-$(CONFIG_SPI_FSL_SPI) += spi-fsl-spi.o
4950
obj-$(CONFIG_SPI_GPIO) += spi-gpio.o
5051
obj-$(CONFIG_SPI_IMG_SPFI) += spi-img-spfi.o

0 commit comments

Comments
 (0)