wifi: esp32s2: add driver support

add support for esp32s2 wifi.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
This commit is contained in:
Glauber Maroto Ferreira 2021-09-02 11:18:51 -03:00 committed by Christopher Friedt
commit d451fda467
3 changed files with 68 additions and 1 deletions

View file

@ -69,4 +69,44 @@ config ESP32S2_DATA_CACHE_SIZE
default 0x2000 if ESP32S2_DATA_CACHE_8KB
default 0x4000 if ESP32S2_DATA_CACHE_16KB
endif
choice ESP32S2_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address"
default ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
help
Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or
derived from a single base MAC address. If the number of universal MAC addresses is two,
all interfaces (WiFi station, WiFi softap) receive a universally administered MAC
address.
They are generated sequentially by adding 0, and 1 (respectively) to the final octet of
the base MAC address. If the number of universal MAC addresses is one, only WiFi station
receives a universally administered MAC address.
The WiFi softap receives local MAC addresses. It's derived from the universal WiFi
station MAC addresses.
When using the default (Espressif-assigned) base MAC address, either setting can be used.
When using a custom universal MAC address range, the correct setting will depend on the
allocation of MAC addresses in this range (either 1 or 2 per device).
config ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE
bool "Two"
select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
config ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
bool "Two"
select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
endchoice
config ESP_MAC_ADDR_UNIVERSE_WIFI_AP
bool
config ESP_MAC_ADDR_UNIVERSE_WIFI_STA
bool
config ESP32S2_UNIVERSAL_MAC_ADDRESSES
int
default 1 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE
default 2 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
endif # SOC_ESP32S2

View file

@ -323,6 +323,17 @@ __shell_root_cmds_end = __esp_shell_root_cmds_end;
*libzephyr.a:log_backend_uart.*(.literal .text .literal.* .text.*)
*liblib__libc__minimal.a:string.*(.literal .text .literal.* .text.*)
*libgcov.a:(.literal .text .literal.* .text.*)
#if defined(CONFIG_ESP32_WIFI_IRAM_OPT)
*libnet80211.a:( .wifi0iram .wifi0iram.* .wifislpiram .wifislpiram.*)
*libpp.a:( .wifi0iram .wifi0iram.* .wifislpiram .wifislpiram.*)
#endif
#if defined(CONFIG_ESP32_WIFI_RX_IRAM_OPT)
*libnet80211.a:( .wifirxiram .wifirxiram.* .wifislprxiram .wifislprxiram.*)
*libpp.a:( .wifirxiram .wifirxiram.* .wifislprxiram .wifislprxiram.*)
#endif
_iram_text_end = ABSOLUTE(.);
. = ALIGN(4);
_iram_end = ABSOLUTE(.);
@ -332,6 +343,17 @@ __shell_root_cmds_end = __esp_shell_root_cmds_end;
{
_stext = .;
_text_start = ABSOLUTE(.);
#if !defined(CONFIG_ESP32_WIFI_IRAM_OPT)
*libnet80211.a:( .wifi0iram .wifi0iram.* .wifislpiram .wifislpiram.*)
*libpp.a:( .wifi0iram .wifi0iram.* .wifislpiram .wifislpiram.*)
#endif
#if !defined(CONFIG_ESP32_WIFI_RX_IRAM_OPT)
*libnet80211.a:( .wifirxiram .wifirxiram.* .wifislprxiram .wifislprxiram.*)
*libpp.a:( .wifirxiram .wifirxiram.* .wifislprxiram .wifislprxiram.*)
#endif
*(.literal .text .literal.* .text.*)
_text_end = ABSOLUTE(.);
_etext = .;