fix(esp_hw_support): use one universal MAC address for esp32h2/esp32h21/esp32h4

ESP32-H2/H21/H4 only provide a single universally administered MAC
address in eFuse (MAC_FACTORY), so switch their UNIVERSAL_MAC_ADDRESSES
Kconfig from "Two" to "One" to match the hardware allocation.

This is a functional no-op for MAC generation: the BT offset is only
applied when SOC_WIFI_SUPPORTED, and these chips have no Wi-Fi, so
Bluetooth already reuses the base MAC as-is; the IEEE 802.154 EUI-64 is
derived from the base MAC and MAC_EXT regardless. The only change is
the (otherwise unused) ESP_MAC_UNIVERSAL_MAC_ADDRESSES int value going
from 2 to 1.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jack
2026-07-06 18:08:27 +08:00
co-authored by Cursor
parent f18f3814cc
commit 431983a091
3 changed files with 15 additions and 15 deletions
@@ -1,18 +1,18 @@
choice ESP32H2_UNIVERSAL_MAC_ADDRESSES choice ESP32H2_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address" bool "Number of universally administered (by IEEE) MAC address"
default ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO default ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE
help help
Configure the number of universally administered (by IEEE) MAC addresses. Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or derived from a During initialization, MAC addresses for each network interface are generated or derived from a
single base MAC address. single base MAC address.
config ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO config ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE
bool "Two" bool "One"
select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE
select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_IEEE802154
select ESP_MAC_ADDR_UNIVERSE_BT select ESP_MAC_ADDR_UNIVERSE_BT
endchoice endchoice
config ESP32H2_UNIVERSAL_MAC_ADDRESSES config ESP32H2_UNIVERSAL_MAC_ADDRESSES
int int
default 2 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO default 1 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_ONE
@@ -1,18 +1,18 @@
choice ESP32H21_UNIVERSAL_MAC_ADDRESSES choice ESP32H21_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address" bool "Number of universally administered (by IEEE) MAC address"
default ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO default ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE
help help
Configure the number of universally administered (by IEEE) MAC addresses. Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or derived from a During initialization, MAC addresses for each network interface are generated or derived from a
single base MAC address. single base MAC address.
config ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO config ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE
bool "Two" bool "One"
select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE
select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_IEEE802154
select ESP_MAC_ADDR_UNIVERSE_BT select ESP_MAC_ADDR_UNIVERSE_BT
endchoice endchoice
config ESP32H21_UNIVERSAL_MAC_ADDRESSES config ESP32H21_UNIVERSAL_MAC_ADDRESSES
int int
default 2 if ESP32H21_UNIVERSAL_MAC_ADDRESSES_TWO default 1 if ESP32H21_UNIVERSAL_MAC_ADDRESSES_ONE
@@ -1,18 +1,18 @@
choice ESP32H4_UNIVERSAL_MAC_ADDRESSES choice ESP32H4_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address" bool "Number of universally administered (by IEEE) MAC address"
default ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO default ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE
help help
Configure the number of universally administered (by IEEE) MAC addresses. Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or derived from a During initialization, MAC addresses for each network interface are generated or derived from a
single base MAC address. single base MAC address.
config ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO config ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE
bool "Two" bool "One"
select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE
select ESP_MAC_ADDR_UNIVERSE_IEEE802154 select ESP_MAC_ADDR_UNIVERSE_IEEE802154
select ESP_MAC_ADDR_UNIVERSE_BT select ESP_MAC_ADDR_UNIVERSE_BT
endchoice endchoice
config ESP32H4_UNIVERSAL_MAC_ADDRESSES config ESP32H4_UNIVERSAL_MAC_ADDRESSES
int int
default 2 if ESP32H4_UNIVERSAL_MAC_ADDRESSES_TWO default 1 if ESP32H4_UNIVERSAL_MAC_ADDRESSES_ONE