Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. # MIT License
  2. # Copyright (c) 2025 Evlers
  3. # Permission is hereby granted, free of charge, to any person obtaining a copy
  4. # of this software and associated documentation files (the "Software"), to deal
  5. # in the Software without restriction, including without limitation the rights
  6. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. # copies of the Software, and to permit persons to whom the Software is
  8. # furnished to do so, subject to the following conditions:
  9. # The above copyright notice and this permission notice shall be included in all
  10. # copies or substantial portions of the Software.
  11. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. # SOFTWARE.
  18. menuconfig RT_USING_WIFI_HOST_DRIVER
  19. bool "Using Wifi-Host-Driver(WHD)"
  20. select RT_USING_WIFI
  21. select RT_USING_SAL
  22. select RT_USING_SDIO
  23. select BSP_USING_SDIO
  24. default n
  25. if RT_USING_WIFI_HOST_DRIVER
  26. menu "WHD Configuration"
  27. menuconfig WHD_SET_COUNTRY_FROM_HOST
  28. bool "Set country code from host"
  29. default y
  30. if WHD_SET_COUNTRY_FROM_HOST
  31. config WHD_COUNTRY_CODE
  32. string "Set the default country code"
  33. default "AU"
  34. config WHD_COUNTRY_CODE_REVISION
  35. int "Set the default country code revision"
  36. range 0 65535
  37. default 0
  38. endif # WHD_SET_COUNTRY_FROM_HOST
  39. config CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE
  40. bool "Default enable powersave mode"
  41. default n
  42. if CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE
  43. config CY_WIFI_DEFAULT_PM2_SLEEP_RET_TIME
  44. int "Set return to sleep delay.(PM2)"
  45. default 200
  46. endif # CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE
  47. menuconfig CY_WIFI_USING_THREAD_INIT
  48. bool "Using thread initialization"
  49. default n
  50. if CY_WIFI_USING_THREAD_INIT
  51. config CY_WIFI_INIT_THREAD_PRIORITY
  52. int "The priority level value of init thread"
  53. range 0 32
  54. default 10
  55. config CY_WIFI_INIT_THREAD_STACK_SIZE
  56. int "The stack size for init thread"
  57. range 0 8192
  58. default 2048
  59. endif # CY_WIFI_USING_THREAD_INIT
  60. menu "WHD Thread Configuration"
  61. config CY_WIFI_WHD_THREAD_PRIORITY
  62. int "The priority level value of WHD thread"
  63. range 0 32
  64. default 8
  65. config CY_WIFI_WHD_THREAD_STACK_SIZE
  66. int "The stack size for WHD thread"
  67. range 0 8192
  68. default 5120
  69. endmenu # WHD Thread Configuration
  70. menu "WHD Resources Configuration"
  71. choice
  72. prompt "Select the external storage type for WHD resources"
  73. default WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL
  74. config WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS
  75. bool "File System"
  76. select RT_USING_POSIX_FS
  77. config WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL
  78. bool "Flash Abstraction Layer(FAL)"
  79. select RT_USING_FAL
  80. endchoice
  81. if WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS
  82. config WHD_RESOURCES_FIRMWARE_PATH_NAME
  83. string "Set the file path of the firmware files"
  84. default "/sdcard/whd/43438A1.bin"
  85. config WHD_RESOURCES_CLM_PATH_NAME
  86. string "Set the file path of the clm files"
  87. default "/sdcard/whd/43438A1.clm_blob"
  88. config WHD_RESOURCES_NVRAM_PATH_NAME
  89. string "Set the file path of the nvram files"
  90. default "/sdcard/whd/nvram.txt"
  91. endif # WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS
  92. if WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL
  93. config WHD_RESOURCES_FIRMWARE_PART_NAME
  94. string "Set the partition name of the firmware files"
  95. default "whd_firmware"
  96. config WHD_RESOURCES_CLM_PART_NAME
  97. string "Set the partition name of the clm files"
  98. default "whd_clm"
  99. config WHD_RESOURCES_NVRAM_PART_NAME
  100. string "Set the partition name of the nvram files"
  101. default "whd_nvram"
  102. endif # WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL
  103. config WHD_RESOURCES_BLOCK_SIZE
  104. int "Set the block size for resources"
  105. default 1024
  106. endmenu # WHD Resources Configuration
  107. endmenu # WHD Configuration
  108. menu "Hardware Configuration"
  109. choice
  110. prompt "Select Chips"
  111. default WHD_USING_CHIP_CYW43438
  112. config WHD_USING_CHIP_CYW43438
  113. bool "CYW43438"
  114. select WHD_USING_WIFI5
  115. config WHD_USING_CHIP_CYW4373
  116. bool "CYW4373"
  117. select WHD_USING_WIFI5
  118. config WHD_USING_CHIP_CYW43012
  119. bool "CYW43012"
  120. select WHD_USING_WIFI5
  121. config WHD_USING_CHIP_CYW43439
  122. bool "CYW43439"
  123. select WHD_USING_WIFI5
  124. config WHD_USING_CHIP_CYW43022
  125. bool "CYW43022"
  126. select WHD_USING_WIFI5
  127. config WHD_USING_CHIP_CYW4343W
  128. bool "CYW4343W"
  129. select WHD_USING_WIFI5
  130. config WHD_USING_CHIP_CYW55500
  131. bool "CYW55500"
  132. select WHD_USING_WIFI6
  133. # config WHD_USING_CHIP_CYW55900
  134. # bool "CYW55900"
  135. # select WHD_USING_WIFI6
  136. config WHD_USING_CHIP_CYW55572
  137. bool "CYW55572"
  138. select WHD_USING_WIFI6
  139. endchoice
  140. config WHD_USING_WIFI5
  141. bool
  142. config WHD_USING_WIFI6
  143. bool
  144. menu "Pin Configuration"
  145. choice
  146. prompt "Select the pin name or number"
  147. default CYBSP_USING_PIN_NUMBER
  148. help
  149. Select the pin configuration method for the WiFi_REG ON and HOST_WAKE_IRQ pins.
  150. You can choose to specify the pins by their names or by their numbers.
  151. config CYBSP_USING_PIN_NAME
  152. bool "Name"
  153. config CYBSP_USING_PIN_NUMBER
  154. bool "Number"
  155. endchoice
  156. if CYBSP_USING_PIN_NAME
  157. config CYBSP_REG_ON_PIN_NAME
  158. string "Set the WiFi_REG ON pin name"
  159. default "PA.0"
  160. config CYBSP_HOST_WAKE_IRQ_PIN_NAME
  161. string "Set the HOST_WAKE_IRQ pin name"
  162. default "PA.1"
  163. endif # CYBSP_USING_PIN_NAME
  164. if CYBSP_USING_PIN_NUMBER
  165. config CYBSP_REG_ON_PIN
  166. int "Set the WiFi_REG ON pin number"
  167. default -1
  168. config CYBSP_HOST_WAKE_IRQ_PIN
  169. int "Set the HOST_WAKE_IRQ pin number"
  170. default -1
  171. endif # CYBSP_USING_PIN_NUMBER
  172. choice
  173. prompt "Select HOST_WAKE_IRQ event type"
  174. default CYBSP_HOST_WAKE_IRQ_EVENT_FALL
  175. config CYBSP_HOST_WAKE_IRQ_EVENT_FALL
  176. bool "falling"
  177. config CYBSP_HOST_WAKE_IRQ_EVENT_RISE
  178. bool "rising"
  179. config CYBSP_HOST_WAKE_IRQ_EVENT_BOTH
  180. bool "rising and falling"
  181. endchoice
  182. config CYBSP_OOB_INTR_PRIORITY
  183. int "Set the interrput priority for HOST_WAKE_IRQ pin"
  184. default 2
  185. endmenu # Pin Configuration
  186. endmenu # Hardware Configuration
  187. menu "Porting options"
  188. config WHD_PORTING_BSP
  189. bool "Using BSP porting"
  190. default y
  191. help
  192. WHD_PORTING_BSP enables the Board Support Package (BSP) porting layer for the WiFi Host Driver (WHD).
  193. This option allows users to customize board-level configurations and functions.
  194. When the host uses Infineon's BSP, this option must be deselected to ensure compatibility with the host's BSP library.
  195. config WHD_PORTING_HAL
  196. bool "Using HAL porting"
  197. default y
  198. help
  199. WHD_PORTING_HAL enables the Hardware Abstraction Layer (HAL) porting layer for the WiFi Host Driver (WHD).
  200. This option allows WHD to interface with the underlying hardware through a standardized HAL,
  201. facilitating easier integration and portability across different hardware platforms.
  202. config WHD_PORTING_RTOS
  203. bool "Using RTOS porting"
  204. default y
  205. help
  206. WHD_PORTING_RTOS enables the Real-Time Operating System (RTOS) porting layer for the WiFi Host Driver (WHD).
  207. This option allows WHD to utilize RTOS-specific features such as threading, synchronization, and timing,
  208. ensuring optimal performance and integration within an RTOS environment.
  209. When using Infineon's abstraction-rtos component, this option should be unchecked.
  210. config WHD_USE_CUSTOM_MALLOC_IMPL
  211. depends on WHD_PORTING_RTOS
  212. bool "Using the malloc/free of RT-Thread"
  213. default y
  214. help
  215. WHD_USE_CUSTOM_MALLOC_IMPL enables the use of custom memory allocation functions (malloc/free)
  216. provided by the RT-Thread operating system for the WiFi Host Driver (WHD).
  217. This option ensures that WHD utilizes the RT-Thread's memory management mechanisms,
  218. which can lead to better integration and performance within the RT-Thread environment.
  219. endmenu
  220. choice
  221. prompt "Select the log level"
  222. default WHD_LOG_LEVEL_ERROR
  223. config WHD_LOG_LEVEL_NONE
  224. select WHD_PRINT_DISABLE
  225. bool "None"
  226. config WHD_LOG_LEVEL_ERROR
  227. bool "Error"
  228. config WHD_LOG_LEVEL_INFO
  229. select WPRINT_ENABLE_WHD_INFO
  230. bool "Info"
  231. config WHD_LOG_LEVEL_DEBUG
  232. select WPRINT_ENABLE_WHD_INFO
  233. select WPRINT_ENABLE_WHD_DEBUG
  234. select WPRINT_ENABLE_WHD_ERROR_RETURN
  235. bool "Debug"
  236. config WHD_LOG_LEVEL_DATA_TRACE
  237. select WPRINT_ENABLE_WHD_INFO
  238. select WPRINT_ENABLE_WHD_DEBUG
  239. select WPRINT_ENABLE_WHD_DATA_LOG
  240. bool "Data Trace"
  241. endchoice
  242. # WHD Log Configuration
  243. config WHD_PRINT_DISABLE
  244. bool
  245. config WPRINT_ENABLE_WHD_INFO
  246. bool
  247. config WPRINT_ENABLE_WHD_DEBUG
  248. bool
  249. config WPRINT_ENABLE_WHD_DATA_LOG
  250. bool
  251. config WPRINT_ENABLE_WHD_ERROR_RETURN
  252. bool
  253. endif # RT_USING_WIFI_HOST_DRIVER