diff --git a/components/esp_phy/Kconfig b/components/esp_phy/Kconfig index 3e5bf77a2f..b94aca1cbe 100644 --- a/components/esp_phy/Kconfig +++ b/components/esp_phy/Kconfig @@ -145,4 +145,13 @@ menu "PHY" default 1 if ESP_PHY_RF_CAL_NONE default 2 if ESP_PHY_RF_CAL_FULL + config ESP_PHY_IMPROVE_RX_11B + bool "Improve Wi-Fi receive 11b pkts" + default n + depends on SOC_PHY_IMPROVE_RX_11B + help + This is a workaround to improve Wi-Fi receive 11b pkts for some modules using AC-DC power supply with + high interference, enable this option will sacrifice Wi-Fi OFDM receive performance. + But to guarantee 11b receive performance serves as a bottom line in this case. + endmenu # PHY diff --git a/components/esp_phy/include/esp_private/phy.h b/components/esp_phy/include/esp_private/phy.h index 60eea4ab44..858847d129 100644 --- a/components/esp_phy/include/esp_private/phy.h +++ b/components/esp_phy/include/esp_private/phy.h @@ -128,6 +128,18 @@ void phy_bbpll_en_usb(bool en); void phy_eco_version_sel(uint8_t chip_ver); #endif +#if CONFIG_ESP_PHY_IMPROVE_RX_11B +/** + * @brief Improve Wi-Fi receive 11b pkts when modules with high interference. + * + * @attention 1.This is a workaround to improve Wi-Fi receive 11b pkts for some modules using AC-DC power supply with high interference. + * @attention 2.Enable this will sacrifice Wi-Fi OFDM receive performance. But to guarantee 11b receive performance serves as a bottom line in this case. + * + * @param enable Enable or disable. + */ +void phy_improve_rx_special(bool enable); +#endif + #ifdef __cplusplus } #endif diff --git a/components/esp_phy/lib b/components/esp_phy/lib index 9491d17bb2..5fc97bc8b2 160000 --- a/components/esp_phy/lib +++ b/components/esp_phy/lib @@ -1 +1 @@ -Subproject commit 9491d17bb2f9711cc83a4cfdafcb0326366fc630 +Subproject commit 5fc97bc8b20fac0a2ca105ca431deeb000afa247 diff --git a/components/esp_phy/src/phy_init.c b/components/esp_phy/src/phy_init.c index 83ff6ab809..0e8fabfc51 100644 --- a/components/esp_phy/src/phy_init.c +++ b/components/esp_phy/src/phy_init.c @@ -264,6 +264,10 @@ void esp_phy_enable(void) #if SOC_PM_MODEM_RETENTION_BY_BACKUPDMA phy_digital_regs_load(); #endif + +#if CONFIG_ESP_PHY_IMPROVE_RX_11B + phy_improve_rx_special(true); +#endif } #if CONFIG_IDF_TARGET_ESP32 @@ -808,6 +812,11 @@ void esp_phy_load_cal_and_init(void) register_chipv7_phy(init_data, cal_data, PHY_RF_CAL_FULL); #endif +#if CONFIG_ESP_PHY_IMPROVE_RX_11B + ESP_LOGW(TAG, "PHY enable improve rx 11b"); + phy_improve_rx_special(true); +#endif + #if CONFIG_ESP_PHY_REDUCE_TX_POWER esp_phy_release_init_data(phy_init_data); free(init_data); diff --git a/components/openthread/lib b/components/openthread/lib index 2e5a3f236f..fed28dde58 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit 2e5a3f236f8cd7c753fd8b8f775e48e8be5f08d6 +Subproject commit fed28dde58d5d4a46d3acc4935a23b43fe82b320 diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index 43650cbc02..f346c9d682 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -658,3 +658,7 @@ config SOC_BLE_DEVICE_PRIVACY_SUPPORTED config SOC_BLUFI_SUPPORTED bool default y + +config SOC_PHY_IMPROVE_RX_11B + bool + default y diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index 071e62bad5..285df0c5c9 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -307,3 +307,6 @@ #define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ #define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */ #define SOC_BLUFI_SUPPORTED (1) /*!< Support BLUFI */ + +/*------------------------------------- PHY CAPS -------------------------------------*/ +#define SOC_PHY_IMPROVE_RX_11B (1)