Skip to contentSkip to conversation

Tegra: T210: Add QSPI driver

PATCH Superseded Tom Warren 2 participants 2 messages Oct 23, 2015

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Tom Warren

author
#0 lore raw

PATCH v4 1/1 Tegra: T210: Add QSPI driver

This is the normal Tegra SPI driver modified to work with the QSPI controller in Tegra210. It does not do 2x/4x transfers or any other QSPI protocol.

---
Changes in v2:
- Drop defconfig and pinmux files, this is a driver-only patch.
- If/when pinmux tables have been updated for P2371/P2571, another
- patch will be sent to enable the QSPI driver on those boards. Changes in v3:
- removed status reg write/clear in claim_bus(), done in xfer() Changes in v4:
- added timeout in wait for FIFO flush status in xfer()
- used BIT and GENMASK macros throughout
- minor changes in copyright message in driver and Kconfig help

 drivers/spi/Kconfig         |   7 +
 drivers/spi/Makefile        |   1 +
 drivers/spi/tegra210_qspi.c | 408 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 416 insertions(+)
 create mode 100644 drivers/spi/tegra210_qspi.c
drivers/spi/Kconfig +7 -0
index 2f8cf19..95286da 100644
@@ -123,6 +123,13 @@ config TEGRA20_SLINK
 	  be used to access the SPI NOR flash on platforms embedding this
 	  nVidia Tegra20/Tegra30 IP cores.
 
+config TEGRA210_QSPI
+	bool "nVidia Tegra210 QSPI driver"
+	help
+	  Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver
+	  be used to access SPI chips on platforms embedding this
+	  NVIDIA Tegra210 IP core.
+
 config XILINX_SPI
 	bool "Xilinx SPI driver"
 	help
drivers/spi/Makefile +1 -0
index de241be..209a41e 100644
@@ -46,6 +46,7 @@ obj-$(CONFIG_SH_QSPI) += sh_qspi.o
 obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o
 obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o
 obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
+obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o
 obj-$(CONFIG_TI_QSPI) += ti_qspi.o
 obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o
 obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o
drivers/spi/tegra210_qspi.c new file +408 -0

408 lines not on this page · raw message

Signature · 1 line
1.8.2.1.610.g562af5b
#1 lore raw

PATCH v4 1/1 Tegra: T210: Add QSPI driver

Quoted 3 lines · Tom Warren

This is the normal Tegra SPI driver modified to work with the QSPI controller in Tegra210. It does not do 2x/4x transfers or any other QSPI protocol.

Once the DT binding is reviewed as a Linux patch, then this patch,