incubator-nuttx/drivers/spi/Kconfig

145 lines
3.6 KiB
Plaintext
Raw Normal View History

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config ARCH_HAVE_SPI_CRCGENERATION
bool
default n
config ARCH_HAVE_SPI_CS_CONTROL
bool
default n
config ARCH_HAVE_SPI_BITORDER
bool
default n
menuconfig SPI
bool "SPI Driver Support"
default n
---help---
This selection enables selection of common SPI options. This option
should be enabled by all platforms that support SPI interfaces.
See include/nuttx/spi/spi.h for further SPI driver information.
if SPI
config SPI_SLAVE
bool "SPI slave"
default n
---help---
Enable support for SPI slave features
if SPI_SLAVE
config SPI_SLAVE_DMA
bool "SPI slave DMA"
default n
depends on ARCH_DMA && EXPERIMENTAL
---help---
Enable support for DMA data transfers (not yet implemented).
endif
config SPI_EXCHANGE
bool "SPI exchange"
default y
---help---
Driver supports a single exchange method (vs a recvblock() and
sndblock() methods).
config SPI_CMDDATA
bool "SPI CMD/DATA"
default n
---help---
Devices on the SPI bus require out-of-band support to distinguish
command transfers from data transfers. Such devices will often support
either 9-bit SPI (yech) or 8-bit SPI and a GPIO output that selects
between command and data.
config SPI_CALLBACK
bool "Media change callbacks"
default y if MMCSD_SPI
default n if !MMCSD_SPI
---help---
Support the callback method in the SPI interface. This will allow
the SPI-based MMC/SD driver to get a notification of changes in the
card status when an SD card is inserted or removed.
config SPI_HWFEATURES
bool
default n
---help---
Selected only if a specific H/W feature is selected. This is
basically the OR of any specific hardware feature and enables
the SPI hwfeatures() interface method.
config SPI_CRCGENERATION
bool
default n
select SPI_HWFEATURES
depends on ARCH_HAVE_SPI_CRCGENERATION
---help---
Selected by MCU Kconfig logic if implementation supports automatic
generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option
as well as the hwfeartures() interface method.
* SAMV7: SPI: SPI-Freq. 40MHz; VARSELECT; hw-features This change adds the following improvements: - Increase the allowed SPI-Frequency from 20 to 40 MHz. - Correct and rename the "VARSELECT" option This option was included in the code as "CONFIG_SPI_VARSELECT" but nowhere defined in a Kconfig file. The patch renames it to "CONFIG_SAMV7_SPI_VARSELECT" and corrects the implementation according the datasheet of Atmel. In short, this option switches the processor from "fixed peripheral selection" (single device) to "variable peripheral selection" (multiple devices on the bus). - Add a new Function to the interface to control the timing and delays of the chip according the ChipSelect lines. This function can control the delay between the assertion of the ChipSelect and the first bit, between the last bit and the de-assertion of the ChipSelect and between two ChipSelects. This is needed to tune the transfer according the specification of the connected devices. - Add three "hw-features" for the SAMV7, which controls the behavior of the ChipSelect: 1. force CS inactive after transfer: this forces a (short) de-assertion of the CS after a transfer, even if more data is available in time 2. force CS active after transfer: this forces the CS to stay active after a transfer, even if the chip runs out of data. Btw.: this is a prerequisit to make the LASTXFER bit working at all. - escape LASTXFER: this suppresses the LASTXFER bit at the end of the next transfer. The "escape"-Flag is reset automatically.
2016-06-15 03:12:16 +08:00
config SPI_CS_CONTROL
bool "SPI CS Behavior Control"
default n
select SPI_HWFEATURES
depends on ARCH_HAVE_SPI_CS_CONTROL
* SAMV7: SPI: SPI-Freq. 40MHz; VARSELECT; hw-features This change adds the following improvements: - Increase the allowed SPI-Frequency from 20 to 40 MHz. - Correct and rename the "VARSELECT" option This option was included in the code as "CONFIG_SPI_VARSELECT" but nowhere defined in a Kconfig file. The patch renames it to "CONFIG_SAMV7_SPI_VARSELECT" and corrects the implementation according the datasheet of Atmel. In short, this option switches the processor from "fixed peripheral selection" (single device) to "variable peripheral selection" (multiple devices on the bus). - Add a new Function to the interface to control the timing and delays of the chip according the ChipSelect lines. This function can control the delay between the assertion of the ChipSelect and the first bit, between the last bit and the de-assertion of the ChipSelect and between two ChipSelects. This is needed to tune the transfer according the specification of the connected devices. - Add three "hw-features" for the SAMV7, which controls the behavior of the ChipSelect: 1. force CS inactive after transfer: this forces a (short) de-assertion of the CS after a transfer, even if more data is available in time 2. force CS active after transfer: this forces the CS to stay active after a transfer, even if the chip runs out of data. Btw.: this is a prerequisit to make the LASTXFER bit working at all. - escape LASTXFER: this suppresses the LASTXFER bit at the end of the next transfer. The "escape"-Flag is reset automatically.
2016-06-15 03:12:16 +08:00
---help---
Enables possibilities to define the behavior of CS.
Also enables the hwfeatures() interface method.
config SPI_BITORDER
bool "SPI Bit Order Control"
default n
select SPI_HWFEATURES
depends on ARCH_HAVE_SPI_BITORDER
---help---
Enables capability to select MSB- or LSB-first hardware feature for
data transfers.
* SAMV7: SPI: SPI-Freq. 40MHz; VARSELECT; hw-features This change adds the following improvements: - Increase the allowed SPI-Frequency from 20 to 40 MHz. - Correct and rename the "VARSELECT" option This option was included in the code as "CONFIG_SPI_VARSELECT" but nowhere defined in a Kconfig file. The patch renames it to "CONFIG_SAMV7_SPI_VARSELECT" and corrects the implementation according the datasheet of Atmel. In short, this option switches the processor from "fixed peripheral selection" (single device) to "variable peripheral selection" (multiple devices on the bus). - Add a new Function to the interface to control the timing and delays of the chip according the ChipSelect lines. This function can control the delay between the assertion of the ChipSelect and the first bit, between the last bit and the de-assertion of the ChipSelect and between two ChipSelects. This is needed to tune the transfer according the specification of the connected devices. - Add three "hw-features" for the SAMV7, which controls the behavior of the ChipSelect: 1. force CS inactive after transfer: this forces a (short) de-assertion of the CS after a transfer, even if more data is available in time 2. force CS active after transfer: this forces the CS to stay active after a transfer, even if the chip runs out of data. Btw.: this is a prerequisit to make the LASTXFER bit working at all. - escape LASTXFER: this suppresses the LASTXFER bit at the end of the next transfer. The "escape"-Flag is reset automatically.
2016-06-15 03:12:16 +08:00
config SPI_CS_DELAY_CONTROL
bool "SPI CS Delay Control"
default n
---help---
Enables possibilities to define the SPI-ChipSelect-Delays like
time between ChipSelect assertion and first Data-Bit, the time
between the last Data-Bit and the de-assertion and the minimum
delay between two ChipSelects.
This option enables the setdelay() interface method.
config SPI_DRIVER
bool "SPI character driver"
default n
depends on SPI_EXCHANGE
---help---
Build in support for a character driver at /dev/spi[N] that may be
used to perform SPI bus transfers from applications. The intent of
this driver is to support SPI testing. It is not suitable for use
in any real driver application.
config SPI_BITBANG
bool "SPI bit-bang device"
default n
---help---
Enable support for a generic SPI bit-bang device.
See include/nuttx/spi/spi_bitbang.h for further information.
2013-07-02 07:49:43 +08:00
if SPI_BITBANG
config SPI_BITBANG_VARWIDTH
bool "SPI bit-bang variable width transfers"
default n
---help---
Enable support for a variable data width transfers. Default: 8-bit
2013-07-02 07:49:43 +08:00
only.
endif # SPI_BITBANG
endif # SPI