Kconfig 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config ARCH_HAVE_SPI_CRCGENERATION
  6. bool
  7. default n
  8. config ARCH_HAVE_SPI_CS_CONTROL
  9. bool
  10. default n
  11. config ARCH_HAVE_SPI_BITORDER
  12. bool
  13. default n
  14. menuconfig SPI
  15. bool "SPI Driver Support"
  16. default n
  17. ---help---
  18. This selection enables selection of common SPI options. This option
  19. should be enabled by all platforms that support SPI interfaces.
  20. See include/nuttx/spi/spi.h for further SPI driver information.
  21. if SPI
  22. config SPI_SLAVE
  23. bool "SPI Slave"
  24. default n
  25. ---help---
  26. Enable support for SPI Slave features
  27. if SPI_SLAVE
  28. config SPI_SLAVE_DRIVER
  29. bool "SPI Slave character driver"
  30. default n
  31. ---help---
  32. Built-in support for a character driver at /dev/spislv[N] that may be
  33. used to perform SPI bus transfers from applications.
  34. The intent of this driver is to support SPI Slave testing.
  35. if SPI_SLAVE_DRIVER
  36. config SPI_SLAVE_DRIVER_MODE
  37. int "SPI Slave character driver default mode"
  38. default 0
  39. ---help---
  40. Default SPI Slave character driver mode, where:
  41. 0 = CPOL=0, CPHA=0
  42. 1 = CPOL=0, CPHA=1
  43. 2 = CPOL=1, CPHA=0
  44. 3 = CPOL=1, CPHA=1
  45. config SPI_SLAVE_DRIVER_WIDTH
  46. int "SPI Slave character driver default bit width"
  47. default 8
  48. ---help---
  49. Number of bits per SPI Slave transfer (default 8).
  50. config SPI_SLAVE_DRIVER_BUFFER_SIZE
  51. int "SPI Slave character driver TX and RX buffer sizes"
  52. default 128
  53. ---help---
  54. Size of the internal TX and RX buffers of the SPI Slave
  55. character driver.
  56. config SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER
  57. bool "SPI Slave character driver colorize TX buffer"
  58. default n
  59. ---help---
  60. Initialize entries of the TX buffer with a given pattern.
  61. If the SPI Slave controller performs a call to "getdata" API during
  62. the "bind" operation, the colorized buffer may be sent as part of the
  63. first TX transfer of the SPI Slave controller.
  64. This feature might be useful for a quick communication test between
  65. Master and Slave.
  66. config SPI_SLAVE_DRIVER_COLORIZE_PATTERN
  67. hex "SPI Slave character driver colorize pattern"
  68. default 0xa5
  69. depends on SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER
  70. ---help---
  71. Pattern to be used as the coloration of the TX buffer.
  72. config SPI_SLAVE_DRIVER_COLORIZE_NUM_BYTES
  73. int "SPI Slave character driver colorize number of bytes"
  74. default 4
  75. depends on SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER
  76. ---help---
  77. Number of bytes of the TX buffer to be colorized.
  78. endif # SPI_SLAVE_DRIVER
  79. config SPI_SLAVE_DMA
  80. bool "SPI Slave DMA"
  81. default n
  82. depends on ARCH_DMA && EXPERIMENTAL
  83. ---help---
  84. Enable support for DMA data transfers (not yet implemented).
  85. endif # SPI_SLAVE
  86. config SPI_EXCHANGE
  87. bool "SPI exchange"
  88. default y
  89. ---help---
  90. Driver supports a single exchange method (vs a recvblock() and
  91. sndblock() methods).
  92. config SPI_CMDDATA
  93. bool "SPI CMD/DATA"
  94. default n
  95. ---help---
  96. Devices on the SPI bus require out-of-band support to distinguish
  97. command transfers from data transfers. Such devices will often support
  98. either 9-bit SPI (yech) or 8-bit SPI and a GPIO output that selects
  99. between command and data.
  100. config SPI_CALLBACK
  101. bool "Media change callbacks"
  102. default y if MMCSD_SPI
  103. default n if !MMCSD_SPI
  104. ---help---
  105. Support the callback method in the SPI interface. This will allow
  106. the SPI-based MMC/SD driver to get a notification of changes in the
  107. card status when an SD card is inserted or removed.
  108. config SPI_HWFEATURES
  109. bool
  110. default n
  111. ---help---
  112. Selected only if a specific H/W feature is selected. This is
  113. basically the OR of any specific hardware feature and enables
  114. the SPI hwfeatures() interface method.
  115. config SPI_CRCGENERATION
  116. bool
  117. default n
  118. select SPI_HWFEATURES
  119. depends on ARCH_HAVE_SPI_CRCGENERATION
  120. ---help---
  121. Selected by MCU Kconfig logic if implementation supports automatic
  122. generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option
  123. as well as the hwfeartures() interface method.
  124. config SPI_CS_CONTROL
  125. bool "SPI CS Behavior Control"
  126. default n
  127. select SPI_HWFEATURES
  128. depends on ARCH_HAVE_SPI_CS_CONTROL
  129. ---help---
  130. Enables possibilities to define the behavior of CS.
  131. Also enables the hwfeatures() interface method.
  132. config SPI_BITORDER
  133. bool "SPI Bit Order Control"
  134. default n
  135. select SPI_HWFEATURES
  136. depends on ARCH_HAVE_SPI_BITORDER
  137. ---help---
  138. Enables capability to select MSB- or LSB-first hardware feature for
  139. data transfers.
  140. config SPI_CS_DELAY_CONTROL
  141. bool "SPI CS Delay Control"
  142. default n
  143. ---help---
  144. Enables possibilities to define the SPI-ChipSelect-Delays like
  145. time between ChipSelect assertion and first Data-Bit, the time
  146. between the last Data-Bit and the de-assertion and the minimum
  147. delay between two ChipSelects.
  148. This option enables the setdelay() interface method.
  149. config SPI_TRIGGER
  150. bool "SPI DMA trigger"
  151. default n
  152. select SPI_HWFEATURES
  153. depends on SPI_EXCHANGE
  154. ---help---
  155. Some architectures benefit from delaying the start of DMA from the
  156. DMA setup. If this option is selected, then an SPI_TRIGGER() method
  157. is supported: The DMA is setup with in in SPI_EXCHANGE() but does
  158. not actually begin until SPI_TRIGGER() is called.
  159. config SPI_DRIVER
  160. bool "SPI character driver"
  161. default n
  162. depends on SPI_EXCHANGE
  163. ---help---
  164. Build in support for a character driver at /dev/spi[N] that may be
  165. used to perform SPI bus transfers from applications. The intent of
  166. this driver is to support SPI testing. It is not suitable for use
  167. in any real driver application.
  168. config SPI_BITBANG
  169. bool "SPI bit-bang device"
  170. default n
  171. ---help---
  172. Enable support for a generic SPI bit-bang device.
  173. See include/nuttx/spi/spi_bitbang.h for further information.
  174. if SPI_BITBANG
  175. config SPI_BITBANG_VARWIDTH
  176. bool "SPI bit-bang variable width transfers"
  177. default n
  178. ---help---
  179. Enable support for a variable data width transfers. Default: 8-bit
  180. only.
  181. endif # SPI_BITBANG
  182. endif # SPI