From f3d2dd2b6cc2b71b91804de750a1fb74ee39d8b0 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Fri, 13 May 2022 13:06:45 -0300 Subject: [PATCH] soc: esp32: move phy tx power to soc config PHY TX power configuration must be added into soc level. It was previously hardcoded in hal_espressif, which was removed. Signed-off-by: Sylvio Alves --- drivers/wifi/esp32/Kconfig.esp32 | 12 ------------ soc/riscv/esp32c3/Kconfig.soc | 12 ++++++++++++ soc/xtensa/esp32/Kconfig.soc | 12 ++++++++++++ soc/xtensa/esp32s2/Kconfig.soc | 12 ++++++++++++ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/drivers/wifi/esp32/Kconfig.esp32 b/drivers/wifi/esp32/Kconfig.esp32 index 299841bce2f..067681e0620 100644 --- a/drivers/wifi/esp32/Kconfig.esp32 +++ b/drivers/wifi/esp32/Kconfig.esp32 @@ -210,18 +210,6 @@ choice ESP32_WIFI_TASK_CORE_ID bool "Core 0" endchoice -config ESP32_PHY_MAX_WIFI_TX_POWER - int "Max WiFi TX power (dBm)" - range 10 20 - default 20 - help - Set maximum transmit power for WiFi radio. Actual transmit power for high - data rates may be lower than this setting. - -config ESP32_PHY_MAX_TX_POWER - int - default ESP32_PHY_MAX_WIFI_TX_POWER - config ESP32_WIFI_SW_COEXIST_ENABLE bool help diff --git a/soc/riscv/esp32c3/Kconfig.soc b/soc/riscv/esp32c3/Kconfig.soc index 35c84a7de85..30a6f56ce88 100644 --- a/soc/riscv/esp32c3/Kconfig.soc +++ b/soc/riscv/esp32c3/Kconfig.soc @@ -30,4 +30,16 @@ config FLASH_BASE_ADDRESS hex default $(dt_node_reg_addr_hex,/soc/flash-controller@60002000/flash@0) +config ESP32_PHY_MAX_WIFI_TX_POWER + int "Max WiFi TX power (dBm)" + range 10 20 + default 20 + help + Set maximum transmit power for WiFi radio. Actual transmit power for high + data rates may be lower than this setting. + +config ESP32_PHY_MAX_TX_POWER + int + default ESP32_PHY_MAX_WIFI_TX_POWER + endif diff --git a/soc/xtensa/esp32/Kconfig.soc b/soc/xtensa/esp32/Kconfig.soc index e5c5505e64f..6e33143ad46 100644 --- a/soc/xtensa/esp32/Kconfig.soc +++ b/soc/xtensa/esp32/Kconfig.soc @@ -264,4 +264,16 @@ config ESP32_UNIVERSAL_MAC_ADDRESSES default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO default 4 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR +config ESP32_PHY_MAX_WIFI_TX_POWER + int "Max WiFi/BLE TX power (dBm)" + range 10 20 + default 20 + help + Set maximum transmit power for WiFi radio. Actual transmit power for high + data rates may be lower than this setting. + +config ESP32_PHY_MAX_TX_POWER + int + default ESP32_PHY_MAX_WIFI_TX_POWER + endif # SOC_ESP32 diff --git a/soc/xtensa/esp32s2/Kconfig.soc b/soc/xtensa/esp32s2/Kconfig.soc index 57c538cfcb7..0b56622767c 100644 --- a/soc/xtensa/esp32s2/Kconfig.soc +++ b/soc/xtensa/esp32s2/Kconfig.soc @@ -224,4 +224,16 @@ config ESP32S2_UNIVERSAL_MAC_ADDRESSES default 1 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE default 2 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO +config ESP32_PHY_MAX_WIFI_TX_POWER + int "Max WiFi TX power (dBm)" + range 10 20 + default 20 + help + Set maximum transmit power for WiFi radio. Actual transmit power for high + data rates may be lower than this setting. + +config ESP32_PHY_MAX_TX_POWER + int + default ESP32_PHY_MAX_WIFI_TX_POWER + endif # SOC_ESP32S2