Prepare v2023.10
[platform/kernel/u-boot.git] / drivers / spi / Kconfig
1 menuconfig SPI
2         bool "SPI Support"
3         help
4           The "Serial Peripheral Interface" is a low level synchronous
5           protocol.  Chips that support SPI can have data transfer rates
6           up to several tens of Mbit/sec.  Chips are addressed with a
7           controller and a chipselect.  Most SPI slaves don't support
8           dynamic device discovery; some are even write-only or read-only.
9
10           SPI is widely used by microcontrollers to talk with sensors,
11           eeprom and flash memory, codecs and various other controller
12           chips, analog to digital (and d-to-a) converters, and more.
13           MMC and SD cards can be accessed using SPI protocol; and for
14           DataFlash cards used in MMC sockets, SPI must always be used.
15
16           SPI is one of a family of similar protocols using a four wire
17           interface (select, clock, data in, data out) including Microwire
18           (half duplex), SSP, SSI, and PSP.  This driver framework should
19           work with most such devices and controllers.
20
21 if SPI
22
23 config DM_SPI
24         bool "Enable Driver Model for SPI drivers"
25         depends on DM
26         help
27           Enable driver model for SPI. The SPI slave interface
28           (spi_setup_slave(), spi_xfer(), etc.) is then implemented by
29           the SPI uclass. Drivers provide methods to access the SPI
30           buses that they control. The uclass interface is defined in
31           include/spi.h. The existing spi_slave structure is attached
32           as 'parent data' to every slave on each bus. Slaves
33           typically use driver-private data instead of extending the
34           spi_slave structure.
35
36 config SPI_MEM
37         bool "SPI memory extension"
38         help
39           Enable this option if you want to enable the SPI memory extension.
40           This extension is meant to simplify interaction with SPI memories
41           by providing an high-level interface to send memory-like commands.
42
43 config SPI_DIRMAP
44         bool "SPI direct mapping"
45         depends on SPI_MEM
46         help
47           Enable the SPI direct mapping API. Most modern SPI controllers can
48           directly map a SPI memory (or a portion of the SPI memory) in the CPU
49           address space. Most of the time this brings significant performance
50           improvements as it automates the whole process of sending SPI memory
51           operations every time a new region is accessed.
52
53 if DM_SPI
54
55 config ALTERA_SPI
56         bool "Altera SPI driver"
57         help
58           Enable the Altera SPI driver. This driver can be used to
59           access the SPI NOR flash on platforms embedding this Altera
60           IP core. Please find details on the "Embedded Peripherals IP
61           User Guide" of Altera.
62
63 config APPLE_SPI
64         bool "Apple SPI driver"
65         default y if ARCH_APPLE
66         help
67           Enable the Apple SPI driver. This driver can be used to
68           access the SPI flash and keyboard on machines based on Apple SoCs.
69
70 config ATCSPI200_SPI
71         bool "Andestech ATCSPI200 SPI driver"
72         help
73           Enable the Andestech ATCSPI200 SPI driver. This driver can be
74           used to access the SPI flash on AE3XX and AE250 platforms embedding
75           this Andestech IP core.
76
77 config ATH79_SPI
78         bool "Atheros SPI driver"
79         depends on ARCH_ATH79
80         help
81           Enable the Atheros ar7xxx/ar9xxx SoC SPI driver, it was used
82           to access SPI NOR flash and other SPI peripherals. This driver
83           uses driver model and requires a device tree binding to operate.
84           please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
85
86 config ATMEL_QSPI
87         bool "Atmel Quad SPI Controller"
88         depends on ARCH_AT91
89         help
90           Enable the Atmel Quad SPI controller in master mode. This driver
91           does not support generic SPI. The implementation supports only the
92           spi-mem interface.
93
94 config ATMEL_SPI
95         bool "Atmel SPI driver"
96         default y if ARCH_AT91
97         help
98           This enables driver for the Atmel SPI Controller, present on
99           many AT91 (ARM) chips. This driver can be used to access
100           the SPI Flash, such as AT25DF321.
101
102 config BCM63XX_HSSPI
103         bool "BCM63XX HSSPI driver"
104         depends on (ARCH_BMIPS || ARCH_BCMBCA)
105         help
106           Enable the BCM63XX HSSPI driver. This driver can be used to
107           access the SPI NOR flash on platforms embedding this Broadcom
108           SPI core.
109
110 config BCMBCA_HSSPI
111         bool "BCMBCA HSSPI driver"
112         depends on ARCH_BCMBCA && HAVE_SPI_CS_CTRL
113         help
114           This enables support for the High Speed SPI controller present on
115           newer Broadcom BCMBCA SoCs. These SoCs include an updated SPI controller
116           that adds the capability to allow the driver to control chip select
117           explicitly.
118
119 config BCM63XX_SPI
120         bool "BCM6348 SPI driver"
121         depends on ARCH_BMIPS
122         help
123           Enable the BCM6348/BCM6358 SPI driver. This driver can be used to
124           access the SPI NOR flash on platforms embedding these Broadcom
125           SPI cores.
126
127 config BCMSTB_SPI
128         bool "BCMSTB SPI driver"
129         help
130           Enable the Broadcom set-top box SPI driver. This driver can
131           be used to access the SPI flash on platforms embedding this
132           Broadcom SPI core.
133
134 config CORTINA_SFLASH
135         bool "Cortina-Access Serial Flash controller driver"
136         depends on DM_SPI && SPI_MEM
137         help
138           Enable the Cortina-Access Serial Flash controller driver. This driver
139           can be used to access the SPI NOR/NAND flash on platforms embedding this
140           Cortina-Access IP core.
141
142 config CADENCE_QSPI
143         bool "Cadence QSPI driver"
144         help
145           Enable the Cadence Quad-SPI (QSPI) driver. This driver can be
146           used to access the SPI NOR flash on platforms embedding this
147           Cadence IP core.
148
149 config HAS_CQSPI_REF_CLK
150         bool "Cadence QSPI static reference clock"
151         depends on CADENCE_QSPI
152
153 config CQSPI_REF_CLK
154         int "Cadence QSPI reference clock value in Hz"
155         depends on HAS_CQSPI_REF_CLK
156
157 config CADENCE_OSPI_VERSAL
158         bool "Configure Versal OSPI"
159         depends on (ARCH_VERSAL || ARCH_VERSAL_NET) && CADENCE_QSPI
160         imply DM_GPIO
161         help
162           This option is used to enable Versal OSPI DMA operations which
163           are used for ospi flash read using cadence qspi controller.
164
165 config CF_SPI
166         bool "ColdFire SPI driver"
167         help
168           Enable the ColdFire SPI driver. This driver can be used on
169           some m68k SoCs.
170
171 config DAVINCI_SPI
172         bool "Davinci & Keystone SPI driver"
173         depends on ARCH_DAVINCI || ARCH_KEYSTONE
174         help
175           Enable the Davinci SPI driver
176
177 config DESIGNWARE_SPI
178         bool "Designware SPI driver"
179         help
180           Enable the Designware SPI driver. This driver can be used to
181           access the SPI NOR flash on platforms embedding this Designware
182           IP core.
183
184 config EXYNOS_SPI
185         bool "Samsung Exynos SPI driver"
186         help
187           Enable the Samsung Exynos SPI driver. This driver can be used to
188           access the SPI NOR flash on platforms embedding this Samsung
189           Exynos IP core.
190
191 config FSL_DSPI
192         bool "Freescale DSPI driver"
193         help
194           Enable the Freescale DSPI driver. This driver can be used to
195           access the SPI NOR flash and SPI Data flash on platforms embedding
196           this Freescale DSPI IP core. LS102xA and Colibri VF50/VF61 platforms
197           use this driver.
198
199 config FSL_QSPI
200         bool "Freescale QSPI driver"
201         imply SPI_FLASH_BAR
202         help
203           Enable the Freescale Quad-SPI (QSPI) driver. This driver can be
204           used to access the SPI NOR flash on platforms embedding this
205           Freescale IP core.
206
207 config FSL_QSPI_AHB_FULL_MAP
208         bool "Use full AHB memory map space"
209         depends on FSL_QSPI
210         default y if ARCH_MX6 || ARCH_MX7 || ARCH_MX7ULP || ARCH_IMX8M
211         help
212           Enable the Freescale QSPI driver to use full AHB memory map space for
213           flash access.
214
215 config GXP_SPI
216         bool "SPI driver for GXP"
217         imply SPI_FLASH_BAR
218         help
219           Enable support for SPI on GXP.
220
221 config ICH_SPI
222         bool "Intel ICH SPI driver"
223         help
224           Enable the Intel ICH SPI driver. This driver can be used to
225           access the SPI NOR flash on platforms embedding this Intel
226           ICH IP core.
227
228 config IPROC_QSPI
229         bool "Broadcom iProc QSPI Flash Controller driver"
230         help
231           Enable Broadcom iProc QSPI Flash Controller driver.
232           This driver can be used to access the SPI NOR flash.
233
234 config KIRKWOOD_SPI
235         bool "Marvell Kirkwood SPI Driver"
236         help
237           Enable support for SPI on various Marvell SoCs, such as
238           Kirkwood and Armada 375.
239
240 config MESON_SPIFC
241         bool "Amlogic Meson SPI Flash Controller driver"
242         depends on ARCH_MESON
243         help
244           Enable the Amlogic Meson SPI Flash Controller SPIFC) driver.
245           This driver can be used to access the SPI NOR flash chips on
246           Amlogic Meson SoCs.
247
248 config MICROCHIP_COREQSPI
249         bool "Microchip FPGA QSPI Controller driver"
250         help
251           Enable the QSPI driver for Microchip FPGA QSPI controllers.
252           This driver can be used on Polarfire SoC.
253
254 config MPC8XX_SPI
255         bool "MPC8XX SPI Driver"
256         depends on MPC8xx
257         help
258           Enable support for SPI on MPC8XX
259
260 config MPC8XXX_SPI
261         bool "MPC8XXX SPI Driver"
262         help
263           Enable support for SPI on the MPC8XXX PowerPC SoCs.
264
265 config MSCC_BB_SPI
266         bool "MSCC bitbang SPI driver"
267         depends on SOC_VCOREIII
268         help
269           Enable MSCC bitbang SPI driver. This driver can be used on
270           MSCC SOCs.
271
272 config MT7620_SPI
273         bool "MediaTek MT7620 SPI driver"
274         depends on SOC_MT7620
275         help
276           Enable the MT7620 SPI driver. This driver can be used to access
277           generic SPI devices on MediaTek MT7620 SoC.
278
279 config MT7621_SPI
280         bool "MediaTek MT7621 SPI driver"
281         depends on SOC_MT7621 || SOC_MT7628
282         help
283           Enable the MT7621 SPI driver. This driver can be used to access
284           the SPI NOR flash on platforms embedding this Ralink / MediaTek
285           SPI core, like MT7621/7628/7688.
286
287 config MTK_SNOR
288         bool "Mediatek SPI-NOR controller driver"
289         depends on SPI_MEM
290         help
291           Enable the Mediatek SPINOR controller driver. This driver has
292           better read/write performance with NOR.
293
294 config MTK_SNFI_SPI
295         bool "Mediatek SPI memory controller driver"
296         depends on SPI_MEM
297         help
298           Enable the Mediatek SPI memory controller driver. This driver is
299           originally based on the MediaTek SNFI IP core. It can only be
300           used to access SPI memory devices like SPI-NOR or SPI-NAND on
301           platforms embedding this IP core, like MT7622/M7629.
302
303 config MTK_SPIM
304         bool "Mediatek SPI-MEM master controller driver"
305         depends on SPI_MEM
306         help
307           Enable MediaTek SPI-MEM master controller driver. This driver mainly
308           supports SPI flashes. You can use single, dual or quad mode
309           transmission on this controller.
310
311 config MVEBU_A3700_SPI
312         bool "Marvell Armada 3700 SPI driver"
313         select CLK_ARMADA_3720
314         help
315           Enable the Marvell Armada 3700 SPI driver. This driver can be
316           used to access the SPI NOR flash on platforms embedding this
317           Marvell IP core.
318
319 config MXS_SPI
320         bool "MXS SPI Driver"
321         help
322           Enable the MXS SPI controller driver. This driver can be used
323           on the i.MX23 and i.MX28 SoCs.
324
325 config SPI_MXIC
326         bool "Macronix MX25F0A SPI controller"
327         help
328           Enable the Macronix MX25F0A SPI controller driver. This driver
329           can be used to access the SPI flash on platforms embedding
330           this Macronix IP core.
331
332 config NPCM_FIU_SPI
333         bool "FIU driver for Nuvoton NPCM SoC"
334         help
335           This enables support for the Flash Interface Unit SPI controller
336           in master mode.
337
338 config NPCM_PSPI
339         bool "PSPI driver for Nuvoton NPCM SoC"
340         help
341           PSPI driver for NPCM SoC
342
343 config NXP_FSPI
344         bool "NXP FlexSPI driver"
345         depends on SPI_MEM
346         help
347           Enable the NXP FlexSPI (FSPI) driver. This driver can be used to
348           access the SPI NOR flash on platforms embedding this NXP IP core.
349
350 config OCTEON_SPI
351         bool "Octeon SPI driver"
352         depends on ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2
353         help
354           Enable the Octeon SPI driver. This driver can be used to
355           access the SPI NOR flash on Octeon II/III and OcteonTX/TX2
356           SoC platforms.
357
358 config OMAP3_SPI
359         bool "McSPI driver for OMAP"
360         help
361           SPI master controller for OMAP24XX and later Multichannel SPI
362           (McSPI). This driver be used to access SPI chips on platforms
363           embedding this OMAP3 McSPI IP core.
364
365 config PIC32_SPI
366         bool "Microchip PIC32 SPI driver"
367         depends on MACH_PIC32
368         help
369           Enable the Microchip PIC32 SPI driver. This driver can be used
370           to access the SPI NOR flash, MMC-over-SPI on platforms based on
371           Microchip PIC32 family devices.
372
373 config PL022_SPI
374         bool "ARM AMBA PL022 SSP controller driver"
375         depends on ARM
376         help
377           This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP
378           controller. If you have an embedded system with an AMBA(R)
379           bus and a PL022 controller, say Y or M here.
380
381 config SPI_QUP
382         bool "Qualcomm SPI controller with QUP interface"
383         depends on ARCH_IPQ40XX
384         help
385           Qualcomm Universal Peripheral (QUP) core is an AHB slave that
386           provides a common data path (an output FIFO and an input FIFO)
387           for serial peripheral interface (SPI) mini-core. SPI in master
388           mode supports up to 50MHz, up to four chip selects, programmable
389           data path from 4 bits to 32 bits and numerous protocol variants.
390
391 config RENESAS_RPC_SPI
392         bool "Renesas RPC SPI driver"
393         depends on RCAR_64 || RZA1
394         imply SPI_FLASH_SFDP_SUPPORT
395         help
396           Enable the Renesas RPC SPI driver, used to access SPI NOR flash
397           on Renesas RCar Gen3 SoCs. This uses driver model and requires a
398           device tree binding to operate.
399
400 config ROCKCHIP_SFC
401         bool "Rockchip SFC Driver"
402         help
403           Enable the Rockchip SFC Driver for SPI NOR flash. This device is
404           a limited purpose SPI controller for driving NOR flash on certain
405           Rockchip SoCs. This uses driver model and requires a device tree
406           binding to operate.
407
408 config ROCKCHIP_SPI
409         bool "Rockchip SPI driver"
410         help
411           Enable the Rockchip SPI driver, used to access SPI NOR flash and
412           other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs.
413           This uses driver model and requires a device tree binding to
414           operate.
415
416 config SANDBOX_SPI
417         bool "Sandbox SPI driver"
418         depends on SANDBOX && DM
419         help
420           Enable SPI support for sandbox. This is an emulation of a real SPI
421           bus. Devices can be attached to the bus using the device tree
422           which specifies the driver to use. As an example, see this device
423           tree fragment from sandbox.dts. It shows that the SPI bus has a
424           single flash device on chip select 0 which is emulated by the driver
425           for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c.
426
427           spi@0 {
428                 #address-cells = <1>;
429                 #size-cells = <0>;
430                 reg = <0>;
431                 compatible = "sandbox,spi";
432                 cs-gpios = <0>, <&gpio_a 0>;
433                 flash@0 {
434                         reg = <0>;
435                         compatible = "spansion,m25p16", "jedec,spi-nor";
436                         spi-max-frequency = <40000000>;
437                         sandbox,filename = "spi.bin";
438                 };
439           };
440
441 config SANDBOX_SPI_MAX_BUS
442         int
443         depends on SANDBOX
444         default 1
445
446 config SANDBOX_SPI_MAX_CS
447         int
448         depends on SANDBOX
449         default 10
450
451 config SPI_ASPEED_SMC
452         bool "ASPEED SPI flash controller driver"
453         depends on DM_SPI && SPI_MEM
454         default n
455         help
456           Enable ASPEED SPI flash controller driver for AST2500
457           and AST2600 SoCs.
458
459 config SPI_SIFIVE
460         bool "SiFive SPI driver"
461         help
462           This driver supports the SiFive SPI IP. If unsure say N.
463           Enable the SiFive SPI controller driver.
464
465           The SiFive SPI controller driver is found on various SiFive SoCs.
466
467 config SOFT_SPI
468         bool "Soft SPI driver"
469         help
470          Enable Soft SPI driver. This driver is to use GPIO simulate
471          the SPI protocol.
472
473 config SPI_SN_F_OSPI
474         tristate "Socionext F_OSPI SPI flash controller"
475         depends on SPI_MEM
476         help
477           This enables support for the Socionext F_OSPI controller
478           for connecting an SPI flash memory over up to 8-bit wide bus.
479           It supports indirect access mode only.
480
481 config SPI_SUNXI
482         bool "Allwinner SoC SPI controllers"
483         default ARCH_SUNXI
484         help
485           Enable the Allwinner SoC SPi controller driver.
486
487           Same controller driver can reuse in all Allwinner SoC variants.
488
489 config STM32_QSPI
490         bool "STM32F7 QSPI driver"
491         depends on STM32F4 || STM32F7 || ARCH_STM32MP
492         help
493           Enable the STM32F7 Quad-SPI (QSPI) driver. This driver can be
494           used to access the SPI NOR flash chips on platforms embedding
495           this ST IP core.
496
497 config STM32_SPI
498         bool "STM32 SPI driver"
499         depends on ARCH_STM32MP
500         help
501           Enable the STM32 Serial Peripheral Interface (SPI) driver for STM32MP
502           SoCs. This uses driver model and requires a device tree binding to
503           operate.
504
505 config TEGRA114_SPI
506         bool "nVidia Tegra114 SPI driver"
507         help
508           Enable the nVidia Tegra114 SPI driver. This driver can be used to
509           access the SPI NOR flash on platforms embedding this nVidia Tegra114
510           IP core.
511
512           This controller is different than the older SoCs SPI controller and
513           also register interface get changed with this controller.
514
515 config TEGRA20_SFLASH
516         bool "nVidia Tegra20 Serial Flash controller driver"
517         help
518           Enable the nVidia Tegra20 Serial Flash controller driver. This driver
519           can be used to access the SPI NOR flash on platforms embedding this
520           nVidia Tegra20 IP core.
521
522 config TEGRA20_SLINK
523         bool "nVidia Tegra20/Tegra30 SLINK driver"
524         help
525           Enable the nVidia Tegra20/Tegra30 SLINK driver. This driver can
526           be used to access the SPI NOR flash on platforms embedding this
527           nVidia Tegra20/Tegra30 IP cores.
528
529 config TEGRA210_QSPI
530         bool "nVidia Tegra210 QSPI driver"
531         help
532           Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver
533           be used to access SPI chips on platforms embedding this
534           NVIDIA Tegra210 IP core.
535
536 config TI_QSPI
537         bool "TI QSPI driver"
538         imply TI_EDMA3
539         help
540           Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
541           This driver support spi flash single, quad and memory reads.
542
543 config UNIPHIER_SPI
544         bool "Socionext UniPhier SPI driver"
545         depends on ARCH_UNIPHIER
546         help
547           Enable the Socionext UniPhier SPI driver. This driver can
548           be used to access SPI chips on platforms embedding this
549           UniPhier IP core.
550
551 config XILINX_SPI
552         bool "Xilinx SPI driver"
553         help
554           Enable the Xilinx SPI driver from the Xilinx EDK. This SPI
555           controller support 8 bit SPI transfers only, with or w/o FIFO.
556           For more info on Xilinx SPI Register Definitions and Overview
557           see driver file - drivers/spi/xilinx_spi.c
558
559 config ZYNQ_SPI
560         bool "Zynq SPI driver"
561         help
562           Enable the Zynq SPI driver. This driver can be used to
563           access the SPI NOR flash on platforms embedding this Zynq
564           SPI IP core.
565
566 config ZYNQ_QSPI
567         bool "Zynq QSPI driver"
568         imply SPI_FLASH_BAR
569         help
570           Enable the Zynq Quad-SPI (QSPI) driver. This driver can be
571           used to access the SPI NOR flash on platforms embedding this
572           Zynq QSPI IP core. This IP is used to connect the flash in
573           4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel.
574
575 config ZYNQMP_GQSPI
576         bool "Configure ZynqMP Generic QSPI"
577         help
578           This option is used to enable ZynqMP QSPI controller driver which
579           is used to communicate with qspi flash devices.
580
581 endif # if DM_SPI
582
583 config FSL_ESPI
584         bool "Freescale eSPI driver"
585         depends on MPC85xx
586         imply SPI_FLASH_BAR
587         help
588           Enable the Freescale eSPI driver. This driver can be used to
589           access the SPI interface and SPI NOR flash on platforms embedding
590           this Freescale eSPI IP core.
591
592 config SH_QSPI
593         bool "Renesas Quad SPI driver"
594         help
595           Enable the Renesas Quad SPI controller driver. This driver can be
596           used on Renesas SoCs.
597
598 config MXC_SPI
599         bool "MXC SPI Driver"
600         help
601           Enable the MXC SPI controller driver. This driver can be used
602           on various i.MX SoCs such as i.MX31/35/51/6/7.
603
604 config SYNQUACER_SPI
605         bool "Socionext SynQuacer HS-SPI driver"
606         depends on ARCH_SYNQUACER
607         help
608           Enable the Socionext HS-SPI driver for SynQuacer. This driver can
609           be used to access the SPI interface and SPI NOR flash on platforms
610           embedding this HS-SPI IP core.
611
612 endif # menu "SPI Support"