Kconfig 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. menuconfig RT_USING_SPI
  2. bool "Using SPI Bus/Device device drivers"
  3. default n
  4. if RT_USING_SPI
  5. menuconfig RT_USING_SPI_ISR
  6. bool "Enable interrupt-safe SPI operations (using spinlocks in ISR context)"
  7. default y
  8. config RT_USING_SPI_BITOPS
  9. bool "Enable SPI bit-bang operation functions"
  10. default n
  11. menuconfig RT_USING_SOFT_SPI
  12. bool "Use GPIO to simulate SPI"
  13. default n
  14. select RT_USING_PIN
  15. select RT_USING_SPI_BITOPS
  16. if RT_USING_SOFT_SPI
  17. menuconfig RT_USING_SOFT_SPI0
  18. bool "Enable SPI0 Bus (software simulation)"
  19. default y
  20. if RT_USING_SOFT_SPI0
  21. config RT_SOFT_SPI0_SCK_PIN
  22. int "SCK pin number"
  23. range 0 32767
  24. default 1
  25. config RT_SOFT_SPI0_MISO_PIN
  26. int "MISO pin number"
  27. range 0 32767
  28. default 2
  29. config RT_SOFT_SPI0_MOSI_PIN
  30. int "MOSI pin number"
  31. range 0 32767
  32. default 3
  33. config RT_SOFT_SPI0_BUS_NAME
  34. string "Bus name"
  35. default "spi0"
  36. config RT_SOFT_SPI0_TIMING_DELAY
  37. int "Timing delay (us)"
  38. range 0 32767
  39. default 1
  40. endif
  41. menuconfig RT_USING_SOFT_SPI1
  42. bool "Enable SPI1 Bus (software simulation)"
  43. default y
  44. if RT_USING_SOFT_SPI1
  45. config RT_SOFT_SPI1_SCK_PIN
  46. int "SCK pin number"
  47. range 0 32767
  48. default 4
  49. config RT_SOFT_SPI1_MISO_PIN
  50. int "MISO pin number"
  51. range 0 32767
  52. default 5
  53. config RT_SOFT_SPI1_MOSI_PIN
  54. int "MOSI pin number"
  55. range 0 32767
  56. default 6
  57. config RT_SOFT_SPI1_BUS_NAME
  58. string "Bus name"
  59. default "spi1"
  60. config RT_SOFT_SPI1_TIMING_DELAY
  61. int "Timing delay (us)"
  62. range 0 32767
  63. default 1
  64. endif
  65. menuconfig RT_USING_SOFT_SPI2
  66. bool "Enable SPI2 Bus (software simulation)"
  67. default n
  68. if RT_USING_SOFT_SPI2
  69. config RT_SOFT_SPI2_SCK_PIN
  70. int "SCK pin number"
  71. range 0 32767
  72. default 7
  73. config RT_SOFT_SPI2_MISO_PIN
  74. int "MISO pin number"
  75. range 0 32767
  76. default 8
  77. config RT_SOFT_SPI2_MOSI_PIN
  78. int "MOSI pin number"
  79. range 0 32767
  80. default 9
  81. config RT_SOFT_SPI2_BUS_NAME
  82. string "Bus name"
  83. default "spi2"
  84. config RT_SOFT_SPI2_TIMING_DELAY
  85. int "Timing delay (us)"
  86. range 0 32767
  87. default 1
  88. endif
  89. menuconfig RT_USING_SOFT_SPI3
  90. bool "Enable SPI3 Bus (software simulation)"
  91. default n
  92. if RT_USING_SOFT_SPI3
  93. config RT_SOFT_SPI3_SCK_PIN
  94. int "SCK pin number"
  95. range 0 32767
  96. default 10
  97. config RT_SOFT_SPI3_MISO_PIN
  98. int "MISO pin number"
  99. range 0 32767
  100. default 11
  101. config RT_SOFT_SPI3_MOSI_PIN
  102. int "MOSI pin number"
  103. range 0 32767
  104. default 12
  105. config RT_SOFT_SPI3_BUS_NAME
  106. string "Bus name"
  107. default "spi3"
  108. config RT_SOFT_SPI3_TIMING_DELAY
  109. int "Timing delay (us)"
  110. range 0 32767
  111. default 1
  112. endif
  113. menuconfig RT_USING_SOFT_SPI4
  114. bool "Enable SPI4 Bus (software simulation)"
  115. default n
  116. if RT_USING_SOFT_SPI4
  117. config RT_SOFT_SPI4_SCK_PIN
  118. int "SCK pin number"
  119. range 0 32767
  120. default 13
  121. config RT_SOFT_SPI4_MISO_PIN
  122. int "MISO pin number"
  123. range 0 32767
  124. default 14
  125. config RT_SOFT_SPI4_MOSI_PIN
  126. int "MOSI pin number"
  127. range 0 32767
  128. default 15
  129. config RT_SOFT_SPI4_BUS_NAME
  130. string "Bus name"
  131. default "spi4"
  132. config RT_SOFT_SPI4_TIMING_DELAY
  133. int "Timing delay (us)"
  134. range 0 32767
  135. default 1
  136. endif
  137. menuconfig RT_USING_SOFT_SPI5
  138. bool "Enable SPI5 Bus (software simulation)"
  139. default n
  140. if RT_USING_SOFT_SPI5
  141. config RT_SOFT_SPI5_SCK_PIN
  142. int "SCK pin number"
  143. range 0 32767
  144. default 16
  145. config RT_SOFT_SPI5_MISO_PIN
  146. int "MISO pin number"
  147. range 0 32767
  148. default 17
  149. config RT_SOFT_SPI5_MOSI_PIN
  150. int "MOSI pin number"
  151. range 0 32767
  152. default 18
  153. config RT_SOFT_SPI5_BUS_NAME
  154. string "Bus name"
  155. default "spi5"
  156. config RT_SOFT_SPI5_TIMING_DELAY
  157. int "Timing delay (us)"
  158. range 0 32767
  159. default 1
  160. endif
  161. menuconfig RT_USING_SOFT_SPI6
  162. bool "Enable SPI6 Bus (software simulation)"
  163. default n
  164. if RT_USING_SOFT_SPI6
  165. config RT_SOFT_SPI6_SCK_PIN
  166. int "SCK pin number"
  167. range 0 32767
  168. default 19
  169. config RT_SOFT_SPI6_MISO_PIN
  170. int "MISO pin number"
  171. range 0 32767
  172. default 20
  173. config RT_SOFT_SPI6_MOSI_PIN
  174. int "MOSI pin number"
  175. range 0 32767
  176. default 21
  177. config RT_SOFT_SPI6_BUS_NAME
  178. string "Bus name"
  179. default "spi6"
  180. config RT_SOFT_SPI6_TIMING_DELAY
  181. int "Timing delay (us)"
  182. range 0 32767
  183. default 1
  184. endif
  185. endif
  186. config RT_SPI_BITOPS_DEBUG
  187. bool "Use simulate SPI debug message"
  188. depends on RT_USING_SOFT_SPI
  189. default n
  190. config RT_USING_QSPI
  191. bool "Enable QSPI mode"
  192. default n
  193. config RT_USING_SPI_MSD
  194. bool "Using SD/TF card driver with spi"
  195. select RT_USING_DFS
  196. default n
  197. config RT_USING_SFUD
  198. bool "Using Serial Flash Universal Driver"
  199. default n
  200. help
  201. An using JEDEC's SFDP standard serial (SPI) flash universal driver library
  202. if RT_USING_SFUD
  203. config RT_SFUD_USING_SFDP
  204. bool "Using auto probe flash JEDEC SFDP parameter"
  205. default y
  206. config RT_SFUD_USING_FLASH_INFO_TABLE
  207. bool "Using defined supported flash chip information table"
  208. default y
  209. config RT_SFUD_USING_QSPI
  210. bool "Using QSPI mode support"
  211. select RT_USING_QSPI
  212. default n
  213. config RT_SFUD_SPI_MAX_HZ
  214. int "Default spi maximum speed(HZ)"
  215. range 0 50000000
  216. default 50000000
  217. help
  218. Read the JEDEC SFDP command must run at 50 MHz or less,and you also can use rt_spi_configure(); to config spi speed.
  219. config RT_DEBUG_SFUD
  220. bool "Show more SFUD debug information"
  221. default n
  222. endif
  223. config RT_USING_ENC28J60
  224. bool "Using ENC28J60 SPI Ethernet network interface"
  225. select RT_USING_LWIP
  226. default n
  227. config RT_USING_SPI_WIFI
  228. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  229. select RT_USING_LWIP
  230. default n
  231. endif
  232. if RT_USING_DM && RT_USING_SPI
  233. osource "$(SOC_DM_SPI_DIR)/Kconfig"
  234. endif