drivers: spi: Add SPI controller driver for Octeon
PATCH 1/1 drivers: spi: Add SPI controller driver for Octeon
From: Suneel Garapati <[email protected]>
Adds support for SPI controllers found on Octeon II/III and Octeon TX TX2 SoC platforms.
---
RFC -> v1 (Stefan):
- Separated this patch from the OcteonTX/TX2 RFC patch series into a single patch. This is useful, as the upcoming MIPS Octeon support will use this driver.
- Added MIPS Octeon II/III support (big endian). Rename driver and its function names from "octeontx" to "octeon" to better match all Octeon platforms.
- Moved from union to defines / bitmasks. This makes the driver usage on little- and big-endian platforms much easier.
- Enhanced Kconfig text
- Removed all clock macros (use values from DT)
- Dropped all #ifdef's
- Misc minor cleanup
drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/octeon_spi.c | 662 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 671 insertions(+) create mode 100644 drivers/spi/octeon_spi.c
drivers/spi/Kconfig +8 -0
@@ -214,6 +214,14 @@ config NXP_FSPI Enable the NXP FlexSPI (FSPI) driver. This driver can be used to access the SPI NOR flash on platforms embedding this NXP IP core. +config OCTEON_SPI + bool "Octeon SPI driver" + depends on ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2 + help + Enable the Octeon SPI driver. This driver can be used to + access the SPI NOR flash on Octeon II/III and OcteonTX/TX2 + SoC platforms. + config PIC32_SPI bool "Microchip PIC32 SPI driver" depends on MACH_PIC32
drivers/spi/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_MXC_SPI) += mxc_spi.o obj-$(CONFIG_MXS_SPI) += mxs_spi.o obj-$(CONFIG_NXP_FSPI) += nxp_fspi.o obj-$(CONFIG_ATCSPI200_SPI) += atcspi200_spi.o +obj-$(CONFIG_OCTEON_SPI) += octeon_spi.o obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o obj-$(CONFIG_PIC32_SPI) += pic32_spi.o obj-$(CONFIG_PL022_SPI) += pl022_spi.o
drivers/spi/octeon_spi.c new file +662 -0
662 lines not on this page · raw message
Signature · 1 line
2.27.0