Kconfig 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. mainmenu "RT-Thread Configuration"
  2. config BSP_DIR
  3. string
  4. option env="BSP_ROOT"
  5. default "."
  6. config RTT_DIR
  7. string
  8. option env="RTT_ROOT"
  9. default "../../.."
  10. config PKGS_DIR
  11. string
  12. option env="PKGS_ROOT"
  13. default "packages"
  14. source "$RTT_DIR/Kconfig"
  15. source "$PKGS_DIR/Kconfig"
  16. config SOC_IMXRT1021
  17. bool
  18. select ARCH_ARM_CORTEX_M7
  19. select ARCH_ARM_CORTEX_FPU
  20. default y
  21. config BOARD_USING_HYPERFLASH
  22. bool
  23. default n
  24. config BOARD_USING_QSPIFLASH
  25. bool
  26. default n
  27. # RT1021 board select!
  28. choice
  29. prompt "RT1021 Board select"
  30. default BOARD_RT1021_EVK
  31. config BOARD_RT1021_EVK
  32. bool "RT1021_EVK"
  33. select BOARD_USING_QSPIFLASH
  34. endchoice
  35. menu "RT1021 Bsp Config"
  36. menu "Select uart drivers"
  37. config RT_USING_UART1
  38. bool "Using uart1"
  39. select RT_USING_SERIAL
  40. default y
  41. config RT_USING_UART2
  42. bool "Using uart2"
  43. select RT_USING_SERIAL
  44. default n
  45. config RT_USING_UART3
  46. bool "Using uart3"
  47. select RT_USING_SERIAL
  48. default n
  49. config RT_USING_UART4
  50. bool "Using uart4"
  51. select RT_USING_SERIAL
  52. default n
  53. config RT_USING_UART5
  54. bool "Using uart5"
  55. select RT_USING_SERIAL
  56. default n
  57. config RT_USING_UART6
  58. bool "Using uart6"
  59. select RT_USING_SERIAL
  60. default n
  61. config RT_USING_UART7
  62. bool "Using uart7"
  63. select RT_USING_SERIAL
  64. default n
  65. config RT_USING_UART8
  66. bool "Using uart8"
  67. select RT_USING_SERIAL
  68. default n
  69. endmenu
  70. menu "Select spi bus and dev drivers"
  71. choice
  72. prompt "SPI bus clock source"
  73. default LPSPI_CLK_SOURCE_FROM_PLL3PFD1
  74. config LPSPI_CLK_SOURCE_FROM_PLL3PFD1
  75. bool "PLL3PFD1"
  76. config LPSPI_CLK_SOURCE_FROM_PLL3PFD0
  77. bool "PLL3PFD0"
  78. config LPSPI_CLK_SOURCE_FROM_PLL2
  79. bool "PLL2"
  80. config LPSPI_CLK_SOURCE_FROM_PLL2PFD2
  81. bool "PLL2PFD2"
  82. endchoice
  83. config LPSPI_CLK_SOURCE
  84. int
  85. default 0 if LPSPI_CLK_SOURCE_FROM_PLL3PFD1
  86. default 1 if LPSPI_CLK_SOURCE_FROM_PLL3PFD0
  87. default 2 if LPSPI_CLK_SOURCE_FROM_PLL2
  88. default 3 if LPSPI_CLK_SOURCE_FROM_PLL2PFD2
  89. config LPSPI_CLK_SOURCE_DIVIDER
  90. int "SPI bus clock source divider"
  91. range 1 8
  92. default 8
  93. config RT_USING_SPIBUS1
  94. bool "Using spi1 bus"
  95. select RT_USING_SPI
  96. default n
  97. choice
  98. prompt "spi1 bus sck io choice"
  99. default LPSPI1_SCK_GPIO_1
  100. depends on RT_USING_SPIBUS1
  101. config LPSPI1_SCK_GPIO_1
  102. bool "GPIO_AD_B0_10"
  103. config LPSPI1_SCK_GPIO_2
  104. bool "GPIO_SD_B0_02"
  105. endchoice
  106. choice
  107. prompt "spi1 bus sdo io choice"
  108. default LPSPI1_SDO_GPIO_1
  109. depends on RT_USING_SPIBUS1
  110. config LPSPI1_SDO_GPIO_1
  111. bool "GPIO_AD_B0_12"
  112. config LPSPI1_SDO_GPIO_2
  113. bool "GPIO_SD_B0_04"
  114. endchoice
  115. choice
  116. prompt "spi1 bus sdi io choice"
  117. default LPSPI1_SDI_GPIO_1
  118. depends on RT_USING_SPIBUS1
  119. config LPSPI1_SDI_GPIO_1
  120. bool "GPIO_AD_B0_13"
  121. config LPSPI1_SDI_GPIO_2
  122. bool "GPIO_SD_B0_05"
  123. endchoice
  124. config RT_USING_SPIBUS2
  125. bool "Using spi2 bus"
  126. select RT_USING_SPI
  127. default n
  128. choice
  129. prompt "spi2 bus sck io choice"
  130. default LPSPI2_SCK_GPIO_1
  131. depends on RT_USING_SPIBUS2
  132. config LPSPI2_SCK_GPIO_1
  133. bool "GPIO_SD_B1_07"
  134. config LPSPI2_SCK_GPIO_2
  135. bool "GPIO_EMC_00"
  136. endchoice
  137. choice
  138. prompt "spi2 bus sdo io choice"
  139. default LPSPI2_SDO_GPIO_1
  140. depends on RT_USING_SPIBUS2
  141. config LPSPI2_SDO_GPIO_1
  142. bool "GPIO_SD_B1_08"
  143. config LPSPI2_SDO_GPIO_2
  144. bool "GPIO_EMC_02"
  145. endchoice
  146. choice
  147. prompt "spi2 bus sdi io choice"
  148. default LPSPI2_SDI_GPIO_1
  149. depends on RT_USING_SPIBUS2
  150. config LPSPI2_SDI_GPIO_1
  151. bool "GPIO_SD_B1_09"
  152. config LPSPI2_SDI_GPIO_2
  153. bool "GPIO_EMC_03"
  154. endchoice
  155. config RT_USING_SPIBUS3
  156. bool "Using spi3 bus"
  157. select RT_USING_SPI
  158. default n
  159. choice
  160. prompt "spi3 bus sck io choice"
  161. default LPSPI3_SCK_GPIO_1
  162. depends on RT_USING_SPIBUS3
  163. config LPSPI3_SCK_GPIO_1
  164. bool "GPIO_AD_B1_12"
  165. endchoice
  166. choice
  167. prompt "spi3 bus sdo io choice"
  168. default LPSPI3_SDO_GPIO_1
  169. depends on RT_USING_SPIBUS3
  170. config LPSPI3_SDO_GPIO_1
  171. bool "GPIO_AD_B1_14"
  172. endchoice
  173. choice
  174. prompt "spi3 bus sdi io choice"
  175. default LPSPI3_SDI_GPIO_1
  176. depends on RT_USING_SPIBUS3
  177. config LPSPI3_SDI_GPIO_1
  178. bool "GPIO_AD_B1_15"
  179. endchoice
  180. config RT_USING_SPIBUS4
  181. bool "Using spi4 bus"
  182. select RT_USING_SPI
  183. default y
  184. choice
  185. prompt "spi4 bus sck io choice"
  186. default LPSPI4_SCK_GPIO_1
  187. depends on RT_USING_SPIBUS4
  188. config LPSPI4_SCK_GPIO_1
  189. bool "GPIO_AD_B1_02"
  190. config LPSPI4_SCK_GPIO_2
  191. bool "GPIO_EMC_32"
  192. endchoice
  193. choice
  194. prompt "spi4 bus sdo io choice"
  195. default LPSPI4_SDO_GPIO_1
  196. depends on RT_USING_SPIBUS4
  197. config LPSPI4_SDO_GPIO_1
  198. bool "GPIO_AD_B1_04"
  199. config LPSPI4_SDO_GPIO_2
  200. bool "GPIO_EMC_34"
  201. endchoice
  202. choice
  203. prompt "spi4 bus sdi io choice"
  204. default LPSPI4_SDI_GPIO_1
  205. depends on RT_USING_SPIBUS4
  206. config LPSPI4_SDI_GPIO_1
  207. bool "GPIO_AD_B1_B5"
  208. config LPSPI4_SDI_GPIO_2
  209. bool "GPIO_EMC_35"
  210. endchoice
  211. config RT_USING_SPI_FLASH
  212. bool "Using spi flash with sfud"
  213. default n
  214. select RT_USING_SPI
  215. select RT_USING_SFUD
  216. select RT_USING_PIN
  217. choice
  218. prompt "SPI flash using spibus"
  219. default SPI_FLASH_USING_SPIBUS4
  220. depends on RT_USING_SPI_FLASH
  221. config SPI_FLASH_USING_SPIBUS1
  222. bool "spi1"
  223. select RT_USING_SPIBUS1
  224. config SPI_FLASH_USING_SPIBUS2
  225. bool "spi2"
  226. select RT_USING_SPIBUS2
  227. config SPI_FLASH_USING_SPIBUS3
  228. bool "spi3"
  229. select RT_USING_SPIBUS3
  230. config SPI_FLASH_USING_SPIBUS4
  231. bool "spi4"
  232. select RT_USING_SPIBUS4
  233. endchoice
  234. config SPI_FLASH_USING_SPIBUS_NAME
  235. string
  236. default "spi1" if SPI_FLASH_USING_SPIBUS1
  237. default "spi2" if SPI_FLASH_USING_SPIBUS2
  238. default "spi3" if SPI_FLASH_USING_SPIBUS3
  239. default "spi4" if SPI_FLASH_USING_SPIBUS4
  240. config SPI_FLASH_NAME
  241. string "SPI flash device name"
  242. default "flash0"
  243. depends on RT_USING_SPI_FLASH
  244. config SPI_FLASH_USING_CS_PIN
  245. int "SPI flash cs pin index"
  246. default 79
  247. range 1 127
  248. depends on RT_USING_SPI_FLASH
  249. endmenu
  250. menu "Select iic bus drivers"
  251. config RT_USING_HW_I2C1
  252. bool "using hardware i2c1"
  253. select RT_USING_I2C
  254. default y
  255. choice
  256. prompt "i2c1 bus badurate choice"
  257. default HW_I2C1_BADURATE_100kHZ
  258. depends on RT_USING_HW_I2C1
  259. config HW_I2C1_BADURATE_100kHZ
  260. bool "100kHZ"
  261. config HW_I2C1_BADURATE_400kHZ
  262. bool "400kHZ"
  263. endchoice
  264. if !BOARD_RT1050_SeeedStudio
  265. config RT_USING_HW_I2C2
  266. bool "using hardware i2c2"
  267. select RT_USING_I2C
  268. default n
  269. choice
  270. prompt "i2c2 bus badurate choice"
  271. default HW_I2C2_BADURATE_100kHZ
  272. depends on RT_USING_HW_I2C2
  273. config HW_I2C2_BADURATE_100kHZ
  274. bool "100kHZ"
  275. config HW_I2C2_BADURATE_400kHZ
  276. bool "400kHZ"
  277. endchoice
  278. endif
  279. config RT_USING_HW_I2C3
  280. bool "using hardware i2c3"
  281. select RT_USING_I2C
  282. default n
  283. choice
  284. prompt "i2c3 bus badurate choice"
  285. default HW_I2C3_BADURATE_100kHZ
  286. depends on RT_USING_HW_I2C3
  287. config HW_I2C3_BADURATE_100kHZ
  288. bool "100kHZ"
  289. config HW_I2C3_BADURATE_400kHZ
  290. bool "400kHZ"
  291. endchoice
  292. config RT_USING_HW_I2C4
  293. bool "using hardware i2c4"
  294. select RT_USING_I2C
  295. default n
  296. choice
  297. prompt "i2c4 bus badurate choice"
  298. default HW_I2C4_BADURATE_100kHZ
  299. depends on RT_USING_HW_I2C4
  300. config HW_I2C4_BADURATE_100kHZ
  301. bool "100kHZ"
  302. config HW_I2C4_BADURATE_400kHZ
  303. bool "400kHZ"
  304. endchoice
  305. endmenu
  306. #menu "Select SDRAM driver"
  307. config RT_USING_SDRAM
  308. bool "Using sdram"
  309. default y
  310. #endmenu
  311. #menu "Select RTC driver"
  312. config RT_USING_RTC_HP
  313. bool "Using hp rtc"
  314. select RT_USING_RTC
  315. select RT_USING_LIBC
  316. default n
  317. #endmenu
  318. if RT_USING_USB_DEVICE
  319. choice
  320. prompt "select usb device controller"
  321. default RT_USING_EHCI0_AS_DEVICE
  322. config RT_USING_EHCI0_AS_DEVICE
  323. bool "set EHCI0 as device"
  324. endchoice
  325. endif
  326. endmenu