2015-08-21 12:57:49 +03:00
|
|
|
# Kconfig - SPI driver configuration options
|
|
|
|
|
|
|
|
#
|
2016-03-17 11:21:49 -07:00
|
|
|
# Copyright (c) 2015-2016 Intel Corporation
|
2015-08-21 12:57:49 +03:00
|
|
|
#
|
2017-01-18 17:01:01 -08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-08-21 12:57:49 +03:00
|
|
|
#
|
|
|
|
|
2017-04-21 13:24:07 +02:00
|
|
|
config SPI_LEGACY_API
|
|
|
|
bool "Use legacy SPI API (default)"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Driver and user API is the legacy SPI API (spi_legacy.h).
|
|
|
|
If unselected, the new API will be used.
|
|
|
|
|
2015-08-21 12:57:49 +03:00
|
|
|
#
|
|
|
|
# SPI Drivers
|
|
|
|
#
|
|
|
|
menuconfig SPI
|
|
|
|
bool
|
|
|
|
prompt "SPI hardware bus support"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable support for the SPI hardware bus.
|
|
|
|
|
2016-05-07 18:57:14 -04:00
|
|
|
config SPI_QMSI
|
|
|
|
bool "QMSI driver for SPI controller"
|
|
|
|
depends on SPI && QMSI
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
SPI driver implementation using QMSI library. QMSI is the
|
|
|
|
Quark Microcontroller Software Interface, providing a common
|
|
|
|
interface to the Quark family of microcontrollers.
|
|
|
|
|
2016-04-11 09:30:43 -07:00
|
|
|
config SPI_QMSI_SS
|
2016-05-24 18:17:13 -05:00
|
|
|
bool "QMSI driver for SPI controller on Sensor Subsystem"
|
|
|
|
depends on SPI && QMSI
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
SPI driver implementation using QMSI library. This instance is
|
|
|
|
for the Sensor Subsystem.
|
2016-04-11 09:30:43 -07:00
|
|
|
|
2016-05-07 18:57:14 -04:00
|
|
|
config SPI_INTEL
|
|
|
|
bool
|
|
|
|
prompt "Intel SPI controller driver"
|
|
|
|
depends on SPI && CPU_MINUTEIA
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable support for Intel's SPI controllers. Such controller
|
2017-04-21 10:29:51 -07:00
|
|
|
was formerly found on XScale chips. It can be found nowadays
|
2016-05-07 18:57:14 -04:00
|
|
|
on CEXXXX Intel media controller and Quark CPU (2 of them).
|
|
|
|
|
2016-09-16 15:24:19 +02:00
|
|
|
config SPI_STM32
|
|
|
|
bool
|
|
|
|
prompt "STM32 MCU SPI controller driver"
|
|
|
|
depends on SPI && SOC_FAMILY_STM32
|
|
|
|
depends on SOC_SERIES_STM32L4X || SOC_SERIES_STM32F4X || SOC_SERIES_STM32F3X
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable SPI support on the STM32 family of processors.
|
|
|
|
|
|
|
|
config SPI_STM32_INTERRUPT
|
|
|
|
bool
|
|
|
|
prompt "STM32 MCU SPI Interrupt Support"
|
|
|
|
depends on SPI_STM32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable Interrupt support for the SPI Driver of STM32 family.
|
2016-05-07 18:57:14 -04:00
|
|
|
|
2015-09-30 14:53:03 +03:00
|
|
|
if SPI
|
2016-04-17 05:55:43 +08:00
|
|
|
config SPI_INIT_PRIORITY
|
|
|
|
int "Init priority"
|
|
|
|
default 70
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
|
2016-05-07 19:15:28 -04:00
|
|
|
config SYS_LOG_SPI_LEVEL
|
|
|
|
int
|
|
|
|
prompt "SPI Driver Log level"
|
|
|
|
depends on SYS_LOG && SPI
|
|
|
|
default 0
|
|
|
|
range 0 4
|
2015-08-21 12:57:49 +03:00
|
|
|
help
|
2016-12-15 13:54:17 +01:00
|
|
|
Sets log level for SPI drivers.
|
2016-05-07 19:15:28 -04:00
|
|
|
Levels are:
|
|
|
|
0 OFF, do not write
|
|
|
|
1 ERROR, only write SYS_LOG_ERR
|
2017-04-21 10:29:51 -07:00
|
|
|
2 WARNING, write SYS_LOG_WRN in addition to previous level
|
|
|
|
3 INFO, write SYS_LOG_INF in addition to previous levels
|
|
|
|
4 DEBUG, write SYS_LOG_DBG in addition to previous levels
|
2015-08-21 13:01:08 +03:00
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_CS_GPIO
|
2016-05-07 18:57:14 -04:00
|
|
|
bool "SPI port CS pin is controlled via a GPIO port"
|
2017-06-15 05:13:57 +05:30
|
|
|
depends on GPIO
|
2016-05-07 18:57:14 -04:00
|
|
|
default n
|
2015-11-21 21:28:21 -05:00
|
|
|
|
2016-05-07 18:57:14 -04:00
|
|
|
config SPI_0
|
|
|
|
bool
|
2016-08-17 14:51:18 +05:30
|
|
|
prompt "SPI port 0"
|
2016-05-07 18:57:14 -04:00
|
|
|
default n
|
|
|
|
help
|
2016-08-17 14:51:18 +05:30
|
|
|
Enable SPI controller port 0.
|
2016-05-07 18:57:14 -04:00
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_0_NAME
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
|
|
|
prompt "SPI port 0 device name"
|
|
|
|
depends on SPI_0
|
|
|
|
default "SPI_0"
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_0_IRQ_PRI
|
2016-05-07 18:57:14 -04:00
|
|
|
int
|
|
|
|
prompt "Port 0 interrupt priority"
|
|
|
|
depends on SPI_0
|
2016-02-18 14:38:32 -05:00
|
|
|
|
2016-12-11 12:46:04 -06:00
|
|
|
config SPI_0_DEFAULT_CFG
|
|
|
|
hex "Port 0 default configuration"
|
|
|
|
depends on SPI_0
|
|
|
|
default 0x80
|
|
|
|
|
|
|
|
config SPI_0_DEFAULT_BAUD_RATE
|
|
|
|
int "Port 0 default baud rate"
|
|
|
|
depends on SPI_0
|
|
|
|
default 500000
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_0_CS_GPIO_PORT
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
|
|
|
prompt "The GPIO port which is used to control CS"
|
|
|
|
depends on SPI_0 && SPI_CS_GPIO
|
|
|
|
default "GPIO_0"
|
2016-02-18 14:38:32 -05:00
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_0_CS_GPIO_PIN
|
2016-05-07 18:57:14 -04:00
|
|
|
int "The GPIO PIN which is used to act as a CS pin"
|
|
|
|
depends on SPI_0 && SPI_CS_GPIO
|
|
|
|
default 0
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_1
|
2016-05-07 18:57:14 -04:00
|
|
|
bool
|
|
|
|
prompt "SPI port 1"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable SPI controller port 1.
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_1_NAME
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
|
|
|
prompt "SPI port 1 device name"
|
|
|
|
depends on SPI_1
|
|
|
|
default "SPI_1"
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_1_IRQ_PRI
|
2016-05-07 18:57:14 -04:00
|
|
|
int
|
|
|
|
prompt "Port 0 interrupt priority"
|
|
|
|
depends on SPI_1
|
|
|
|
|
2016-12-11 12:46:04 -06:00
|
|
|
config SPI_1_DEFAULT_CFG
|
|
|
|
hex "Port 1 default configuration"
|
|
|
|
depends on SPI_1
|
|
|
|
default 0x80
|
|
|
|
|
|
|
|
config SPI_1_DEFAULT_BAUD_RATE
|
|
|
|
int "Port 1 default baud rate"
|
|
|
|
depends on SPI_1
|
|
|
|
default 500000
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_1_CS_GPIO_PORT
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
|
|
|
prompt "The GPIO port which is used to control CS"
|
|
|
|
depends on SPI_1 && SPI_CS_GPIO
|
|
|
|
default "GPIO_0"
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_1_CS_GPIO_PIN
|
2016-05-07 18:57:14 -04:00
|
|
|
int "The GPIO PIN which is used to act as a CS pin"
|
|
|
|
depends on SPI_1 && SPI_CS_GPIO
|
|
|
|
default 0
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_2
|
2016-05-07 18:57:14 -04:00
|
|
|
bool
|
2016-08-17 14:51:18 +05:30
|
|
|
prompt "SPI port 2"
|
2016-05-07 18:57:14 -04:00
|
|
|
default n
|
|
|
|
help
|
2016-08-17 14:51:18 +05:30
|
|
|
Enable SPI controller port 2.
|
2016-05-07 18:57:14 -04:00
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_2_NAME
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
2016-08-17 14:51:18 +05:30
|
|
|
prompt "SPI port 2 device name"
|
2016-05-07 18:57:14 -04:00
|
|
|
depends on SPI_2
|
|
|
|
default "SPI_2"
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_2_IRQ_PRI
|
2016-05-07 18:57:14 -04:00
|
|
|
int
|
2016-08-17 14:51:18 +05:30
|
|
|
prompt "Port 2 interrupt priority"
|
2016-05-07 18:57:14 -04:00
|
|
|
depends on SPI_2
|
|
|
|
|
2016-12-11 12:46:04 -06:00
|
|
|
config SPI_2_DEFAULT_CFG
|
|
|
|
hex "Port 2 default configuration"
|
|
|
|
depends on SPI_2
|
|
|
|
default 0x80
|
|
|
|
|
|
|
|
config SPI_2_DEFAULT_BAUD_RATE
|
|
|
|
int "Port 2 default baud rate"
|
|
|
|
depends on SPI_2
|
|
|
|
default 500000
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_2_CS_GPIO_PORT
|
2016-05-07 18:57:14 -04:00
|
|
|
string
|
|
|
|
prompt "The GPIO port which is used to control CS"
|
|
|
|
depends on SPI_2 && SPI_CS_GPIO
|
|
|
|
default "GPIO_0"
|
|
|
|
|
2016-05-24 18:17:13 -05:00
|
|
|
config SPI_2_CS_GPIO_PIN
|
2016-05-07 18:57:14 -04:00
|
|
|
int "The GPIO PIN which is used to act as a CS pin"
|
|
|
|
depends on SPI_2 && SPI_CS_GPIO
|
|
|
|
default 0
|
|
|
|
|
2016-09-16 15:24:19 +02:00
|
|
|
config SPI_3
|
|
|
|
bool
|
|
|
|
prompt "SPI port 3"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable SPI controller port 3.
|
|
|
|
|
|
|
|
config SPI_3_NAME
|
|
|
|
string
|
|
|
|
prompt "SPI port 3 device name"
|
|
|
|
depends on SPI_3
|
|
|
|
default "SPI_3"
|
|
|
|
|
|
|
|
config SPI_3_IRQ_PRI
|
|
|
|
int
|
|
|
|
prompt "Port 3 interrupt priority"
|
|
|
|
depends on SPI_3
|
|
|
|
|
2016-11-30 17:17:16 -08:00
|
|
|
config SPI_SS_INIT_PRIORITY
|
|
|
|
int "Init priority"
|
|
|
|
depends on SPI_QMSI_SS
|
|
|
|
default 70
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
|
|
|
|
config SPI_SS_CS_GPIO
|
|
|
|
bool "SPI port CS pin is controlled via a GPIO port"
|
2017-01-13 17:40:46 -08:00
|
|
|
select GPIO
|
|
|
|
depends on SPI_QMSI_SS
|
2016-11-30 17:17:16 -08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config SPI_SS_0
|
|
|
|
bool
|
|
|
|
prompt "SPI SS port 0"
|
|
|
|
depends on SPI_QMS_SS
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable SPI controller port 0.
|
|
|
|
|
|
|
|
config SPI_SS_0_NAME
|
|
|
|
string
|
|
|
|
prompt "SPI SS port 0 device name"
|
|
|
|
depends on SPI_SS_0
|
|
|
|
default "SPI_SS_0"
|
|
|
|
|
|
|
|
config SPI_SS_0_IRQ_PRI
|
|
|
|
int
|
|
|
|
prompt "Port 0 interrupt priority"
|
|
|
|
depends on SPI_SS_0
|
|
|
|
|
|
|
|
config SPI_SS_0_CS_GPIO_PORT
|
|
|
|
string
|
|
|
|
prompt "The GPIO port which is used to control CS"
|
|
|
|
depends on SPI_SS_0 && SPI_SS_CS_GPIO
|
|
|
|
default "GPIO_0"
|
|
|
|
|
|
|
|
config SPI_SS_0_CS_GPIO_PIN
|
|
|
|
int "The GPIO PIN which is used to act as a CS pin"
|
|
|
|
depends on SPI_SS_0 && SPI_SS_CS_GPIO
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config SPI_SS_1
|
|
|
|
bool
|
|
|
|
prompt "SPI SS port 1"
|
|
|
|
depends on SPI_QMSI_SS
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable SPI controller port 1.
|
|
|
|
|
|
|
|
config SPI_SS_1_NAME
|
|
|
|
string
|
|
|
|
prompt "SPI port 1 device name"
|
|
|
|
depends on SPI_SS_1
|
|
|
|
default "SPI_SS_1"
|
|
|
|
|
|
|
|
config SPI_SS_1_IRQ_PRI
|
|
|
|
int
|
|
|
|
prompt "Port 0 interrupt priority"
|
|
|
|
depends on SPI_SS_1
|
|
|
|
|
|
|
|
config SPI_SS_1_CS_GPIO_PORT
|
|
|
|
string
|
|
|
|
prompt "The GPIO port which is used to control CS"
|
|
|
|
depends on SPI_SS_1 && SPI_SS_CS_GPIO
|
|
|
|
default "GPIO_0"
|
|
|
|
|
|
|
|
config SPI_SS_1_CS_GPIO_PIN
|
|
|
|
int "The GPIO PIN which is used to act as a CS pin"
|
|
|
|
depends on SPI_SS_1 && SPI_SS_CS_GPIO
|
|
|
|
default 0
|
|
|
|
|
2016-05-07 18:57:14 -04:00
|
|
|
source "drivers/spi/Kconfig.dw"
|
2016-02-18 14:38:32 -05:00
|
|
|
|
2017-02-28 12:12:50 -06:00
|
|
|
source "drivers/spi/Kconfig.mcux_dspi"
|
2016-11-28 16:19:14 -06:00
|
|
|
|
2017-07-19 22:19:17 +02:00
|
|
|
if SPI_LEGACY_API
|
|
|
|
source "drivers/spi/Kconfig.nrf5_legacy"
|
|
|
|
endif
|
2017-03-20 18:28:37 +01:00
|
|
|
|
2016-02-18 14:38:32 -05:00
|
|
|
endif # SPI
|