# Copyright (c) 2020 HAW Hamburg # 2022 Gunar Schorcht # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. config CPU_FAM_ESP32S2 bool select CPU_COMMON_ESP32X select CPU_CORE_XTENSA_LX7 config CPU_FAM default "esp32s2" if CPU_FAM_ESP32S2 ## CPU Models config CPU_MODEL_ESP32S2 bool select CPU_FAM_ESP32S2 help Indicates that CPU version ESP32-S2 is used. config CPU_MODEL_ESP32S2_FH2 bool select CPU_FAM_ESP32S2 help Indicates that CPU version ESP32-S2FH2 with 2 MB embedded Flash is used. config CPU_MODEL_ESP32S2_FH4 bool select CPU_FAM_ESP32S2 help Indicates that CPU version ESP32-S2FN4R2 with 4 MB embedded Flash is used. config CPU_MODEL_ESP32S2_FN4R2 bool select CPU_FAM_ESP32S2 help Indicates that CPU version ESP32-S2FN4R2 with 4 MB embedded Flash and 2 MB embedded SPI RAM is used. config CPU_MODEL_ESP32S2_R2 bool select CPU_FAM_ESP32S2 help Indicates that CPU version ESP32-S2R2 with 2 MB embedded SPI RAM is used. config CPU_MODEL_ESP32S2_MINI_1X_H4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-1-H4 or ESP32-S2-MINI-1U-H4 module with 8 MB Flash is used. config CPU_MODEL_ESP32S2_MINI_1X_N4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-1-N4 or ESP32-S2-MINI-1U-N4 module with 8 MB Flash is used. config CPU_MODEL_ESP32S2_MINI_1X_N4R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-1-N4R2 or ESP32-S2-MINI-1U-N4R2 module with 4 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_MINI_2X_H4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-2-H4 or ESP32-S2-MINI-2U-H4 module with 4 MB Flash is used. config CPU_MODEL_ESP32S2_MINI_2X_N4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-2-N4 or ESP32-S2-MINI-2U-N4 module with 4 MB Flash is used. config CPU_MODEL_ESP32S2_MINI_2X_N4R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-MINI-2-N4R2 or ESP32-S2-MINI-2U-N4R2 module with 4 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_SOLO_H4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-H4 or ESP32-S2-SOLO-U-H4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_N4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-N4 or ESP32-S2-SOLO-U-N4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_N8 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-N4 or ESP32-S2-SOLO-U-N4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_N16 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-N4 or ESP32-S2-SOLO-U-N4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_N4R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-N4R2 or ESP32-S2-SOLO-U-N4R2 module with 4 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_SOLO_2X_H4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-2-H4 or ESP32-S2-SOLO-2U-H4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_2X_N4 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-2-N4 or ESP32-S2-SOLO-2U-N4 module with 4 MB Flash. config CPU_MODEL_ESP32S2_SOLO_2X_N4R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-SOLO-2-N4R2 or ESP32-S2-SOLO-2U-N4R2 module with 4 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_WROOM bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-WROOM or ESP32-S2-WROOM-I module with 4 MB Flash is used. config CPU_MODEL_ESP32S2_WROVER_N4R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-WROVER-N4R2 or ESP32-S2-WROVER-I-N4R2 module with 4 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_WROVER_N8R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-WROVER-N8R2 or ESP32-S2-WROVER-I-N8R2 module with 8 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL_ESP32S2_WROVER_N16R2 bool select CPU_FAM_ESP32S2 help Indicates that ESP32-S2-WROVER-N16R2 or ESP32-S2-WROVER-I-N16R2 module with 16 MB Flash and 2 MB SPI RAM is used. config CPU_MODEL depends on CPU_FAM_ESP32S2 default "esp32s2" if CPU_MODEL_ESP32S2 default "esp32s2_fh2" if CPU_MODEL_ESP32S2_FH2 default "esp32s2_fh4" if CPU_MODEL_ESP32S2_FH4 default "esp32s2_fn4r2" if CPU_MODEL_ESP32S2_FN4R2 default "esp32s2_r2" if CPU_MODEL_ESP32S2_R2 default "esp32s2_mini_1x_h4" if CPU_MODEL_ESP32S2_MINI_1X_H4 default "esp32s2_mini_1x_n4" if CPU_MODEL_ESP32S2_MINI_1X_N4 default "esp32s2_mini_1x_n4r2" if CPU_MODEL_ESP32S2_MINI_1X_N4R2 default "esp32s2_mini_2x_h4" if CPU_MODEL_ESP32S2_MINI_2X_H4 default "esp32s2_mini_2x_n4" if CPU_MODEL_ESP32S2_MINI_2X_N4 default "esp32s2_mini_2x_n4r2" if CPU_MODEL_ESP32S2_MINI_2X_N4R2 default "esp32s2_solo_h4" if CPU_MODEL_ESP32S2_SOLO_H4 default "esp32s2_solo_n4" if CPU_MODEL_ESP32S2_SOLO_N4 default "esp32s2_solo_n8" if CPU_MODEL_ESP32S2_SOLO_N8 default "esp32s2_solo_n16" if CPU_MODEL_ESP32S2_SOLO_N16 default "esp32s2_solo_n4r2" if CPU_MODEL_ESP32S2_SOLO_N4R2 default "esp32s2_solo_2x_h4" if CPU_MODEL_ESP32S2_SOLO_2X_H4 default "esp32s2_solo_2x_n4" if CPU_MODEL_ESP32S2_SOLO_2X_N4 default "esp32s2_solo_2x_n4r2" if CPU_MODEL_ESP32S2_SOLO_2X_N4R2 default "esp32s2_wroom" if CPU_MODEL_ESP32S2_WROOM default "esp32s2_wrover_n4r2" if CPU_MODEL_ESP32S2_WROVER_N4R2 default "esp32s2_wrover_n8r2" if CPU_MODEL_ESP32S2_WROVER_N8R2 default "esp32s2_wrover_n16r2" if CPU_MODEL_ESP32S2_WROVER_N16R2 if CPU_FAM_ESP32S2 menu "ESP32-S2 specific configurations" depends on HAS_ARCH_ESP32 # define configuration menu entries for ESP32-S3 variant (family) choice bool "CPU clock frequency" default ESP32S2_DEFAULT_CPU_FREQ_MHZ_80 help CPU clock frequency used (default 80 MHz). Please note that peripherals such as I2C or SPI might not work at the specified clock frequency if the selected CPU clock frequency is too low. These peripherals are clocked by the APB clock, which has a clock rate of 80 MHz for CPU clock frequencies greater than or equal to 80 MHz, but is equal to the CPU clock frequency for CPU clock frequencies less than 80 MHz. Thus, for SPI, the APB clock rate must be at least five times the SPI clock rate. For the I2C hardware implementation, the APB clock rate must be at least 40 times the I2C clock rate. For the I2C software implementation, the maximum I2C clock rate is 1/200 times the CPU clock rate. config ESP32S2_DEFAULT_CPU_FREQ_MHZ_2 bool "2 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_5 bool "5 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_10 bool "10 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_20 bool "20 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_40 bool "40 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_80 bool "80 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_160 bool "160 MHz" config ESP32S2_DEFAULT_CPU_FREQ_MHZ_240 bool "240 MHz" endchoice # import configuration menu entries that are common for all ESP32x SoCs rsource "Kconfig.common" endmenu endif # CPU_FAM_ESP32S2