1# SPI driver configuration options
2
3# Copyright (c) 2015-2016 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6#
7# SPI Drivers
8#
9menuconfig SPI
10	bool "Serial Peripheral Interface (SPI) bus drivers"
11	help
12	  Enable support for the SPI hardware bus.
13
14if SPI
15
16config SPI_SHELL
17	bool "SPI Shell"
18	depends on SHELL
19	help
20	  Enable SPI Shell.
21
22	  The currently SPI shell supports simple SPI write/read (transceive)
23	  operation.
24
25config SPI_ASYNC
26	bool "Asynchronous call support"
27	select POLL
28	help
29	  This option enables the asynchronous API calls.
30
31config SPI_RTIO
32	bool "RTIO support [EXPERIMENTAL]"
33	select EXPERIMENTAL
34	select RTIO
35	select RTIO_WORKQ
36	help
37	  This option enables the RTIO API calls. RTIO support is
38	  experimental as the API itself is unstable.
39
40if SPI_RTIO
41
42config SPI_RTIO_FALLBACK_MSGS
43	int "Number of available spi_buf structs for the default handler to use"
44	default 4
45	help
46		When RTIO is used with a driver that does not yet implement the submit API
47		natively the submissions are converted back to struct spi_buf values that
48		are given to spi_transfer. This requires some number of msgs be available to convert
49		the submissions into on the stack. MISRA rules dictate we must know this in
50		advance.
51
52		In all likelihood 4 is going to work for everyone, but in case you do end up with
53		an issue where you are using RTIO, your driver does not implement submit natively,
54		and get an error relating to not enough spi msgs this is the Kconfig to manipulate.
55
56endif # SPI_RTIO
57
58config SPI_SLAVE
59	bool "Slave support [EXPERIMENTAL]"
60	select EXPERIMENTAL
61	help
62	  Enables Driver SPI slave operations. Slave support depends
63	  on the driver and the hardware it runs on.
64
65config SPI_EXTENDED_MODES
66	bool "Extended modes [EXPERIMENTAL]"
67	select EXPERIMENTAL
68	help
69	  Enables extended operations in the SPI API. Currently, this
70	  enables the possibility to select the line mode (single/dual/
71	  quad/octal), though none of these mode are really supported as
72	  it would require more features exposed into the SPI buffer.
73
74config SPI_INIT_PRIORITY
75	int "Init priority"
76	default KERNEL_INIT_PRIORITY_DEVICE
77	help
78	  Device driver initialization priority.
79
80config SPI_COMPLETION_TIMEOUT_TOLERANCE
81	int "Completion timeout tolerance (ms)"
82	default 200
83	help
84	  The tolerance value in ms for the SPI completion timeout logic.
85
86config SPI_STATS
87	bool "SPI device statistics"
88	depends on STATS
89	help
90	  Enable SPI device statistics.
91
92module = SPI
93module-str = spi
94source "subsys/logging/Kconfig.template.log_config"
95
96# zephyr-keep-sorted-start
97source "drivers/spi/Kconfig.ambiq"
98source "drivers/spi/Kconfig.andes_atcspi200"
99source "drivers/spi/Kconfig.b91"
100source "drivers/spi/Kconfig.bitbang"
101source "drivers/spi/Kconfig.cc13xx_cc26xx"
102source "drivers/spi/Kconfig.dw"
103source "drivers/spi/Kconfig.esp32"
104source "drivers/spi/Kconfig.gd32"
105source "drivers/spi/Kconfig.grlib_spimctrl"
106source "drivers/spi/Kconfig.ifx_cat1"
107source "drivers/spi/Kconfig.it8xxx2"
108source "drivers/spi/Kconfig.litex"
109source "drivers/spi/Kconfig.max32"
110source "drivers/spi/Kconfig.mchp_mss"
111source "drivers/spi/Kconfig.mchp_mss_qspi"
112source "drivers/spi/Kconfig.mcux_dspi"
113source "drivers/spi/Kconfig.mcux_ecspi"
114source "drivers/spi/Kconfig.mcux_flexcomm"
115source "drivers/spi/Kconfig.mcux_flexio"
116source "drivers/spi/Kconfig.npcx"
117source "drivers/spi/Kconfig.nrfx"
118source "drivers/spi/Kconfig.numaker"
119source "drivers/spi/Kconfig.nxp_s32"
120source "drivers/spi/Kconfig.oc_simple"
121source "drivers/spi/Kconfig.opentitan"
122source "drivers/spi/Kconfig.pl022"
123source "drivers/spi/Kconfig.psoc6"
124source "drivers/spi/Kconfig.pw"
125source "drivers/spi/Kconfig.renesas_ra"
126source "drivers/spi/Kconfig.renesas_ra8"
127source "drivers/spi/Kconfig.rpi_pico"
128source "drivers/spi/Kconfig.rv32m1_lpspi"
129source "drivers/spi/Kconfig.sam"
130source "drivers/spi/Kconfig.sam0"
131source "drivers/spi/Kconfig.sedi"
132source "drivers/spi/Kconfig.sifive"
133source "drivers/spi/Kconfig.silabs_eusart"
134source "drivers/spi/Kconfig.silabs_usart"
135source "drivers/spi/Kconfig.smartbond"
136source "drivers/spi/Kconfig.spi_emul"
137source "drivers/spi/Kconfig.stm32"
138source "drivers/spi/Kconfig.test"
139source "drivers/spi/Kconfig.xec_qmspi"
140source "drivers/spi/Kconfig.xlnx"
141source "drivers/spi/Kconfig.xmc4xxx"
142source "drivers/spi/spi_nxp_lpspi/Kconfig"
143# zephyr-keep-sorted-stop
144
145endif # SPI
146