[wifi][openthread] Wire ESP32-S31/H4/H21 radio support (#17186)

This commit is contained in:
Jonathan Swoboda
2026-06-24 20:42:41 -04:00
committed by GitHub
parent 91e515ca7c
commit 23aff5202b
2 changed files with 20 additions and 4 deletions
+11 -1
View File
@@ -3,6 +3,9 @@ from esphome.components.esp32 import (
VARIANT_ESP32C5,
VARIANT_ESP32C6,
VARIANT_ESP32H2,
VARIANT_ESP32H4,
VARIANT_ESP32H21,
VARIANT_ESP32S31,
add_idf_sdkconfig_option,
get_esp32_variant,
include_builtin_idf_component,
@@ -187,7 +190,14 @@ def _validate_platform(config):
if CORE.using_zephyr:
return config
return only_on_variant(
supported=[VARIANT_ESP32C5, VARIANT_ESP32C6, VARIANT_ESP32H2]
supported=[
VARIANT_ESP32C5,
VARIANT_ESP32C6,
VARIANT_ESP32H2,
VARIANT_ESP32H4,
VARIANT_ESP32H21,
VARIANT_ESP32S31,
]
)(config)
+9 -3
View File
@@ -76,14 +76,20 @@ _LOGGER = logging.getLogger(__name__)
AUTO_LOAD = ["network"]
NO_WIFI_VARIANTS = [const.VARIANT_ESP32H2, const.VARIANT_ESP32P4]
NO_WIFI_VARIANTS = [
const.VARIANT_ESP32H2,
const.VARIANT_ESP32H4,
const.VARIANT_ESP32H21,
const.VARIANT_ESP32P4,
]
def variant_has_wifi(variant: str) -> bool:
"""Return True if *variant* has a native WiFi PHY.
Variants without a native PHY (ESP32-H2, ESP32-P4) need the
``esp32_hosted`` co-processor to use ``wifi:``.
Variants without a native PHY (see ``NO_WIFI_VARIANTS`` — currently
ESP32-H2, ESP32-H4, ESP32-H21, ESP32-P4) need the ``esp32_hosted``
co-processor to use ``wifi:``.
Case-insensitive on *variant* so external callers can pass either
the upstream uppercase form (e.g. ``"ESP32H2"`` from