docs(esp_hw_support): document one-universal-MAC scheme and esp32s31 Four-option constraint

Add help text to the esp32h2/esp32h21/esp32h4 Kconfig.mac explaining
that these chips only consume one universally administered MAC address:
the IEEE 802.154 EUI-64 is derived from the base MAC and MAC_EXT, and
Bluetooth reuses the base MAC as-is (no BT offset, since there is no
Wi-Fi).

Add a matching 1-MAC derivation table and note to misc_system_api.rst
(EN and zh_CN) under a new `.. only:: esp32h2 or esp32h21 or esp32h4`
block, and exclude these targets from the generic 4/2 table.

Add an esp32s31-only note stating that the "Four" option may only be
used with a customer-provided custom base MAC range, since ESP32-S31
only provides two universally administered MAC addresses in eFuse.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit e3bc260178)
This commit is contained in:
Jack
2026-07-06 18:06:24 +08:00
parent 57184eb356
commit b5cd9ce7fa
5 changed files with 112 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ In ESP-IDF, the MAC addresses for the various network interfaces are calculated
On ESP32-P4, :ref:`CONFIG_{IDF_TARGET_CFG_PREFIX}_UNIVERSAL_MAC_ADDRESSES` is fixed to one universally administered MAC address.
.. only:: (not esp32s2) and (not esp32p4)
.. only:: (not esp32s2) and (not esp32p4) and (not esp32h2) and (not esp32h21) and (not esp32h4) and (not esp32s31)
.. list-table::
:widths: 20 40 40
@@ -80,6 +80,49 @@ In ESP-IDF, the MAC addresses for the various network interfaces are calculated
The :ref:`configuration <CONFIG_{IDF_TARGET_CFG_PREFIX}_UNIVERSAL_MAC_ADDRESSES>` configures the number of universally administered MAC addresses that are provided by Espressif.
.. only:: esp32s31
.. list-table::
:widths: 20 40 40
:header-rows: 1
* - Interface
- MAC Address (2 universally administered, default)
- MAC Address (4 universally administered)
* - Wi-Fi Station
- base_mac
- base_mac
* - Wi-Fi SoftAP
- :ref:`Local MAC <local-mac-addresses>` (derived from Wi-Fi Station MAC)
- base_mac, +1 to the last octet
* - Bluetooth
- base_mac, +1 to the last octet
- base_mac, +2 to the last octet
* - Ethernet
- :ref:`Local MAC <local-mac-addresses>` (derived from Bluetooth MAC)
- base_mac, +3 to the last octet
.. note::
ESP32-S31 only provides two universally administered MAC addresses in eFuse, so :ref:`CONFIG_{IDF_TARGET_CFG_PREFIX}_UNIVERSAL_MAC_ADDRESSES` defaults to two. The "Four" option may only be used when a customer-provided custom base MAC range is used (see :ref:`Custom Base MAC <MAC-Address-Allocation>`), where four universally administered MAC addresses are allocated per device. Using "Four" with the default Espressif eFuse base MAC leads to SoftAP and Ethernet consuming global MAC slots (base+1/+3) that are not allocated on this chip and may collide with the Bluetooth MAC.
.. only:: esp32h2 or esp32h21 or esp32h4
.. list-table::
:widths: 20 80
:header-rows: 1
* - Interface
- MAC Address (1 universally administered, default)
* - IEEE 802.154
- EUI-64 derived from base_mac and MAC_EXT (base_mac[0:3] ‖ MAC_EXT ‖ base_mac[3:6], MAC_EXT defaults to ff:fe)
* - Bluetooth
- base_mac
.. note::
{IDF_TARGET_NAME} provides a single universally administered MAC address in eFuse (MAC_FACTORY) plus the MAC_EXT field used to build the IEEE 802.154 EUI-64. :ref:`CONFIG_{IDF_TARGET_CFG_PREFIX}_UNIVERSAL_MAC_ADDRESSES` is fixed to one. Bluetooth reuses the base MAC as-is — the BT offset is not applied because {IDF_TARGET_NAME} has no Wi-Fi, so no second universal MAC slot is required.
.. only:: esp32s2
.. list-table::