This adds an spi master mode driver via bitbanged gpio. Only syncronous transfers are implemented. Clock signal timing is accomplished via busy waits, the gpios are manipulated via the standard gpio interface; these two factors limit the frequency at which it can operate - but here a simple and generic implementation was chosen over performance. The driver supports the various clock polarity and phase configurations, and can also work with word sizes which are non multiples of 8bits, currently up to 16 bits. A sample program is also added demonstrating basic use of the driver with 9bit data words. Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
101 lines
2.1 KiB
Plaintext
101 lines
2.1 KiB
Plaintext
# 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"
|
|
help
|
|
Enable support for the SPI hardware bus.
|
|
|
|
if SPI
|
|
|
|
config SPI_ASYNC
|
|
bool "Enable Asynchronous call support"
|
|
select POLL
|
|
help
|
|
This option enables the asynchronous API calls.
|
|
|
|
config SPI_SLAVE
|
|
bool "Enable Slave support [EXPERIMENTAL]"
|
|
select EXPERIMENTAL
|
|
help
|
|
Enables Driver SPI slave operations. Slave support depends
|
|
on the driver and the hardware it runs on.
|
|
|
|
config SPI_EXTENDED_MODES
|
|
bool "Enable extended modes [EXPERIMENTAL]"
|
|
select EXPERIMENTAL
|
|
help
|
|
Enables extended operations in the SPI API. Currently, this
|
|
enables the possibility to select the line mode (single/dual/
|
|
quad/octal), though none of these mode are really supported as
|
|
it would require more features exposed into the SPI buffer.
|
|
|
|
config SPI_INIT_PRIORITY
|
|
int "Init priority"
|
|
default 70
|
|
help
|
|
Device driver initialization priority.
|
|
|
|
config SPI_COMPLETION_TIMEOUT_TOLERANCE
|
|
int "Completion timeout tolerance (ms)"
|
|
default 200
|
|
help
|
|
The tolerance value in ms for the SPI completion timeout logic.
|
|
|
|
module = SPI
|
|
module-str = spi
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
source "drivers/spi/Kconfig.b91"
|
|
|
|
source "drivers/spi/Kconfig.stm32"
|
|
|
|
source "drivers/spi/Kconfig.dw"
|
|
|
|
source "drivers/spi/Kconfig.mcux_dspi"
|
|
|
|
source "drivers/spi/Kconfig.mcux_flexcomm"
|
|
|
|
source "drivers/spi/Kconfig.mcux_lpspi"
|
|
|
|
source "drivers/spi/Kconfig.rv32m1_lpspi"
|
|
|
|
source "drivers/spi/Kconfig.sam"
|
|
|
|
source "drivers/spi/Kconfig.sam0"
|
|
|
|
source "drivers/spi/Kconfig.sifive"
|
|
|
|
source "drivers/spi/Kconfig.spi_emul"
|
|
|
|
source "drivers/spi/Kconfig.nrfx"
|
|
|
|
source "drivers/spi/Kconfig.cc13xx_cc26xx"
|
|
|
|
source "drivers/spi/Kconfig.litex"
|
|
|
|
source "drivers/spi/Kconfig.oc_simple"
|
|
|
|
source "drivers/spi/Kconfig.xec_qmspi"
|
|
|
|
source "drivers/spi/Kconfig.gecko"
|
|
|
|
source "drivers/spi/Kconfig.xlnx"
|
|
|
|
source "drivers/spi/Kconfig.esp32"
|
|
|
|
source "drivers/spi/Kconfig.test"
|
|
|
|
source "drivers/spi/Kconfig.psoc6"
|
|
|
|
source "drivers/spi/Kconfig.npcx_fiu"
|
|
|
|
source "drivers/spi/Kconfig.bitbang"
|
|
|
|
endif # SPI
|