From 7b9b4480411b3fb18c2c0a31cff73ea82d0068fa Mon Sep 17 00:00:00 2001 From: Jessy Chen Date: Tue, 10 May 2022 04:00:01 -0400 Subject: [PATCH] esp_wifi: optimize wifi kconfig --- components/esp_netif/test_apps/README.md | 6 ++---- components/esp_wifi/Kconfig | 4 ++-- .../soc/esp32/include/soc/Kconfig.soc_caps.in | 12 ++++++++++++ components/soc/esp32/include/soc/soc_caps.h | 5 +++++ .../soc/esp32c2/include/soc/Kconfig.soc_caps.in | 16 ++++++++++++---- components/soc/esp32c2/include/soc/soc_caps.h | 8 +++++--- .../soc/esp32c3/include/soc/Kconfig.soc_caps.in | 16 ++++++++++++---- components/soc/esp32c3/include/soc/soc_caps.h | 8 +++++--- .../soc/esp32s2/include/soc/Kconfig.soc_caps.in | 16 ++++++++++++---- components/soc/esp32s2/include/soc/soc_caps.h | 8 +++++--- .../soc/esp32s3/include/soc/Kconfig.soc_caps.in | 16 ++++++++++++---- components/soc/esp32s3/include/soc/soc_caps.h | 8 +++++--- .../phy/phy_multi_init_data_test/README.md | 6 ++---- .../protocols/mqtt/build_test/README.md | 6 ++---- 14 files changed, 93 insertions(+), 42 deletions(-) diff --git a/components/esp_netif/test_apps/README.md b/components/esp_netif/test_apps/README.md index 3efcd3efae..57433de18a 100644 --- a/components/esp_netif/test_apps/README.md +++ b/components/esp_netif/test_apps/README.md @@ -1,4 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | - -Not support on ESP32-C2 yet, waiting esp_wifi supported. TODO: IDF-3905 +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/components/esp_wifi/Kconfig b/components/esp_wifi/Kconfig index 8362ee2ac4..90ad2b4c14 100644 --- a/components/esp_wifi/Kconfig +++ b/components/esp_wifi/Kconfig @@ -281,7 +281,7 @@ menu "Wi-Fi" config ESP_WIFI_FTM_ENABLE bool "WiFi FTM" default n - depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C2) + depends on SOC_WIFI_FTM_SUPPORT help Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT). @@ -316,7 +316,7 @@ menu "Wi-Fi" config ESP_WIFI_GCMP_SUPPORT bool "WiFi GCMP Support(GCMP128 and GCMP256)" default n - depends on (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3) + depends on SOC_WIFI_GCMP_SUPPORT help Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support. diff --git a/components/soc/esp32/include/soc/Kconfig.soc_caps.in b/components/soc/esp32/include/soc/Kconfig.soc_caps.in index 7340e5b2dd..ff4c037c10 100644 --- a/components/soc/esp32/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32/include/soc/Kconfig.soc_caps.in @@ -654,3 +654,15 @@ config SOC_SDMMC_NUM_SLOTS config SOC_BLE_DONT_UPDATE_OWN_RPA bool default y + +config SOC_WIFI_HW_TSF + bool + default n + +config SOC_WIFI_FTM_SUPPORT + bool + default n + +config SOC_WIFI_GCMP_SUPPORT + bool + default n diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index ae2ecb89be..b67980489e 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -370,3 +370,8 @@ /*------------------------------ BLE --------------------------------------------*/ #define SOC_BLE_DONT_UPDATE_OWN_RPA (1) + +/*-------------------------- WI-FI HARDWARE CAPS -------------------------------*/ +#define SOC_WIFI_HW_TSF (0) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (0) /*!< FTM Support */ +#define SOC_WIFI_GCMP_SUPPORT (0) /*!< GCMP Support(GCMP128 and GCMP256) */ diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index 2db8618cc7..ef61f89c88 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -499,10 +499,6 @@ config SOC_UART_SUPPORT_FSM_TX_WAIT_SEND bool default y -config SOC_WIFI_HW_TSF - bool - default y - config SOC_COEX_HW_PTI bool default y @@ -538,3 +534,15 @@ config SOC_PM_SUPPORT_WIFI_PD config SOC_PM_SUPPORT_BT_PD bool default n + +config SOC_WIFI_HW_TSF + bool + default y + +config SOC_WIFI_FTM_SUPPORT + bool + default y + +config SOC_WIFI_GCMP_SUPPORT + bool + default n diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index 7fddf89b06..f9daef65d5 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -251,9 +251,6 @@ // UART has an extra TX_WAIT_SEND state when the FIFO is not empty and XOFF is enabled #define SOC_UART_SUPPORT_FSM_TX_WAIT_SEND (1) -/*-------------------------- WI-FI HARDWARE TSF CAPS -------------------------------*/ -#define SOC_WIFI_HW_TSF (1) - /*-------------------------- COEXISTENCE HARDWARE PTI CAPS -------------------------------*/ #define SOC_COEX_HW_PTI (1) @@ -274,3 +271,8 @@ #define SOC_PM_SUPPORT_WIFI_PD (0) #define SOC_PM_SUPPORT_BT_PD (0) + +/*------------------------------------ WI-FI CAPS ------------------------------------*/ +#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (1) /*!< FTM Support */ +#define SOC_WIFI_GCMP_SUPPORT (0) /*!< GCMP Support(GCMP128 and GCMP256) */ diff --git a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in index e234e9f6dd..5f03225a3d 100644 --- a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in @@ -699,10 +699,6 @@ config SOC_UART_SUPPORT_FSM_TX_WAIT_SEND bool default y -config SOC_WIFI_HW_TSF - bool - default y - config SOC_COEX_HW_PTI bool default y @@ -746,3 +742,15 @@ config SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC config SOC_TEMPERATURE_SENSOR_SUPPORT_XTAL bool default y + +config SOC_WIFI_HW_TSF + bool + default y + +config SOC_WIFI_FTM_SUPPORT + bool + default y + +config SOC_WIFI_GCMP_SUPPORT + bool + default y diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index 5f29f7e4b0..e57c61cdd9 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -329,9 +329,6 @@ // UART has an extra TX_WAIT_SEND state when the FIFO is not empty and XOFF is enabled #define SOC_UART_SUPPORT_FSM_TX_WAIT_SEND (1) -/*-------------------------- WI-FI HARDWARE TSF CAPS -------------------------------*/ -#define SOC_WIFI_HW_TSF (1) - /*-------------------------- COEXISTENCE HARDWARE PTI CAPS -------------------------------*/ #define SOC_COEX_HW_PTI (1) @@ -356,3 +353,8 @@ /*-------------------------- Temperature Sensor CAPS -------------------------------------*/ #define SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC (1) #define SOC_TEMPERATURE_SENSOR_SUPPORT_XTAL (1) + +/*------------------------------------ WI-FI CAPS ------------------------------------*/ +#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (1) /*!< FTM Support */ +#define SOC_WIFI_GCMP_SUPPORT (1) /*!< GCMP Support(GCMP128 and GCMP256) */ diff --git a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in index 63c44b589f..984ddd72a9 100644 --- a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in @@ -783,10 +783,6 @@ config SOC_AES_SUPPORT_AES_256 bool default y -config SOC_WIFI_HW_TSF - bool - default y - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 @@ -834,3 +830,15 @@ config SOC_COEX_HW_PTI config SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC bool default y + +config SOC_WIFI_HW_TSF + bool + default y + +config SOC_WIFI_FTM_SUPPORT + bool + default y + +config SOC_WIFI_GCMP_SUPPORT + bool + default n diff --git a/components/soc/esp32s2/include/soc/soc_caps.h b/components/soc/esp32s2/include/soc/soc_caps.h index a56d50a693..694857de18 100644 --- a/components/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/esp32s2/include/soc/soc_caps.h @@ -359,9 +359,6 @@ #define SOC_AES_SUPPORT_AES_192 (1) #define SOC_AES_SUPPORT_AES_256 (1) -/*-------------------------- WI-FI HARDWARE TSF CAPS -------------------------------*/ -#define SOC_WIFI_HW_TSF (1) - /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) @@ -390,3 +387,8 @@ /*-------------------------- Temperature Sensor CAPS -------------------------------------*/ #define SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC (1) + +/*------------------------------------ WI-FI CAPS ------------------------------------*/ +#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (1) /*!< FTM Support */ +#define SOC_WIFI_GCMP_SUPPORT (0) /*!< GCMP Support(GCMP128 and GCMP256) */ diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index 7ab39fabc4..d09ff1fb9c 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -907,10 +907,6 @@ config SOC_FLASH_ENCRYPTION_XTS_AES_256 bool default y -config SOC_WIFI_HW_TSF - bool - default y - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 @@ -967,6 +963,18 @@ config SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC bool default y +config SOC_WIFI_HW_TSF + bool + default y + +config SOC_WIFI_FTM_SUPPORT + bool + default y + +config SOC_WIFI_GCMP_SUPPORT + bool + default y + config SOC_TWAI_BRP_MIN int default 2 diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index ec2838ac4a..00106aa897 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -386,9 +386,6 @@ #define SOC_FLASH_ENCRYPTION_XTS_AES_128 1 #define SOC_FLASH_ENCRYPTION_XTS_AES_256 1 -/*-------------------------- WI-FI HARDWARE TSF CAPS -------------------------------*/ -#define SOC_WIFI_HW_TSF (1) - /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) #define SOC_MAC_BB_PD_MEM_SIZE (192*4) @@ -419,3 +416,8 @@ /*-------------------------- Temperature Sensor CAPS -------------------------------------*/ #define SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC (1) + +/*------------------------------------ WI-FI CAPS ------------------------------------*/ +#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (1) /*!< FTM Support */ +#define SOC_WIFI_GCMP_SUPPORT (1) /*!< GCMP Support(GCMP128 and GCMP256) */ diff --git a/tools/test_apps/phy/phy_multi_init_data_test/README.md b/tools/test_apps/phy/phy_multi_init_data_test/README.md index 3efcd3efae..57433de18a 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/README.md +++ b/tools/test_apps/phy/phy_multi_init_data_test/README.md @@ -1,4 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | - -Not support on ESP32-C2 yet, waiting esp_wifi supported. TODO: IDF-3905 +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/tools/test_apps/protocols/mqtt/build_test/README.md b/tools/test_apps/protocols/mqtt/build_test/README.md index f698cdff43..0f6c3a99bd 100644 --- a/tools/test_apps/protocols/mqtt/build_test/README.md +++ b/tools/test_apps/protocols/mqtt/build_test/README.md @@ -1,7 +1,5 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | - -Not support on ESP32-C2 yet, waiting esp_wifi supported. TODO: IDF-3905 +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | # Build only test for C++