mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'refactor/flash_frequency_esptool' into 'master'
refactor(spi_flash): Refactor the flash frequency config file Closes IDF-10488 See merge request espressif/esp-idf!33427
This commit is contained in:
commit
3008d11a68
@ -89,71 +89,7 @@ menu "Serial flasher config"
|
||||
# information get from efuse, so don't care this dout choice.
|
||||
default "dout" if ESPTOOLPY_FLASHMODE_OPI
|
||||
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32
|
||||
default ESPTOOLPY_FLASHFREQ_80M if ESPTOOLPY_FLASHFREQ_80M_DEFAULT
|
||||
default ESPTOOLPY_FLASHFREQ_60M if IDF_TARGET_ESP32C2
|
||||
config ESPTOOLPY_FLASHFREQ_120M
|
||||
bool "120 MHz (READ DOCS FIRST)"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_120M && \
|
||||
(SPI_FLASH_HPM_ON || ESPTOOLPY_OCT_FLASH) && \
|
||||
(ESPTOOLPY_FLASH_SAMPLE_MODE_STR || IDF_EXPERIMENTAL_FEATURES)
|
||||
help
|
||||
- Optional feature for QSPI Flash. Read docs and enable `CONFIG_SPI_FLASH_HPM_ENA` first!
|
||||
- Flash 120 MHz SDR mode is stable.
|
||||
- Flash 120 MHz DDR mode is an experimental feature, it works when
|
||||
the temperature is stable.
|
||||
|
||||
Risks:
|
||||
If your chip powers on at a certain temperature, then after the temperature
|
||||
increases or decreases by approximately 20 Celsius degrees (depending on the
|
||||
chip), the program will crash randomly.
|
||||
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_80M_SUPPORTED && !ESP32P4_REV_MIN_0 # TODO IDF-10488
|
||||
config ESPTOOLPY_FLASHFREQ_64M
|
||||
bool "64 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_64M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_60M
|
||||
bool "60 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_60M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_48M
|
||||
bool "48 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_48M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_40M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_32M
|
||||
bool "32 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_32M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_30M
|
||||
bool "30 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_30M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_26M
|
||||
bool "26 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_26M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_24M
|
||||
bool "24 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_24M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_20M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_16M
|
||||
bool "16 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_16M_SUPPORTED
|
||||
config ESPTOOLPY_FLASHFREQ_15M
|
||||
bool "15 MHz"
|
||||
depends on SOC_MEMSPI_SRC_FREQ_15M_SUPPORTED
|
||||
endchoice
|
||||
|
||||
config ESPTOOLPY_FLASHFREQ_80M_DEFAULT
|
||||
bool
|
||||
default y if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6
|
||||
default y if IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C61
|
||||
help
|
||||
This is an invisible item, used to define the targets that defaults to use 80MHz Flash SPI speed.
|
||||
orsource "../spi_flash/$IDF_TARGET/Kconfig.flash_freq"
|
||||
|
||||
config ESPTOOLPY_FLASHFREQ
|
||||
string
|
||||
|
12
components/spi_flash/esp32/Kconfig.flash_freq
Normal file
12
components/spi_flash/esp32/Kconfig.flash_freq
Normal file
@ -0,0 +1,12 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_40M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_26M
|
||||
bool "26 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
12
components/spi_flash/esp32c2/Kconfig.flash_freq
Normal file
12
components/spi_flash/esp32c2/Kconfig.flash_freq
Normal file
@ -0,0 +1,12 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_60M
|
||||
config ESPTOOLPY_FLASHFREQ_60M
|
||||
bool "60 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_30M
|
||||
bool "30 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_15M
|
||||
bool "15 MHz"
|
||||
endchoice
|
12
components/spi_flash/esp32c3/Kconfig.flash_freq
Normal file
12
components/spi_flash/esp32c3/Kconfig.flash_freq
Normal file
@ -0,0 +1,12 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_26M
|
||||
bool "26 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
10
components/spi_flash/esp32c5/Kconfig.flash_freq
Normal file
10
components/spi_flash/esp32c5/Kconfig.flash_freq
Normal file
@ -0,0 +1,10 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
8
components/spi_flash/esp32c5/Kconfig.soc_caps.in
Normal file
8
components/spi_flash/esp32c5/Kconfig.soc_caps.in
Normal file
@ -0,0 +1,8 @@
|
||||
#####################################################
|
||||
# This file is auto-generated from SoC caps
|
||||
# using gen_soc_caps_kconfig.py, do not edit manually
|
||||
#####################################################
|
||||
|
||||
config SPI_FLASH_VENDOR_XMC_SUPPORTED
|
||||
bool
|
||||
default y
|
8
components/spi_flash/esp32c5/flash_vendor_caps.h
Normal file
8
components/spi_flash/esp32c5/flash_vendor_caps.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1)
|
10
components/spi_flash/esp32c6/Kconfig.flash_freq
Normal file
10
components/spi_flash/esp32c6/Kconfig.flash_freq
Normal file
@ -0,0 +1,10 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
10
components/spi_flash/esp32c61/Kconfig.flash_freq
Normal file
10
components/spi_flash/esp32c61/Kconfig.flash_freq
Normal file
@ -0,0 +1,10 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
8
components/spi_flash/esp32c61/Kconfig.soc_caps.in
Normal file
8
components/spi_flash/esp32c61/Kconfig.soc_caps.in
Normal file
@ -0,0 +1,8 @@
|
||||
#####################################################
|
||||
# This file is auto-generated from SoC caps
|
||||
# using gen_soc_caps_kconfig.py, do not edit manually
|
||||
#####################################################
|
||||
|
||||
config SPI_FLASH_VENDOR_XMC_SUPPORTED
|
||||
bool
|
||||
default y
|
8
components/spi_flash/esp32c61/flash_vendor_caps.h
Normal file
8
components/spi_flash/esp32c61/flash_vendor_caps.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1)
|
10
components/spi_flash/esp32h2/Kconfig.flash_freq
Normal file
10
components/spi_flash/esp32h2/Kconfig.flash_freq
Normal file
@ -0,0 +1,10 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_64M
|
||||
config ESPTOOLPY_FLASHFREQ_64M
|
||||
bool "64 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_32M
|
||||
bool "32 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_16M
|
||||
bool "16 MHz"
|
||||
endchoice
|
12
components/spi_flash/esp32p4/Kconfig.flash_freq
Normal file
12
components/spi_flash/esp32p4/Kconfig.flash_freq
Normal file
@ -0,0 +1,12 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_40M if ESP32P4_REV_MIN_0
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
depends on !ESP32P4_REV_MIN_0
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
12
components/spi_flash/esp32s2/Kconfig.flash_freq
Normal file
12
components/spi_flash/esp32s2/Kconfig.flash_freq
Normal file
@ -0,0 +1,12 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_26M
|
||||
bool "26 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
23
components/spi_flash/esp32s3/Kconfig.flash_freq
Normal file
23
components/spi_flash/esp32s3/Kconfig.flash_freq
Normal file
@ -0,0 +1,23 @@
|
||||
choice ESPTOOLPY_FLASHFREQ
|
||||
prompt "Flash SPI speed"
|
||||
default ESPTOOLPY_FLASHFREQ_80M
|
||||
config ESPTOOLPY_FLASHFREQ_120M
|
||||
bool "120 MHz (READ DOCS FIRST)"
|
||||
depends on (SPI_FLASH_HPM_ON || ESPTOOLPY_OCT_FLASH) && \
|
||||
(ESPTOOLPY_FLASH_SAMPLE_MODE_STR || IDF_EXPERIMENTAL_FEATURES)
|
||||
help
|
||||
- Optional feature for QSPI Flash. Read docs and enable `CONFIG_SPI_FLASH_HPM_ENA` first!
|
||||
- Flash 120 MHz SDR mode is stable.
|
||||
- Flash 120 MHz DDR mode is an experimental feature, it works when
|
||||
the temperature is stable.
|
||||
Risks:
|
||||
If your chip powers on at a certain temperature, then after the temperature
|
||||
increases or decreases by approximately 20 Celsius degrees (depending on the
|
||||
chip), the program will crash randomly.
|
||||
config ESPTOOLPY_FLASHFREQ_80M
|
||||
bool "80 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_40M
|
||||
bool "40 MHz"
|
||||
config ESPTOOLPY_FLASHFREQ_20M
|
||||
bool "20 MHz"
|
||||
endchoice
|
@ -9,9 +9,6 @@ CONFIG_FATFS_VFS_FSTAT_BLKSIZE=4096
|
||||
# SPI flash
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
CONFIG_ESPTOOLPY_FLASHMODE="qio"
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
|
||||
CONFIG_EXAMPLE_TEST_SPIFLASH=y
|
||||
|
||||
# SD card
|
||||
|
@ -13,7 +13,4 @@ CONFIG_LITTLEFS_SDMMC_SUPPORT=y
|
||||
# SPI flash
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
CONFIG_ESPTOOLPY_FLASHMODE="qio"
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
@ -2,7 +2,6 @@
|
||||
#
|
||||
# (Not all hardware may support this configuration.)
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
|
||||
# These two settings mean that no logs are printed
|
||||
# during startup, but it's possible to use esp_log_level_set("*", ESP_LOG_INFO)
|
||||
|
@ -1,2 +1 @@
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
|
Loading…
Reference in New Issue
Block a user