225 lines
5.4 KiB
Plaintext
225 lines
5.4 KiB
Plaintext
# Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config SOC_ESP32S2
|
|
bool "ESP32S2"
|
|
select XTENSA
|
|
select ATOMIC_OPERATIONS_C
|
|
select DYNAMIC_INTERRUPTS
|
|
select CLOCK_CONTROL
|
|
select CLOCK_CONTROL_ESP32
|
|
|
|
if SOC_ESP32S2
|
|
|
|
config IDF_TARGET_ESP32S2
|
|
bool "ESP32S2 as target board"
|
|
default y
|
|
|
|
config ESPTOOLPY_FLASHFREQ_80M
|
|
bool
|
|
default y
|
|
|
|
config FLASH_SIZE
|
|
int
|
|
default $(dt_node_reg_size_int,/soc/flash-controller@3f402000/flash@0,0)
|
|
|
|
config FLASH_BASE_ADDRESS
|
|
hex
|
|
default $(dt_node_reg_addr_hex,/soc/flash-controller@3f402000/flash@0)
|
|
|
|
choice
|
|
prompt "Instruction cache line size"
|
|
default ESP32S2_INSTRUCTION_CACHE_LINE_32B
|
|
|
|
config ESP32S2_INSTRUCTION_CACHE_LINE_16B
|
|
bool "16 Bytes"
|
|
|
|
config ESP32S2_INSTRUCTION_CACHE_LINE_32B
|
|
bool "32 Bytes"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Instruction cache size"
|
|
default ESP32S2_INSTRUCTION_CACHE_8KB
|
|
|
|
config ESP32S2_INSTRUCTION_CACHE_8KB
|
|
bool "8KB instruction cache size"
|
|
|
|
config ESP32S2_INSTRUCTION_CACHE_16KB
|
|
bool "16KB instruction cache size"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Data cache size"
|
|
default ESP32S2_DATA_CACHE_0KB if !ESP_SPIRAM
|
|
default ESP32S2_DATA_CACHE_8KB if ESP_SPIRAM
|
|
|
|
config ESP32S2_DATA_CACHE_0KB
|
|
bool "0KB data cache size"
|
|
|
|
config ESP32S2_DATA_CACHE_8KB
|
|
bool "8KB data cache size"
|
|
|
|
config ESP32S2_DATA_CACHE_16KB
|
|
bool "16KB data cache size"
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Data cache line size"
|
|
default ESP32S2_DATA_CACHE_LINE_32B
|
|
|
|
config ESP32S2_DATA_CACHE_LINE_16B
|
|
bool "16 Bytes"
|
|
|
|
config ESP32S2_DATA_CACHE_LINE_32B
|
|
bool "32 Bytes"
|
|
|
|
endchoice
|
|
|
|
config ESP32S2_INSTRUCTION_CACHE_SIZE
|
|
hex
|
|
default 0x4000 if ESP32S2_INSTRUCTION_CACHE_16KB
|
|
default 0x2000
|
|
|
|
config ESP32S2_DATA_CACHE_SIZE
|
|
hex
|
|
default 0x2000 if ESP32S2_DATA_CACHE_8KB
|
|
default 0x4000 if ESP32S2_DATA_CACHE_16KB
|
|
default 0x0000
|
|
|
|
config ESP_SPIRAM
|
|
bool "Support for external, SPI-connected RAM"
|
|
help
|
|
This enables support for an external SPI RAM chip, connected in
|
|
parallel with the main SPI flash chip.
|
|
|
|
config ESP_HEAP_MIN_EXTRAM_THRESHOLD
|
|
int "Minimum threshold for external RAM allocation"
|
|
default 8192
|
|
range 1024 131072
|
|
depends on ESP_SPIRAM
|
|
help
|
|
Threshold to decide if memory will be allocated from DRAM
|
|
or SPIRAM. If value of allocation size is less than this value,
|
|
memory will be allocated from internal RAM.
|
|
|
|
menu "SPI RAM config"
|
|
depends on ESP_SPIRAM
|
|
|
|
choice SPIRAM_TYPE
|
|
prompt "Type of SPI RAM chip in use"
|
|
default SPIRAM_TYPE_ESPPSRAM16
|
|
|
|
config SPIRAM_TYPE_ESPPSRAM16
|
|
bool "ESP-PSRAM16 or APS1604"
|
|
|
|
config SPIRAM_TYPE_ESPPSRAM32
|
|
bool "ESP-PSRAM32 or IS25WP032"
|
|
|
|
config SPIRAM_TYPE_ESPPSRAM64
|
|
bool "ESP-PSRAM64 or LY68L6400"
|
|
|
|
endchoice # SPIRAM_TYPE
|
|
|
|
config ESP_SPIRAM_SIZE
|
|
int "Size of SPIRAM part"
|
|
default 2097152 if SPIRAM_TYPE_ESPPSRAM16
|
|
default 4194304 if SPIRAM_TYPE_ESPPSRAM32
|
|
default 8388608 if SPIRAM_TYPE_ESPPSRAM64
|
|
help
|
|
Specify size of SPIRAM part.
|
|
NOTE: If SPIRAM size is greater than 4MB, only
|
|
lower 4MB can be allocated using k_malloc().
|
|
|
|
menu "PSRAM clock and cs IO for ESP32S2"
|
|
depends on ESP_SPIRAM
|
|
|
|
config DEFAULT_PSRAM_CLK_IO
|
|
int "PSRAM CLK IO number"
|
|
range 0 33
|
|
default 30
|
|
help
|
|
The PSRAM CLOCK IO can be any unused GPIO, user can config
|
|
it based on hardware design.
|
|
|
|
config DEFAULT_PSRAM_CS_IO
|
|
int "PSRAM CS IO number"
|
|
range 0 33
|
|
default 26
|
|
help
|
|
The PSRAM CS IO can be any unused GPIO, user can config it
|
|
based on hardware design.
|
|
|
|
endmenu # PSRAM clock and cs IO for ESP32S2
|
|
|
|
choice SPIRAM_SPEED
|
|
prompt "Set RAM clock speed"
|
|
default SPIRAM_SPEED_40M
|
|
help
|
|
Select the speed for the SPI RAM chip.
|
|
|
|
config SPIRAM_SPEED_80M
|
|
bool "80MHz clock speed"
|
|
|
|
config SPIRAM_SPEED_40M
|
|
bool "40MHz clock speed"
|
|
|
|
config SPIRAM_SPEED_26M
|
|
bool "26MHz clock speed"
|
|
|
|
config SPIRAM_SPEED_20M
|
|
bool "20MHz clock speed"
|
|
|
|
endchoice # SPIRAM_SPEED
|
|
|
|
config SPIRAM
|
|
bool
|
|
default y
|
|
|
|
endmenu # SPI RAM config
|
|
|
|
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 # ESP32S2_UNIVERSAL_MAC_ADDRESSES
|
|
|
|
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
|