diff --git a/iot/wifi-host-driver/Kconfig b/iot/wifi-host-driver/Kconfig index 6ba730cb06..8f384a1a7f 100644 --- a/iot/wifi-host-driver/Kconfig +++ b/iot/wifi-host-driver/Kconfig @@ -6,62 +6,105 @@ menuconfig PKG_USING_WIFI_HOST_DRIVER select RT_USING_SAL select RT_USING_SDIO select BSP_USING_SDIO + select RT_USING_DFS default n if PKG_USING_WIFI_HOST_DRIVER - choice - prompt "Select Chips" - default WHD_USING_CHIP_CYW43438 - - config WHD_USING_CHIP_CYW43438 - bool "CYW43438" - - config WHD_USING_CHIP_CYW4373 - bool "CYW4373" - - config WHD_USING_CHIP_CYW43012 - bool "CYW43012" - - config WHD_USING_CHIP_CYW43439 - bool "CYW43439" - - config WHD_USING_CHIP_CYW43022 - bool "CYW43022" - - config WHD_USING_CHIP_CYW4343W - bool "CYW4343W" - endchoice - - menuconfig WHD_RESOURCES_IN_EXTERNAL_STORAGE - bool "Using resources in external storage" - default n - - if WHD_RESOURCES_IN_EXTERNAL_STORAGE - - if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10100 + menu "WHD Configuration" + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + menuconfig WHD_SET_COUNTRY_FROM_HOST + bool "Set country code from host" + default y + + if WHD_SET_COUNTRY_FROM_HOST + config WHD_COUNTRY_CODE + string "Set the default country code" + default "AU" + + config WHD_COUNTRY_CODE_REVISION + int "Set the default country code revision" + range 0 65535 + default 0 + endif # WHD_SET_COUNTRY_FROM_HOST + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + + config CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE + bool "Default enable powersave mode" + default n + + if CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE + config CY_WIFI_DEFAULT_PM2_SLEEP_RET_TIME + int "Set return to sleep delay.(PM2)" + default 200 + endif # CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE + + menuconfig CY_WIFI_USING_THREAD_INIT + bool "Using thread initialization" + default n + + if CY_WIFI_USING_THREAD_INIT + config CY_WIFI_INIT_THREAD_PRIORITY + int "The priority level value of init thread" + range 0 32 + default 10 + + config CY_WIFI_INIT_THREAD_STACK_SIZE + int "The stack size for init thread" + range 0 8192 + default 2048 + endif # CY_WIFI_USING_THREAD_INIT + + menu "WHD Thread Configuration" + config CY_WIFI_WHD_THREAD_PRIORITY + int "The priority level value of WHD thread" + range 0 32 + default 8 + + config CY_WIFI_WHD_THREAD_STACK_SIZE + int "The stack size for WHD thread" + range 0 8192 + default 5120 + endmenu # WHD Thread Configuration + + menu "WHD Resources Configuration" + + if PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 + config WHD_RESOURCES_IN_EXTERNAL_STORAGE + bool "Using resources in external storage" + default y + endif # PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 || WHD_RESOURCES_IN_EXTERNAL_STORAGE choice - prompt "Select external storage type" + prompt "Select the external storage type for WHD resources" default WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL config WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS - bool "posix file system" + bool "File System" select RT_USING_POSIX_FS config WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL - bool "flash abstraction layer(FAL)" + bool "Flash Abstraction Layer(FAL)" select RT_USING_FAL endchoice if WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS config WHD_RESOURCES_FIRMWARE_PATH_NAME string "Set the file path of the firmware files" - default "/sdcard/43438A1.bin" + default "/sdcard/whd/43438A1.bin" config WHD_RESOURCES_CLM_PATH_NAME string "Set the file path of the clm files" - default "/sdcard/43438A1.clm_blob" - endif + default "/sdcard/whd/43438A1.clm_blob" + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + config WHD_RESOURCES_NVRAM_PATH_NAME + string "Set the file path of the nvram files" + default "/sdcard/whd/nvram.txt" + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + endif # WHD_RESOURCES_IN_EXTERNAL_STORAGE_FS if WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL config WHD_RESOURCES_FIRMWARE_PART_NAME @@ -71,114 +114,239 @@ menuconfig PKG_USING_WIFI_HOST_DRIVER config WHD_RESOURCES_CLM_PART_NAME string "Set the partition name of the clm files" default "whd_clm" - endif - endif - - if PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10100 - config WHD_RESOURCES_FIRMWARE_NAME - string "Set the partition name of the firmware files" - default "whd_firmware" - config WHD_RESOURCES_CLM_NAME - string "Set the partition name of the clm files" - default "whd_clm" - endif + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + config WHD_RESOURCES_NVRAM_PART_NAME + string "Set the partition name of the nvram files" + default "whd_nvram" + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + endif # WHD_RESOURCES_IN_EXTERNAL_STORAGE_FAL + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 || WHD_RESOURCES_IN_EXTERNAL_STORAGE config WHD_RESOURCES_BLOCK_SIZE int "Set the block size for resources" default 1024 - endif - - config WHD_RESOURCES_CUSTOM_NVRAM - bool "Using custom nvram files" - default n - - config CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE - bool "Default enable powersave mode" - default n - - if CY_WIFI_DEFAULT_ENABLE_POWERSAVE_MODE - config CY_WIFI_DEFAULT_PM2_SLEEP_RET_TIME - int "Set return to sleep delay.(PM2)" - default 200 - endif + if PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 + config WHD_RESOURCES_CUSTOM_NVRAM + bool "Using custom nvram files" + default n + endif # PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 - config CY_WIFI_WHD_THREAD_PRIORITY - int "The priority level value of WHD thread" - range 0 32 - default 8 + endmenu # WHD Resources Configuration - config CY_WIFI_WHD_THREAD_STACK_SIZE - int "The stack size for WHD thread" - range 0 8192 - default 5120 + endmenu # WHD Configuration - choice - prompt "Select the pin name or number" - default CYBSP_USING_PIN_NUMBER + menu "Hardware Configuration" + choice + prompt "Select Chips" + default WHD_USING_CHIP_CYW43438 + + config WHD_USING_CHIP_CYW43438 + bool "CYW43438" + select WHD_USING_WIFI5 + + config WHD_USING_CHIP_CYW4373 + bool "CYW4373" + select WHD_USING_WIFI5 + + config WHD_USING_CHIP_CYW43012 + bool "CYW43012" + select WHD_USING_WIFI5 + + config WHD_USING_CHIP_CYW43439 + bool "CYW43439" + select WHD_USING_WIFI5 + + config WHD_USING_CHIP_CYW43022 + bool "CYW43022" + select WHD_USING_WIFI5 + + config WHD_USING_CHIP_CYW4343W + bool "CYW4343W" + select WHD_USING_WIFI5 + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + config WHD_USING_CHIP_CYW55500 + bool "CYW55500" + select WHD_USING_WIFI6 + + # config WHD_USING_CHIP_CYW55900 + # bool "CYW55900" + # select WHD_USING_WIFI6 + + config WHD_USING_CHIP_CYW55572 + bool "CYW55572" + select WHD_USING_WIFI6 + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + endchoice - config CYBSP_USING_PIN_NAME - bool "Name" + config WHD_USING_WIFI5 + bool + + config WHD_USING_WIFI6 + bool + + menu "Pin Configuration" + + choice + prompt "Select the pin name or number" + default CYBSP_USING_PIN_NUMBER + help + Select the pin configuration method for the WiFi_REG ON and HOST_WAKE_IRQ pins. + You can choose to specify the pins by their names or by their numbers. + + config CYBSP_USING_PIN_NAME + bool "Name" + + config CYBSP_USING_PIN_NUMBER + bool "Number" + endchoice + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + config CYBSP_USING_OOB_INTR + bool "Using out-of-band interrupt(HOST_WAKE_IRQ)" + default y + help + Enable this option to use the out-of-band interrupt (OOB_INTR) feature for the HOST_WAKE_IRQ pin. + This allows the WiFi host driver to receive interrupt signals from the WiFi module, + facilitating efficient communication and event handling. + When using the SDIO card interrupt, there is no need to enable this option. + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + + if PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 + config CYBSP_USING_OOB_INTR + bool + default y + endif # PKG_WIFI_HOST_DRIVER_VER_NUM < 0x10301 + + if CYBSP_USING_PIN_NAME + config CYBSP_REG_ON_PIN_NAME + string "Set the WiFi_REG ON pin name" + default "PA.0" + + config CYBSP_HOST_WAKE_IRQ_PIN_NAME + string "Set the HOST_WAKE_IRQ pin name" + depends on CYBSP_USING_OOB_INTR + default "PA.1" + endif # CYBSP_USING_PIN_NAME + + if CYBSP_USING_PIN_NUMBER + config CYBSP_REG_ON_PIN + int "Set the WiFi_REG ON pin number" + default -1 + + config CYBSP_HOST_WAKE_IRQ_PIN + int "Set the HOST_WAKE_IRQ pin number" + depends on CYBSP_USING_OOB_INTR + default -1 + endif # CYBSP_USING_PIN_NUMBER + + if CYBSP_USING_OOB_INTR + choice + prompt "Select HOST_WAKE_IRQ event type" + default CYBSP_HOST_WAKE_IRQ_EVENT_FALL - config CYBSP_USING_PIN_NUMBER - bool "Number" - endchoice + config CYBSP_HOST_WAKE_IRQ_EVENT_FALL + bool "falling" - if CYBSP_USING_PIN_NAME - config CYBSP_REG_ON_PIN_NAME - string "Set the WiFi_REG ON pin name" - default "PA.0" + config CYBSP_HOST_WAKE_IRQ_EVENT_RISE + bool "rising" + endchoice - config CYBSP_HOST_WAKE_IRQ_PIN_NAME - string "Set the HOST_WAKE_IRQ pin name" - default "PA.1" - endif + config CYBSP_OOB_INTR_PRIORITY + int "Set the interrupt priority for HOST_WAKE_IRQ pin" + default 2 + endif # CYBSP_USING_OOB_INTR + endmenu # Pin Configuration + endmenu # Hardware Configuration + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + menu "Porting options" + config WHD_PORTING_BSP + bool "Using BSP porting" + default y + help + WHD_PORTING_BSP enables the Board Support Package (BSP) porting layer for the WiFi Host Driver (WHD). + This option allows users to customize board-level configurations and functions. + When the host uses Infineon's BSP, this option must be deselected to ensure compatibility with the host's BSP library. + + config WHD_PORTING_HAL + bool "Using HAL porting" + default y + help + WHD_PORTING_HAL enables the Hardware Abstraction Layer (HAL) porting layer for the WiFi Host Driver (WHD). + This option allows WHD to interface with the underlying hardware through a standardized HAL, + facilitating easier integration and portability across different hardware platforms. + + config WHD_PORTING_RTOS + bool "Using RTOS porting" + default y + help + WHD_PORTING_RTOS enables the Real-Time Operating System (RTOS) porting layer for the WiFi Host Driver (WHD). + This option allows WHD to utilize RTOS-specific features such as threading, synchronization, and timing, + ensuring optimal performance and integration within an RTOS environment. + When using Infineon's abstraction-rtos component, this option should be unchecked. + + config WHD_USE_CUSTOM_MALLOC_IMPL + depends on WHD_PORTING_RTOS + bool "Using the malloc/free of RT-Thread" + default y + help + WHD_USE_CUSTOM_MALLOC_IMPL enables the use of custom memory allocation functions (malloc/free) + provided by the RT-Thread operating system for the WiFi Host Driver (WHD). + This option ensures that WHD utilizes the RT-Thread's memory management mechanisms, + which can lead to better integration and performance within the RT-Thread environment. + endmenu + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + + if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 + choice + prompt "Select the log level" + default WHD_LOG_LEVEL_ERROR - if CYBSP_USING_PIN_NUMBER - config CYBSP_REG_ON_PIN - int "Set the WiFi_REG ON pin number" - default -1 + config WHD_LOG_LEVEL_NONE + select WHD_PRINT_DISABLE + bool "None" - config CYBSP_HOST_WAKE_IRQ_PIN - int "Set the HOST_WAKE_IRQ pin number" - default -1 - endif + config WHD_LOG_LEVEL_ERROR + bool "Error" - choice - prompt "Select HOST_WAKE_IRQ event type" - default CYBSP_HOST_WAKE_IRQ_EVENT_FALL + config WHD_LOG_LEVEL_INFO + select WPRINT_ENABLE_WHD_INFO + bool "Info" - config CYBSP_HOST_WAKE_IRQ_EVENT_FALL - bool "falling" + config WHD_LOG_LEVEL_DEBUG + select WPRINT_ENABLE_WHD_INFO + select WPRINT_ENABLE_WHD_DEBUG + select WPRINT_ENABLE_WHD_ERROR_RETURN + bool "Debug" - config CYBSP_HOST_WAKE_IRQ_EVENT_RISE - bool "rising" + config WHD_LOG_LEVEL_DATA_TRACE + select WPRINT_ENABLE_WHD_INFO + select WPRINT_ENABLE_WHD_DEBUG + select WPRINT_ENABLE_WHD_DATA_LOG + bool "Data Trace" + endchoice - config CYBSP_HOST_WAKE_IRQ_EVENT_BOTH - bool "rising and falling" - endchoice + # WHD Log Configuration + config WHD_PRINT_DISABLE + bool - config CYBSP_OOB_INTR_PRIORITY - int "Set the interrput priority for HOST_WAKE_IRQ pin" - default 2 + config WPRINT_ENABLE_WHD_INFO + bool - config CY_WIFI_USING_THREAD_INIT - bool "Using thread initialization" - default n + config WPRINT_ENABLE_WHD_DEBUG + bool - if CY_WIFI_USING_THREAD_INIT - config CY_WIFI_INIT_THREAD_STACK_SIZE - int "The stack size for init thread" - range 0 8192 - default 2048 - endif + config WPRINT_ENABLE_WHD_DATA_LOG + bool - config PKG_WIFI_HOST_DRIVER_PATH - string - default "/packages/iot/wifi-host-driver" + config WPRINT_ENABLE_WHD_ERROR_RETURN + bool + endif # PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10301 - if PKG_WIFI_HOST_DRIVER_VER_NUM >= 0x10200 + if PKG_WIFI_HOST_DRIVER_VER_NUM <= 0x10201 choice prompt "Select the log level" default CY_WIFI_LOG_LEVEL_INFO @@ -200,14 +368,18 @@ menuconfig PKG_USING_WIFI_HOST_DRIVER endchoice endif + config PKG_WIFI_HOST_DRIVER_PATH + string + default "/packages/iot/wifi-host-driver" + choice prompt "Version" default PKG_USING_WIFI_HOST_DRIVER_LATEST_VERSION help Select the package version - config PKG_USING_WIFI_HOST_DRIVER_V100 - bool "v1.0.0" + # config PKG_USING_WIFI_HOST_DRIVER_V100 + # bool "v1.0.0" config PKG_USING_WIFI_HOST_DRIVER_V110 bool "v1.1.0" @@ -218,24 +390,29 @@ menuconfig PKG_USING_WIFI_HOST_DRIVER config PKG_USING_WIFI_HOST_DRIVER_V121 bool "v1.2.1" + config PKG_USING_WIFI_HOST_DRIVER_V131 + bool "v1.3.1" + config PKG_USING_WIFI_HOST_DRIVER_LATEST_VERSION bool "latest" endchoice config PKG_WIFI_HOST_DRIVER_VER string - default "v1.0.0" if PKG_USING_WIFI_HOST_DRIVER_V100 + # default "v1.0.0" if PKG_USING_WIFI_HOST_DRIVER_V100 default "v1.1.0" if PKG_USING_WIFI_HOST_DRIVER_V110 default "v1.2.0" if PKG_USING_WIFI_HOST_DRIVER_V120 default "v1.2.1" if PKG_USING_WIFI_HOST_DRIVER_V121 + default "v1.3.1" if PKG_USING_WIFI_HOST_DRIVER_V131 default "latest" if PKG_USING_WIFI_HOST_DRIVER_LATEST_VERSION config PKG_WIFI_HOST_DRIVER_VER_NUM hex - default 0x10000 if PKG_USING_WIFI_HOST_DRIVER_V100 + # default 0x10000 if PKG_USING_WIFI_HOST_DRIVER_V100 default 0x10100 if PKG_USING_WIFI_HOST_DRIVER_V110 default 0x10200 if PKG_USING_WIFI_HOST_DRIVER_V120 default 0x10201 if PKG_USING_WIFI_HOST_DRIVER_V121 + default 0x10301 if PKG_USING_WIFI_HOST_DRIVER_V131 default 0x99999 if PKG_USING_WIFI_HOST_DRIVER_LATEST_VERSION endif diff --git a/iot/wifi-host-driver/package.json b/iot/wifi-host-driver/package.json index 32216efa67..487de8d061 100644 --- a/iot/wifi-host-driver/package.json +++ b/iot/wifi-host-driver/package.json @@ -24,11 +24,6 @@ "filename": "", "VER_SHA": "master" }, - { - "version": "v1.0.0", - "URL": "https://github.com/Evlers/rt-thread_wifi-host-driver/archive/v1.0.0.zip", - "filename": "rt-thread_wifi-host-driver-1.0.0.zip" - }, { "version": "v1.1.0", "URL": "https://github.com/Evlers/rt-thread_wifi-host-driver/archive/v1.1.0.zip", @@ -43,6 +38,11 @@ "version": "v1.2.1", "URL": "https://github.com/Evlers/rt-thread_wifi-host-driver/archive/v1.2.1.zip", "filename": "rt-thread_wifi-host-driver-1.2.1.zip" + }, + { + "version": "v1.3.1", + "URL": "https://github.com/Evlers/rt-thread_wifi-host-driver/archive/v1.3.1.zip", + "filename": "rt-thread_wifi-host-driver-1.3.1.zip" } ] }