zephyr/drivers/spi/Kconfig

239 lines
4.2 KiB
Text
Raw Normal View History

# Kconfig - SPI driver configuration options
#
# Copyright (c) 2015-2016 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
# SPI Drivers
#
menuconfig SPI
bool "SPI hardware bus support"
default n
help
Enable support for the SPI hardware bus.
if SPI
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.
config SPI_INIT_PRIORITY
int "Init priority"
default 70
help
Device driver initialization priority.
config SYS_LOG_SPI_LEVEL
int "SPI Driver Log level"
depends on SYS_LOG
default 0
range 0 4
help
Sets log level for SPI drivers.
Levels are:
- 0 OFF, do not write
- 1 ERROR, only write SYS_LOG_ERR
- 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
config SPI_CS_GPIO
bool "SPI port CS pin is controlled via a GPIO port"
depends on GPIO && SPI_LEGACY_API
default n
config SPI_0
bool "SPI port 0"
default n
help
Enable SPI controller port 0.
if SPI_0
config SPI_0_NAME
string "SPI port 0 device name"
depends on !HAS_DTS_SPI
default "SPI_0"
config SPI_0_IRQ_PRI
int "Port 0 interrupt priority"
config SPI_0_DEFAULT_CFG
hex "Port 0 default configuration"
default 0x80
config SPI_0_DEFAULT_BAUD_RATE
int "Port 0 default baud rate"
default 500000
config SPI_0_CS_GPIO_PORT
string "The GPIO port which is used to control CS"
depends on SPI_CS_GPIO
default "GPIO_0"
config SPI_0_CS_GPIO_PIN
int "The GPIO PIN which is used to act as a CS pin"
depends on SPI_CS_GPIO
default 0
endif # SPI_0
config SPI_1
bool "SPI port 1"
default n
help
Enable SPI controller port 1.
if SPI_1
config SPI_1_NAME
string "SPI port 1 device name"
depends on !HAS_DTS_SPI
default "SPI_1"
config SPI_1_IRQ_PRI
int "Port 0 interrupt priority"
depends on !HAS_DTS_SPI
config SPI_1_DEFAULT_CFG
hex "Port 1 default configuration"
default 0x80
config SPI_1_DEFAULT_BAUD_RATE
int "Port 1 default baud rate"
default 500000
config SPI_1_CS_GPIO_PORT
string "The GPIO port which is used to control CS"
depends on SPI_CS_GPIO
default "GPIO_0"
config SPI_1_CS_GPIO_PIN
int "The GPIO PIN which is used to act as a CS pin"
depends on SPI_CS_GPIO
default 0
endif # SPI_1
config SPI_2
bool "SPI port 2"
default n
help
Enable SPI controller port 2.
if SPI_2
config SPI_2_NAME
string "SPI port 2 device name"
depends on !HAS_DTS_SPI
default "SPI_2"
config SPI_2_IRQ_PRI
int "Port 2 interrupt priority"
depends on !HAS_DTS_SPI
config SPI_2_DEFAULT_CFG
hex "Port 2 default configuration"
default 0x80
config SPI_2_DEFAULT_BAUD_RATE
int "Port 2 default baud rate"
default 500000
config SPI_2_CS_GPIO_PORT
string "The GPIO port which is used to control CS"
depends on SPI_CS_GPIO
default "GPIO_0"
config SPI_2_CS_GPIO_PIN
int "The GPIO PIN which is used to act as a CS pin"
depends on SPI_CS_GPIO
default 0
endif # SPI_2
config SPI_3
bool "SPI port 3"
default n
help
Enable SPI controller port 3.
if SPI_3
config SPI_3_NAME
string "SPI port 3 device name"
depends on !HAS_DTS_SPI
default "SPI_3"
config SPI_3_IRQ_PRI
int "Port 3 interrupt priority"
depends on !HAS_DTS_SPI
endif # SPI_3
config SPI_4
bool "SPI port 4"
default n
help
Enable SPI controller port 4.
config SPI_4_NAME
string "SPI port 4 device name"
depends on SPI_4
default "SPI_4"
config SPI_5
bool "SPI port 5"
default n
help
Enable SPI controller port 5.
config SPI_5_NAME
string "SPI port 5 device name"
depends on SPI_5
default "SPI_5"
if SPI_LEGACY_API
config SPI_INTEL
bool "Intel SPI controller driver"
depends on CPU_MINUTEIA
default n
help
Enable support for Intel's SPI controllers. Such controller
was formerly found on XScale chips. It can be found nowadays
on CEXXXX Intel media controller and Quark CPU (2 of them).
source "drivers/spi/Kconfig.qmsi"
source "drivers/spi/Kconfig.mcux_dspi"
source "drivers/spi/Kconfig.nrf5_legacy"
endif # SPI_LEGACY_API
if !SPI_LEGACY_API
source "drivers/spi/Kconfig.stm32"
endif # !SPI_LEGACY_API
source "drivers/spi/Kconfig.dw"
source "drivers/spi/Kconfig.sam0"
endif # SPI