linux/drivers/spi
Mark Brown 728cb436d4
Merge series "add support for Cadence's XSPI controller" from Parshuram Thombare <pthombar@cadence.com>:
This patch series adds support for Cadence's XSPI controller.
It supports 3 work modes.
1. ACMD (auto command) work mode
    ACMD name is because it uses auto command engine in the controller.
    It further has 2 modes PIO and CDMA (command DMA).
    The CDMA work mode is dedicated for high-performance application
    where very low software overhead is required. In this mode the
    Command Engine is programmed by the series of linked descriptors
    stored in system memory. These descriptors provide commands to execute
    and store status information for finished commands.
    The PIO mode work mode is dedicated for single operation where
    constructing a linked list of descriptors would require too
    much effort.
2. STIG (Software Triggered Instruction Generator) work mode
    In STIG mode, controller sends low-level instructions to memory.
    Each instruction is 128-bit width. There is special instruction
    DataSequence which carries information about data phase.
    Driver uses Slave DMA interface to transfer data as only this
    interface can be used in STIG work mode.
3. Direct work mode
    This work mode allows sending data without invoking any command through
    the slave interface.
Currently only STIG work mode is enabled, remaining work modes will
be added later.

Changes since v5:
1. Added adjust_op_size to adjust op size according to sdma size.

Changes since v4:
1. Changed reg region names and lengths as suggested by Rob.

Changes since v3:
1. Removed ACMD PIO mode.
2. Return IRQ_HANDLED only for handled interrupts.
3. DT binding changes.

Changes since v2:
1. Removed extra lock around exec_op.
2. Removed PHY parameters setting from the driver, those will be
   handled by bootstrap pins available in the controller.

Changes since v1:
1. Use ACMD PIO work mode for NOR read, program and erase operations,
   for everything else use STIG(Software Triggered Instruction
   Generator) work mode.
2. Changes suggested by Lukas.

Parshuram Thombare (2):
  spi: cadence: add dt-bindings documentation for Cadence XSPI
    controller
  spi: cadence: add support for Cadence XSPI controller

 .../devicetree/bindings/spi/cdns,xspi.yaml         |  77 +++
 drivers/spi/Kconfig                                |  12 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-cadence-xspi.c                     | 640 +++++++++++++++++++++
 4 files changed, 730 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/cdns,xspi.yaml
 create mode 100644 drivers/spi/spi-cadence-xspi.c

--
2.7.4
2021-09-27 18:32:13 +01:00
..
atmel-quadspi.c spi: Fixed division by zero warning 2021-09-20 13:38:18 +01:00
internals.h
Kconfig Merge series "add support for Cadence's XSPI controller" from Parshuram Thombare <pthombar@cadence.com>: 2021-09-27 18:32:13 +01:00
Makefile spi: cadence: add support for Cadence XSPI controller 2021-09-27 13:02:33 +01:00
spi-altera-core.c spi: altera: separate core code from platform code 2021-04-20 17:26:40 +01:00
spi-altera-dfl.c spi: spi-altera-dfl: support n5010 feature revision 2021-07-29 13:02:28 -07:00
spi-altera-platform.c spi: altera: separate core code from platform code 2021-04-20 17:26:40 +01:00
spi-amd.c spi: amd: Don't wait for a write-only transfer to finish 2021-09-13 02:00:32 +01:00
spi-ar934x.c spi: ar934x: Don't leak SPI master in probe error path 2020-12-07 14:18:59 +00:00
spi-armada-3700.c spi: a3700: Remove a useless memset 2020-08-18 17:52:37 +01:00
spi-at91-usart.c spi: spi-at91-usart: Remove unused OF table 'struct of_device_id' 2020-07-17 16:38:54 +01:00
spi-ath79.c spi: ath79: set number of chipselect lines 2021-05-24 09:51:38 +01:00
spi-atmel.c spi: atmel: Fix CS and initialization bug 2021-07-11 23:44:39 +01:00
spi-au1550.c spi: spi-au1550: Fix various whitespace warnings 2021-01-22 16:26:21 +00:00
spi-axi-spi-engine.c spi: spi-axi-spi-engine: remove usage of delay_usecs 2021-03-12 14:30:42 +00:00
spi-bcm63xx-hsspi.c spi: bcm63xx-hsspi: fix pm_runtime 2021-03-10 12:25:12 +00:00
spi-bcm63xx.c spi: bcm63xx-spi: don't check 'delay_usecs' field 2021-03-12 14:30:43 +00:00
spi-bcm2835.c spi: spi-bcm2835: Fix deadlock 2021-07-20 13:34:05 +01:00
spi-bcm2835aux.c spi: bcm2835aux: use 'unsigned int' instead of 'unsigned' 2021-08-03 18:27:25 +01:00
spi-bcm-qspi.c spi: Fixed division by zero warning 2021-09-20 13:38:18 +01:00
spi-bcm-qspi.h
spi-bitbang-txrx.h
spi-bitbang.c spi: Cleanup on failure of initial setup 2021-06-01 14:03:12 +01:00
spi-brcmstb-qspi.c
spi-butterfly.c spi: butterfly: Switch to use module_parport_driver() 2021-03-10 12:46:05 +00:00
spi-cadence-quadspi.c spi: cadence-quadspi: Fix check condition for DTR ops 2021-08-05 20:18:10 +01:00
spi-cadence-xspi.c spi: cadence: add support for Cadence XSPI controller 2021-09-27 13:02:33 +01:00
spi-cadence.c spi: cadence: Correct initialisation of runtime PM again 2021-07-19 12:58:44 +01:00
spi-cavium-octeon.c
spi-cavium-thunderx.c spi: spi-cavium-thunderx: flag controller as half duplex 2020-06-16 00:38:39 +01:00
spi-cavium.c
spi-cavium.h
spi-clps711x.c spi: clps711xx: remove redundant white-space 2021-02-04 18:45:59 +00:00
spi-coldfire-qspi.c spi: coldfire-qspi: Use clk_disable_unprepare in the remove function 2021-08-19 18:20:10 +01:00
spi-davinci.c spi: davinci: invoke chipselect callback 2021-08-24 20:53:24 +01:00
spi-dln2.c spi: dln2: Fix reference leak to master 2021-04-09 13:43:57 +01:00
spi-dw-bt1.c spi: dw: Avoid stack content exposure 2021-02-12 12:41:49 +00:00
spi-dw-core.c spi: dw: Add support for 32-bits max xfer size 2020-12-09 12:14:22 +00:00
spi-dw-dma.c spi: dw: Add generic DW SSI status-check method 2020-10-08 23:00:18 +01:00
spi-dw-mmio.c spi: delete repeated words in comments 2021-05-10 13:07:52 +01:00
spi-dw-pci.c spi: dw: Add DWC SSI capability 2020-10-08 23:00:06 +01:00
spi-dw.h spi: dw: Add support for 32-bits max xfer size 2020-12-09 12:14:22 +00:00
spi-ep93xx.c spi: spi-ep93xx: Prepare clock before using it 2021-08-03 18:27:24 +01:00
spi-falcon.c spi: spi-falcon: remove check for 'delay_usecs' 2021-03-12 14:30:48 +00:00
spi-fsi.c spi: fsi: Reduce max transfer size to 8 bytes 2021-07-19 16:56:14 +01:00
spi-fsl-cpm.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
spi-fsl-cpm.h
spi-fsl-dspi.c spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config 2021-08-10 13:22:19 +01:00
spi-fsl-espi.c spi: fsl-espi: remove usage of 'delay_usecs' field 2021-03-12 14:30:49 +00:00
spi-fsl-lib.c
spi-fsl-lib.h
spi-fsl-lpspi.c spi: fsl-lpspi: Fix PM reference leak in lpspi_prepare_xfer_hardware() 2021-04-09 13:43:59 +01:00
spi-fsl-qspi.c spi: Fix SPI NOR and SPI NAND acronyms 2020-07-17 00:55:25 +01:00
spi-fsl-spi.c spi: Cleanup on failure of initial setup 2021-06-01 14:03:12 +01:00
spi-fsl-spi.h
spi-geni-qcom.c spi: spi-geni-qcom: Remove confusing comment about setting the watermark 2021-07-14 16:37:58 +01:00
spi-gpio.c spi: gpio: Don't leak SPI master in probe error path 2020-12-07 14:18:54 +00:00
spi-hisi-kunpeng.c spi: hisi-kunpeng: Add debugfs support 2021-06-07 16:24:12 +01:00
spi-hisi-sfc-v3xx.c spi: hisi-sfc-v3xx: drop unnecessary ACPI_PTR and related ifendif protection 2021-04-12 17:07:38 +01:00
spi-img-spfi.c spi: img-spfi: fix reference leak in img_spfi_resume 2020-11-02 15:53:25 +00:00
spi-imx.c ARM: SoC drivers for 5.15 2021-09-01 15:25:28 -07:00
spi-ingenic.c SPI: add Ingenic JZ47xx driver. 2021-09-13 02:00:26 +01:00
spi-iproc-qspi.c
spi-jcore.c spi: jcore: Fix trailing statements should be on next line 2021-03-24 19:51:09 +00:00
spi-lantiq-ssc.c spi: lantiq: remove redundant irqsave and irqrestore in hardIRQ 2020-09-17 19:56:02 +01:00
spi-lm70llp.c spi: lm70llp: add parenthesis for sizeof 2021-05-20 18:00:34 +01:00
spi-loopback-test.c spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' 2021-05-10 13:07:53 +01:00
spi-lp8841-rtc.c
spi-mem.c spi: spi-mem: fix doc warning in spi-mem.c 2021-06-14 15:05:00 +01:00
spi-meson-spicc.c spi: meson-spicc: fix memory leak in meson_spicc_remove 2021-07-22 16:02:22 +01:00
spi-meson-spifc.c spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' 2020-07-17 16:38:48 +01:00
spi-mpc52xx-psc.c spi: mpc52xx-psc: add parenthesis for sizeof 2021-05-20 18:00:37 +01:00
spi-mpc52xx.c spi: mpc52xx: add parenthesis for sizeof 2021-05-20 18:00:36 +01:00
spi-mpc512x-psc.c spi: mpc512x-psc: add parenthesis for sizeof 2021-05-20 18:00:35 +01:00
spi-mt65xx.c Merge remote-tracking branch 'spi/for-5.15' into spi-next 2021-08-26 15:09:52 +01:00
spi-mt7621.c spi: mt7621: Don't leak SPI master in probe error path 2020-12-07 14:18:59 +00:00
spi-mtk-nor.c spi: Fixed division by zero warning 2021-09-20 13:38:18 +01:00
spi-mux.c spi: spi-mux: Add module info needed for autoloading 2021-07-22 12:40:06 +01:00
spi-mxic.c spi: mxic: add missing braces 2021-08-12 12:19:19 +01:00
spi-mxs.c spi: mxs: fix reference leak in mxs_spi_probe 2020-11-18 18:00:26 +00:00
spi-npcm-fiu.c spi: npcm-fiu: Disable clock in probe error path 2020-12-07 14:19:00 +00:00
spi-npcm-pspi.c spi: npcm-pspi: Use SPI_MODE_X_MASK 2021-05-11 15:42:48 +01:00
spi-nxp-fspi.c spi: spi-nxp-fspi: move the register operation after the clock enable 2021-06-14 15:02:01 +01:00
spi-oc-tiny.c spi: oc-tiny: Use SPI_MODE_X_MASK 2021-05-11 15:42:49 +01:00
spi-omap2-mcspi.c Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.14 2021-06-01 18:33:33 +01:00
spi-omap-100k.c spi: fix some invalid char occurrences 2021-05-20 17:58:33 +01:00
spi-omap-uwire.c Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.14 2021-06-01 18:33:33 +01:00
spi-orion.c spi: orion: Prevent incorrect chip select behaviour 2021-08-16 13:28:14 +01:00
spi-pic32-sqi.c
spi-pic32.c spi: spi-pic32: Fix issue with uninitialized dma_slave_config 2021-08-10 13:22:20 +01:00
spi-pl022.c spi: delete repeated words in comments 2021-05-10 13:07:52 +01:00
spi-ppc4xx.c spi: ppc4xx: add parenthesis for sizeof 2021-05-20 18:00:40 +01:00
spi-pxa2xx-dma.c spi: pxa2xx: Fix style of and typos in the comments and messages 2021-05-18 14:05:35 +01:00
spi-pxa2xx-pci.c spi: pxa2xx: Fix inconsistent indenting 2021-05-21 13:13:42 +01:00
spi-pxa2xx.c spi: pxa2xx: Adapt reset_sccr1() to the case when no message available 2021-07-22 12:41:19 +01:00
spi-pxa2xx.h spi: pxa2xx: Fix style of and typos in the comments and messages 2021-05-18 14:05:35 +01:00
spi-qcom-qspi.c spi: spi-qcom-qspi: Convert to use resource-managed OPP API 2021-03-16 10:14:11 +05:30
spi-qup.c spi: qup: fix PM reference leak in spi_qup_remove() 2021-04-09 13:44:03 +01:00
spi-rb4xx.c spi: rb4xx: Don't leak SPI master in probe error path 2020-12-07 14:18:55 +00:00
spi-realtek-rtl.c spi: realtek-rtl: Add support for Realtek RTL838x/RTL839x SPI controllers 2021-02-04 18:45:57 +00:00
spi-rockchip-sfc.c spi: rockchip-sfc: Fix assigned but never used return error codes 2021-08-23 16:41:08 +01:00
spi-rockchip.c spi: rockchip: handle zero length transfers without timing out 2021-09-03 13:31:49 +01:00
spi-rpc-if.c spi: rpc-if: Gaurd .pm assignment with CONFIG_PM_SLEEP #ifdef check 2021-01-11 16:39:09 +00:00
spi-rspi.c spi: rspi: drop unneeded MODULE_ALIAS 2021-09-17 13:17:49 +01:00
spi-s3c24xx-regs.h ARM: s3c24xx: move regs-spi.h into spi driver 2020-08-19 21:40:14 +02:00
spi-s3c24xx.c ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
spi-s3c64xx.c spi: s3c64xx: constify driver/match data 2021-04-15 16:07:58 +01:00
spi-sc18is602.c spi: sc18is602: implement .max_{transfer,message}_size() for the controller 2021-05-21 13:13:33 +01:00
spi-sh-hspi.c
spi-sh-msiof.c spi: sh-msiof: drop unneeded MODULE_ALIAS 2021-09-17 13:17:50 +01:00
spi-sh-sci.c
spi-sh.c spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug 2021-03-12 14:30:45 +00:00
spi-sifive.c
spi-slave-mt27xx.c spi: mediatek: add mt8195 spi slave support 2021-03-23 17:19:45 +00:00
spi-slave-system-control.c
spi-slave-time.c
spi-sprd-adi.c spi: sprd: Add ADI r3 support 2021-08-26 12:09:38 +01:00
spi-sprd.c spi: sprd: Add missing MODULE_DEVICE_TABLE 2021-05-12 13:01:43 +01:00
spi-st-ssc4.c spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path 2020-11-12 15:16:35 +00:00
spi-stm32-qspi.c spi: Fixed division by zero warning 2021-09-20 13:38:18 +01:00
spi-stm32.c spi: stm32: fix excluded_middle.cocci warnings 2021-08-20 13:07:27 +01:00
spi-sun4i.c spi: sun4i: update max transfer size reported 2020-07-27 14:55:21 +01:00
spi-sun6i.c spi: spi-sun6i: Fix chipselect/clock bug 2021-06-23 11:48:36 +01:00
spi-synquacer.c spi: spi-synquacer: fix set_cs handling 2021-02-03 16:23:07 +00:00
spi-tegra20-sflash.c spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi transfer 2021-03-12 14:30:46 +00:00
spi-tegra20-slink.c Linux 5.15-rc2 2021-09-21 15:23:35 +01:00
spi-tegra114.c spi: modify set_cs_timing parameter 2021-08-05 16:42:54 +01:00
spi-tegra210-quad.c spi: tegra210-quad: Fix an error message 2021-05-10 13:17:19 +01:00
spi-test.h
spi-ti-qspi.c spi: spi-ti-qspi: Free DMA resources 2021-03-10 12:25:09 +00:00
spi-tle62x0.c
spi-topcliff-pch.c spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() 2021-05-10 13:17:16 +01:00
spi-uniphier.c spi: uniphier: Use SPI_MODE_X_MASK 2021-05-11 15:42:52 +01:00
spi-xcomm.c
spi-xilinx.c spi: xilinx: Fix info message during probe 2020-09-17 19:56:01 +01:00
spi-xlp.c
spi-xtensa-xtfpga.c
spi-zynq-qspi.c spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible 2021-08-26 13:42:44 +01:00
spi-zynqmp-gqspi.c spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails 2021-04-16 13:44:15 +01:00
spi.c Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
spidev.c misc: gehc-achc: new driver 2021-08-05 14:29:27 +02:00