diff --git a/components/bootloader/Kconfig.projbuild b/components/bootloader/Kconfig.projbuild index 895085d383b..f62af13ef83 100644 --- a/components/bootloader/Kconfig.projbuild +++ b/components/bootloader/Kconfig.projbuild @@ -62,34 +62,66 @@ menu "Bootloader config" default 4 if BOOTLOADER_LOG_LEVEL_DEBUG default 5 if BOOTLOADER_LOG_LEVEL_VERBOSE - config BOOTLOADER_SPI_CUSTOM_WP_PIN - bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)" - depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT) - default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5 - default n - help - This setting is only used if the SPI flash pins have been overridden by setting the eFuses - SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT. + menu "Serial Flash Configurations" + config BOOTLOADER_SPI_CUSTOM_WP_PIN + bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)" + depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT) + default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5 + default n + help + This setting is only used if the SPI flash pins have been overridden by setting the eFuses + SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT. + + When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka + ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used + for external SPIRAM if it is enabled. + + If this config item is set to N (default), the correct WP pin will be automatically used for any + Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to + Y and specify the GPIO number connected to the WP. + + config BOOTLOADER_SPI_WP_PIN + int "Custom SPI Flash WP Pin" + range 0 33 + default 7 + depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT) + #depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5 + help + The option "Use custom SPI Flash WP Pin" must be set or this value is ignored - When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka - ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used - for external SPIRAM if it is enabled. + If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this + value to the GPIO number of the SPI flash WP pin. - If this config item is set to N (default), the correct WP pin will be automatically used for any - Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to - Y and specify the GPIO number connected to the WP. + config BOOTLOADER_FLASH_DC_AWARE + bool "Allow app adjust Dummy Cycle bits in SPI Flash for higher frequency (READ HELP FIRST)" + help + This will force 2nd bootloader to be loaded by DOUT mode, and will restore Dummy Cycle setting by + resetting the Flash - config BOOTLOADER_SPI_WP_PIN - int "Custom SPI Flash WP Pin" - range 0 33 - default 7 - depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT) - #depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5 - help - The option "Use custom SPI Flash WP Pin" must be set or this value is ignored + config BOOTLOADER_FLASH_XMC_SUPPORT + bool "Enable the support for flash chips of XMC (READ DOCS FIRST)" + default y + help + Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow. + XMC chips will be forbidden to be used, when this option is disabled. + + DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. - If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this - value to the GPIO number of the SPI flash WP pin. + comment "Features below require specific hardware (READ DOCS FIRST!)" + + config BOOTLOADER_FLASH_32BIT_ADDR + bool + default y if ESPTOOLPY_FLASHSIZE_32MB || ESPTOOLPY_FLASHSIZE_64MB || ESPTOOLPY_FLASHSIZE_128MB + default n + help + This is a helper config for 32bits address flash. Invisible for users. + + config BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH + bool + default y if ESPTOOLPY_OCT_FLASH && BOOTLOADER_FLASH_32BIT_ADDR + default n + + endmenu choice BOOTLOADER_VDDSDIO_BOOST bool "VDDSDIO LDO voltage" @@ -393,14 +425,6 @@ menu "Bootloader config" in this area of memory, you can increase it. It must be a multiple of 4 bytes. This area (rtc_retain_mem_t) is reserved and has access from the bootloader and an application. - config BOOTLOADER_FLASH_XMC_SUPPORT - bool "Enable the support for flash chips of XMC (READ HELP FIRST)" - default y - help - Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow. - XMC chips will be forbidden to be used, when this option is disabled. - - DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. endmenu # Bootloader diff --git a/components/bootloader/sdkconfig.rename b/components/bootloader/sdkconfig.rename index bdcfe364878..6aecd1523a1 100644 --- a/components/bootloader/sdkconfig.rename +++ b/components/bootloader/sdkconfig.rename @@ -23,3 +23,5 @@ CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE CONFIG_SECURE_FLASH_ # Secure Boot Scheme CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V1_ENABLED + +CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH diff --git a/components/bootloader_support/include/bootloader_flash_override.h b/components/bootloader_support/include/bootloader_flash_override.h index 3650e28e0ae..6055e1781c7 100644 --- a/components/bootloader_support/include/bootloader_flash_override.h +++ b/components/bootloader_support/include/bootloader_flash_override.h @@ -96,7 +96,7 @@ extern const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_sup */ esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void); -#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE +#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH /** * @brief Enable 32bits address flash(larger than 16MB) can map to cache. * diff --git a/components/bootloader_support/src/bootloader_flash.c b/components/bootloader_support/src/bootloader_flash.c index e73d77eb6ce..60620bdd826 100644 --- a/components/bootloader_support/src/bootloader_flash.c +++ b/components/bootloader_support/src/bootloader_flash.c @@ -487,7 +487,7 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size) return spi_to_esp_err(rc); } -#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE +#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH void bootloader_flash_32bits_address_map_enable(esp_rom_spiflash_read_mode_t flash_mode) { esp_rom_opiflash_spi0rd_t cache_rd = {}; diff --git a/components/bootloader_support/src/esp32s3/bootloader_esp32s3.c b/components/bootloader_support/src/esp32s3/bootloader_esp32s3.c index f61080f508d..f044e808a79 100644 --- a/components/bootloader_support/src/esp32s3/bootloader_esp32s3.c +++ b/components/bootloader_support/src/esp32s3/bootloader_esp32s3.c @@ -218,7 +218,7 @@ static esp_err_t bootloader_init_spi_flash(void) } #endif -#if CONFIG_SPI_FLASH_HPM_ENABLE +#if CONFIG_BOOTLOADER_FLASH_DC_AWARE // Reset flash, clear volatile bits DC[0:1]. Make it work under default mode to boot. bootloader_spi_flash_reset(); #endif @@ -228,7 +228,7 @@ static esp_err_t bootloader_init_spi_flash(void) #if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT bootloader_enable_qio_mode(); #endif -#if CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE +#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH bootloader_flash_32bits_address_map_enable(bootloader_flash_get_spi_mode()); #endif print_flash_info(&bootloader_image_hdr); diff --git a/components/esp32s3/Kconfig b/components/esp32s3/Kconfig index 53f2e498c95..e6a1654252b 100644 --- a/components/esp32s3/Kconfig +++ b/components/esp32s3/Kconfig @@ -307,7 +307,7 @@ menu "ESP32S3-Specific" config SPIRAM_SPEED_120M depends on SPIRAM_MODE_QUAD - bool "120MHz clock speed" + bool "120MHz clock speed (READ DOCS FIRST)" config SPIRAM_SPEED_80M bool "80MHz clock speed" config SPIRAM_SPEED_40M diff --git a/components/esp_lcd/Kconfig b/components/esp_lcd/Kconfig index 6c48962affe..b00747ca9c4 100644 --- a/components/esp_lcd/Kconfig +++ b/components/esp_lcd/Kconfig @@ -1,4 +1,6 @@ menu "LCD and Touch Panel" + comment "LCD Touch Drivers are maintained in the IDF Component Registry" + menu "LCD Peripheral Configuration" config LCD_PANEL_IO_FORMAT_BUF_SIZE int "LCD panel io format buffer size" diff --git a/components/esptool_py/Kconfig.projbuild b/components/esptool_py/Kconfig.projbuild index dad043f7fd0..19fe84b2044 100644 --- a/components/esptool_py/Kconfig.projbuild +++ b/components/esptool_py/Kconfig.projbuild @@ -118,6 +118,10 @@ menu "Serial flasher config" # information get from efuse, so don't care this dout choice. default "dout" if ESPTOOLPY_FLASHMODE_OPI + config ESPTOOLPY_S3_STR + bool + default y if IDF_TARGET_ESP32S3 && ESPTOOLPY_FLASH_SAMPLE_MODE_STR + choice ESPTOOLPY_FLASHFREQ prompt "Flash SPI speed" default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32 || IDF_TARGET_ESP32H2 @@ -126,9 +130,11 @@ menu "Serial flasher config" The SPI flash frequency to be used. config ESPTOOLPY_FLASHFREQ_120M - depends on IDF_TARGET_ESP32S3 && ESPTOOLPY_FLASH_SAMPLE_MODE_STR - bool "120 MHz" - select SPI_FLASH_HPM_ENABLE + bool "120 MHz (READ DOCS FIRST)" + depends on ESPTOOLPY_S3_STR && (SPI_FLASH_HPM_ON || ESPTOOLPY_OCT_FLASH) + help + - Optional feature for QSPI Flash. Read docs and enable `CONFIG_SPI_FLASH_HPM_ENA` first! + config ESPTOOLPY_FLASHFREQ_80M bool "80 MHz" config ESPTOOLPY_FLASHFREQ_40M diff --git a/components/esptool_py/project_include.cmake b/components/esptool_py/project_include.cmake index c9a7fd27d8e..93135e01eda 100644 --- a/components/esptool_py/project_include.cmake +++ b/components/esptool_py/project_include.cmake @@ -15,7 +15,7 @@ set(ESPSECUREPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espsecure.py") set(ESPEFUSEPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espefuse.py") set(ESPMONITOR ${python} "${idf_path}/tools/idf_monitor.py") -if(CONFIG_SPI_FLASH_HPM_ENABLE) +if(CONFIG_BOOTLOADER_FLASH_DC_AWARE) # When set flash frequency to 120M, must keep 1st bootloader work under ``DOUT`` mode # because on some flash chips, 120M will modify the status register, # which will make ROM won't work. diff --git a/components/spi_flash/CMakeLists.txt b/components/spi_flash/CMakeLists.txt index 6d4099fb7f6..60a950c6858 100644 --- a/components/spi_flash/CMakeLists.txt +++ b/components/spi_flash/CMakeLists.txt @@ -23,6 +23,11 @@ else() list(APPEND srcs "esp32s3/spi_timing_config.c" "spi_flash_timing_tuning.c" + ) + endif() + + if(CONFIG_SPI_FLASH_HPM_ON) + list(APPEND srcs "spi_flash_hpm_enable.c") endif() diff --git a/components/spi_flash/Kconfig b/components/spi_flash/Kconfig index 68096cbfb5b..c9b51749b37 100644 --- a/components/spi_flash/Kconfig +++ b/components/spi_flash/Kconfig @@ -1,3 +1,86 @@ +menu "Main Flash configuration" + depends on !APP_BUILD_TYPE_PURE_RAM_APP + + menu "Optional and Experimental Features (READ DOCS FIRST)" + + comment "Features here require specific hardware (READ DOCS FIRST!)" + + config SPI_FLASH_UNDER_HIGH_FREQ + bool + default y if ESPTOOLPY_FLASHFREQ_120M + help + This is a helper config for HPM. Invisible for users. + + choice SPI_FLASH_HPM + prompt "High Performance Mode (READ DOCS FIRST, > 80MHz)" + # Currently, only esp32s3 allows high performance mode. + depends on IDF_TARGET_ESP32S3 && !ESPTOOLPY_OCT_FLASH + default SPI_FLASH_HPM_AUTO + help + Whether the High Performance Mode of Flash is enabled. As an optional feature, user needs to manually + enable this option as a confirmation. To be back-compatible with earlier IDF versionn, this option is + automatically enabled with warning when Flash running > 80Mhz. + + config SPI_FLASH_HPM_ENA + # Not using name of SPI_FLASH_HPM_ENABLE because it was used as an invisible option and we don't want + # to inherit the value of that one + bool "Enable" + config SPI_FLASH_HPM_AUTO + bool "Auto (Not recommended)" + config SPI_FLASH_HPM_DIS + bool "Disabled" + endchoice + + config SPI_FLASH_HPM_ON + bool + # For ESP32-S3, it's enabled by default. For later chips it should be disabled by default + default y if SPI_FLASH_HPM_ENA || (IDF_TARGET_ESP32S3 && SPI_FLASH_HPM_AUTO) + help + This option is invisible, and will be selected automatically + when ``ESPTOOLPY_FLASHFREQ_120M`` is selected. + + choice SPI_FLASH_HPM_DC + prompt "Support HPM using DC (READ DOCS FIRST)" + depends on SPI_FLASH_HPM_ON + default SPI_FLASH_HPM_DC_AUTO + help + This feature needs your bootloader to be compiled DC-aware (BOOTLOADER_FLASH_DC_AWARE=y). Otherwise the + chip will not be able to boot after a reset. + + config SPI_FLASH_HPM_DC_AUTO + bool "Auto (Enable when bootloader support enabled (BOOTLOADER_FLASH_DC_AWARE))" + config SPI_FLASH_HPM_DC_DISABLE + bool "Disable (READ DOCS FIRST)" + endchoice + + config SPI_FLASH_HPM_DC_ON + bool + default y if SPI_FLASH_HPM_DC_AUTO && BOOTLOADER_FLASH_DC_AWARE + help + This is a helper config for HPM. Whether HPM-DC is enabled is also determined by bootloader. + Invisible for users. + + config SPI_FLASH_AUTO_SUSPEND + bool "Auto suspend long erase/write operations (READ DOCS FIRST)" + default n + depends on IDF_TARGET_ESP32C3 && !SPI_FLASH_USE_LEGACY_IMPL && !SPI_FLASH_ROM_IMPL + help + This option is disabled by default because it is supported only + for specific flash chips and for specific Espressif chips. + To evaluate if you can use this feature refer to + `Optional Features for Flash` > `Auto Suspend & Resume` of the `ESP-IDF Programming Guide`. + + CAUTION: If you want to OTA to an app with this feature turned on, please make + sure the bootloader has the support for it. (later than IDF v4.3) + + If you are using an official Espressif module, please contact Espressif Business support + to check if the module has the flash that support this feature installed. + Also refer to `Concurrency Constraints for Flash on SPI1` > `Flash Auto Suspend Feature` + before enabling this option. + + endmenu +endmenu + menu "SPI Flash driver" config SPI_FLASH_VERIFY_WRITE @@ -147,20 +230,6 @@ menu "SPI Flash driver" help Defines how many ticks will be before returning to continue a erasing. - config SPI_FLASH_AUTO_SUSPEND - bool "Auto suspend long erase/write operations (READ DOCS FIRST)" - default n - depends on IDF_TARGET_ESP32C3 && !SPI_FLASH_USE_LEGACY_IMPL && !SPI_FLASH_ROM_IMPL - help - This option is default n before ESP32-C3, because it needs bootloader support. - - CAUTION: If you want to OTA to an app with this feature turned on, please make - sure the bootloader has the support for it. (later than IDF v4.3) - - Auto-suspend feature only supported by XMC chip. - If you are using an official module, please contact Espressif Business support. - Also reading auto suspend part in `SPI Flash API` document before you enable this function. - config SPI_FLASH_WRITE_CHUNK_SIZE int "Flash write chunk size" default 8192 @@ -279,22 +348,4 @@ menu "SPI Flash driver" application is not using flash encryption feature and is in need of some additional memory from IRAM region (~1KB) then this config can be disabled. - config SPI_FLASH_HPM_ENABLE - bool - default n - help - This option is invisible, and will be selected automatically - when ``ESPTOOLPY_FLASHFREQ_120M`` is selected. - - config SPI_FLASH_32BIT_ADDRESS - bool - default y if ESPTOOLPY_FLASHSIZE_32MB || ESPTOOLPY_FLASHSIZE_64MB || ESPTOOLPY_FLASHSIZE_128MB - default n - help - This is a helper config for 32bits address flash. Invisible for users. - - config SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE - bool - default y if ESPTOOLPY_OCT_FLASH && SPI_FLASH_32BIT_ADDRESS - default n endmenu diff --git a/components/spi_flash/esp32s3/spi_timing_config.c b/components/spi_flash/esp32s3/spi_timing_config.c index 978f4ebcb31..b96918a9ca1 100644 --- a/components/spi_flash/esp32s3/spi_timing_config.c +++ b/components/spi_flash/esp32s3/spi_timing_config.c @@ -146,8 +146,8 @@ static uint32_t spi_timing_config_get_dummy(void) abort(); } -#if CONFIG_SPI_FLASH_HPM_ENABLE - if (spi_flash_hpm_dummy_adjust()) { // HPM is enabled +#if CONFIG_SPI_FLASH_HPM_DC_ON + if (spi_flash_hpm_dummy_adjust()) { // HPM-DC is enabled const spi_flash_hpm_dummy_conf_t *hpm_dummy = spi_flash_hpm_get_dummy(); switch (ctrl_reg & MULTI_LINE_MASK_QUAD_FLASH) { case SPI_FLASH_QIO_MODE: @@ -167,7 +167,7 @@ static uint32_t spi_timing_config_get_dummy(void) } } else #endif - { // HPM is not enabled + { // HPM-DC is not enabled switch (ctrl_reg & MULTI_LINE_MASK_QUAD_FLASH) { case SPI_FLASH_QIO_MODE: return SPI1_R_QIO_DUMMY_CYCLELEN; diff --git a/components/spi_flash/esp_flash_spi_init.c b/components/spi_flash/esp_flash_spi_init.c index 6b69a0352df..516d6736ba0 100644 --- a/components/spi_flash/esp_flash_spi_init.c +++ b/components/spi_flash/esp_flash_spi_init.c @@ -333,7 +333,7 @@ esp_err_t esp_flash_init_default_chip(void) } #endif -#if CONFIG_SPI_FLASH_HPM_ENABLE +#if CONFIG_SPI_FLASH_HPM_DC_ON if (spi_flash_hpm_dummy_adjust()) { default_chip.hpm_dummy_ena = 1; } diff --git a/components/spi_flash/flash_ops.c b/components/spi_flash/flash_ops.c index 637fec94cc3..67e3c4d1723 100644 --- a/components/spi_flash/flash_ops.c +++ b/components/spi_flash/flash_ops.c @@ -187,12 +187,10 @@ esp_err_t IRAM_ATTR spi_flash_init_chip_state(void) #if CONFIG_ESPTOOLPY_OCT_FLASH return esp_opiflash_init(rom_spiflash_legacy_data->chip.device_id); #else -#if CONFIG_IDF_TARGET_ESP32S3 - // Currently, only esp32s3 allows high performance mode. +#if CONFIG_SPI_FLASH_HPM_ON return spi_flash_enable_high_performance_mode(); -#else +#endif // CONFIG_SPI_FLASH_HPM_ON return ESP_OK; -#endif // CONFIG_IDF_TARGET_ESP32S3 #endif // CONFIG_ESPTOOLPY_OCT_FLASH } diff --git a/components/spi_flash/include/esp_flash.h b/components/spi_flash/include/esp_flash.h index bfb7e88c1e5..bd34a97d4b4 100644 --- a/components/spi_flash/include/esp_flash.h +++ b/components/spi_flash/include/esp_flash.h @@ -172,6 +172,8 @@ esp_err_t esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size); esp_err_t esp_flash_get_physical_size(esp_flash_t *chip, uint32_t *flash_size); /** @brief Read flash unique ID via the common "RDUID" SPI flash command. + * + * @note This is an optional feature, which is not supported on all flash chips. READ PROGRAMMING GUIDE FIRST! * * @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init(). * @param[out] out_id Pointer to receive unique ID value. diff --git a/components/spi_flash/include/esp_private/spi_flash_os.h b/components/spi_flash/include/esp_private/spi_flash_os.h index f2a89112eb6..9fac59a21b8 100644 --- a/components/spi_flash/include/esp_private/spi_flash_os.h +++ b/components/spi_flash/include/esp_private/spi_flash_os.h @@ -139,9 +139,14 @@ bool spi_timing_is_tuned(void); */ void spi_flash_set_vendor_required_regs(void); +#if CONFIG_SPI_FLASH_HPM_ON /** * @brief Enable SPI flash high performance mode. * + * @note 1. When `CONFIG_SPI_FLASH_HPM_ON` is True, caller can always call this function without taking whether the used + * frequency falls into the HPM range into consideration. + * 2. However, caller shouldn't attempt to call this function on Octal flash. + * * @return ESP_OK if success. */ esp_err_t spi_flash_enable_high_performance_mode(void); @@ -161,6 +166,7 @@ const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void); * @return true Yes, and work under HPM with adjusting dummy. Otherwise, false. */ bool spi_flash_hpm_dummy_adjust(void); +#endif //CONFIG_SPI_FLASH_HPM_ON #ifdef __cplusplus } diff --git a/components/spi_flash/linker.lf b/components/spi_flash/linker.lf index 501e1fd415c..10098ec1041 100644 --- a/components/spi_flash/linker.lf +++ b/components/spi_flash/linker.lf @@ -15,6 +15,8 @@ entries: spi_flash_timing_tuning (noflash) spi_timing_config (noflash) spi_flash_chip_mxic_opi (noflash) + + if SPI_FLASH_HPM_ON = y: spi_flash_hpm_enable (noflash) if IDF_TARGET_ESP32S3 = y && ESPTOOLPY_OCT_FLASH = y: diff --git a/components/spi_flash/spi_flash_hpm_enable.c b/components/spi_flash/spi_flash_hpm_enable.c index d8f81a2e056..3d58b5dd6ad 100644 --- a/components/spi_flash/spi_flash_hpm_enable.c +++ b/components/spi_flash/spi_flash_hpm_enable.c @@ -29,14 +29,22 @@ * 3. Some flash chips adjust dummy cycles. ******************************************************************************/ -#if CONFIG_ESPTOOLPY_FLASHFREQ_120M -#define FLASH_FREQUENCY 120 -#elif CONFIG_ESPTOOLPY_FLASHFREQ_80M -#define FLASH_FREQUENCY 80 -#elif CONFIG_ESPTOOLPY_FLASHFREQ_40M -#define FLASH_FREQUENCY 40 -#elif CONFIG_ESPTOOLPY_FLASHFREQ_20M -#define FLASH_FREQUENCY 20 +/* + * Note: This file should only be compiled when HPM_ON, which is only available when !CONFIG_ESPTOOLPY_OCT_FLASH. + * However when HPM_ON, there are still some cases this file is not actually used: + * + * - !CONFIG_SPI_FLASH_UNDER_HIGH_FREQ: + * It mean that the flash not running under frequency requires HPM. spi_flash_enable_high_performance_mode() still + * called because caller shouldn't take care of the frequency. + */ + +void spi_flash_hpm_get_dummy_generic(spi_flash_hpm_dummy_conf_t *dummy_conf); + +#if CONFIG_SPI_FLASH_UNDER_HIGH_FREQ + +#if CONFIG_SPI_FLASH_HPM_AUTO +// This only happens on S3, where HPM_AUTO leads to HPM_ON +#warning High Performance Mode (QSPI Flash > 80MHz) is optional feature that depends on flash model. Read Docs First! #endif const static char *HPM_TAG = "flash HPM"; @@ -121,6 +129,7 @@ static esp_err_t spi_flash_high_performance_check_hpf_bit_5(void) //-----------------For flash chips which enter HPM via adjust dummy-----------------------// +#if CONFIG_SPI_FLASH_HPM_DC_ON /** * @brief Probe the chip whether adjust dummy to enable HPM mode. Take XMC as an example: * Adjust dummy bits to enable HPM mode of the flash. If XMC works under 80MHz, the dummy bits @@ -199,6 +208,14 @@ static void spi_flash_hpm_get_dummy_xmc(spi_flash_hpm_dummy_conf_t *dummy_conf) dummy_conf->qout_dummy = 8; dummy_conf->fastrd_dummy = 8; } +#elif !CONFIG_SPI_FLASH_HPM_DC_DISABLE + +//This is because bootloader doesn't support this +#warning HPM-DC, which helps to run some flash > 80MHz by adjusting dummy cycles, is no longer enabled by default. +#warning To enable this feature, your bootloader needs to have the support for it (by explicitly selecting BOOTLOADER_FLASH_DC_AWARE). +#warning If your bootloader does not support it, select SPI_FLASH_HPM_DC_DISABLE to suppress the warning. READ DOCS FIRST! + +#endif //CONFIG_SPI_FLASH_HPM_DC_ON //-----------------For flash chips which enter HPM via write status register-----------------------// @@ -248,33 +265,38 @@ static void spi_flash_turn_high_performance_write_hpf_bit_5(void) esp_rom_spiflash_wait_idle(&g_rom_flashchip); } -//-----------------------generic functions-------------------------------------// - -/** - * @brief Default dummy for almost all flash chips. If your flash does't need to reconfigure dummy, - * just call this function. - */ -void __attribute__((weak)) spi_flash_hpm_get_dummy_generic(spi_flash_hpm_dummy_conf_t *dummy_conf) -{ - dummy_conf->dio_dummy = 4; - dummy_conf->dout_dummy = 8; - dummy_conf->qio_dummy = 6; - dummy_conf->qout_dummy = 8; - dummy_conf->fastrd_dummy = 8; -} - const spi_flash_hpm_info_t __attribute__((weak)) spi_flash_hpm_enable_list[] = { /* vendor, chip_id, freq_threshold, temperature threshold, operation for setting high performance, reading HPF status, get dummy */ { "command", spi_flash_hpm_probe_chip_with_cmd, spi_flash_hpm_chip_hpm_requirement_check_with_cmd, spi_flash_enable_high_performance_send_cmd, spi_flash_high_performance_check_hpf_bit_5, spi_flash_hpm_get_dummy_generic }, +#if CONFIG_SPI_FLASH_HPM_DC_ON { "dummy", spi_flash_hpm_probe_chip_with_dummy, spi_flash_hpm_chip_hpm_requirement_check_with_dummy, spi_flash_turn_high_performance_reconfig_dummy, spi_flash_high_performance_check_dummy_sr, spi_flash_hpm_get_dummy_xmc}, +#endif //CONFIG_SPI_FLASH_HPM_DC_ON { "write sr3-bit5", spi_flash_hpm_probe_chip_with_write_hpf_bit_5, spi_flash_hpm_chip_hpm_requirement_check_with_write_hpf_bit_5, spi_flash_turn_high_performance_write_hpf_bit_5, spi_flash_high_performance_check_hpf_bit_5, spi_flash_hpm_get_dummy_generic}, // default: do nothing, but keep the dummy get function. The first item with NULL as its probe will be the fallback. { "NULL", NULL, NULL, NULL, NULL, spi_flash_hpm_get_dummy_generic}, }; static const spi_flash_hpm_info_t *chip_hpm = NULL; -static spi_flash_hpm_dummy_conf_t dummy_conf; -static bool hpm_dummy_changed = false; + +#if CONFIG_SPI_FLASH_HPM_DC_ON +static bool s_hpm_dummy_changed = false; +static spi_flash_hpm_dummy_conf_t s_dummy_conf; + +const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void) +{ + chip_hpm->flash_get_dummy(&s_dummy_conf); + return &s_dummy_conf; +} + +bool spi_flash_hpm_dummy_adjust(void) +{ + return s_hpm_dummy_changed; +} +#endif //CONFIG_SPI_FLASH_HPM_DC_ON + +#if CONFIG_ESPTOOLPY_FLASHFREQ_120M +#define FLASH_FREQUENCY 120 +#endif esp_err_t spi_flash_enable_high_performance_mode(void) { @@ -285,6 +307,21 @@ esp_err_t spi_flash_enable_high_performance_mode(void) int voltage = 0; int temperature = 0; +#if CONFIG_SPI_FLASH_HPM_AUTO + ESP_EARLY_LOGW(HPM_TAG, "HPM mode is optional feature that depends on flash model. Read Docs First!"); +#endif + +#if CONFIG_SPI_FLASH_HPM_DC_DISABLE + // case 1: force disabled + ESP_EARLY_LOGI(HPM_TAG, "w/o HPM-DC support"); +#elif CONFIG_SPI_FLASH_HPM_DC_ON + // case 2: auto, and actually enabled + ESP_EARLY_LOGI(HPM_TAG, "with HPM-DC support"); +#else + // case 3: auto, but disabled (not supported by bootloader) + ESP_EARLY_LOGW(HPM_TAG, "HPM mode with DC adjustment is disabled. Some flash models may not be supported. Read Docs First!"); +#endif + const spi_flash_hpm_info_t *chip = spi_flash_hpm_enable_list; esp_err_t ret = ESP_OK; while (chip->probe) { @@ -296,10 +333,12 @@ esp_err_t spi_flash_enable_high_performance_mode(void) } chip_hpm = chip; + /* When > 80 MHz, flash chips usually need special HPM support to run normally. The support is chip-specific. When + * the chip is not in the known flash list, nothing will be done and there will be an warning. + * When <= 80 MHz, it's assumed that all flash chips can run without chip-specific HPM support. This function will not be called and there will be no warning. + */ if (ret != ESP_OK) { -#if (FLASH_FREQUENCY == 120) - ESP_EARLY_LOGW(HPM_TAG, "Flash high performance mode hasn't been supported"); -#endif + ESP_EARLY_LOGW(HPM_TAG, "High performance mode of this flash model hasn't been supported."); return ret; } @@ -313,21 +352,50 @@ esp_err_t spi_flash_enable_high_performance_mode(void) ESP_EARLY_LOGE(HPM_TAG, "Flash high performance mode hasn't been executed successfully"); return ESP_FAIL; } - hpm_dummy_changed = (hpm_requirement_check == SPI_FLASH_HPM_DUMMY_NEEDED) ? true : false; +#if CONFIG_SPI_FLASH_HPM_DC_ON + s_hpm_dummy_changed = (hpm_requirement_check == SPI_FLASH_HPM_DUMMY_NEEDED) ? true : false; +#else + assert(hpm_requirement_check != SPI_FLASH_HPM_DUMMY_NEEDED); +#endif } else if (hpm_requirement_check == SPI_FLASH_HPM_BEYOND_LIMIT) { ESP_EARLY_LOGE(HPM_TAG, "Flash does not have the ability to raise to that frequency"); return ESP_FAIL; } return ESP_OK; } +#else +//!CONFIG_SPI_FLASH_UNDER_HIGH_FREQ + +static spi_flash_hpm_dummy_conf_t s_dummy_conf; + +esp_err_t spi_flash_enable_high_performance_mode(void) +{ + return ESP_OK; +} const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void) { - chip_hpm->flash_get_dummy(&dummy_conf); - return &dummy_conf; + spi_flash_hpm_get_dummy_generic(&s_dummy_conf); + return &s_dummy_conf; } bool spi_flash_hpm_dummy_adjust(void) { - return hpm_dummy_changed; + return false; +} +#endif //CONFIG_SPI_FLASH_UNDER_HIGH_FREQ + +//-----------------------generic functions-------------------------------------// + +/** + * @brief Default dummy for almost all flash chips. If your flash does't need to reconfigure dummy, + * just call this function. + */ +void __attribute__((weak)) spi_flash_hpm_get_dummy_generic(spi_flash_hpm_dummy_conf_t *dummy_conf) +{ + dummy_conf->dio_dummy = SPI_FLASH_DIO_DUMMY_BITLEN; + dummy_conf->dout_dummy = SPI_FLASH_DOUT_DUMMY_BITLEN; + dummy_conf->qio_dummy = SPI_FLASH_QIO_DUMMY_BITLEN; + dummy_conf->qout_dummy = SPI_FLASH_QOUT_DUMMY_BITLEN; + dummy_conf->fastrd_dummy = SPI_FLASH_FASTRD_DUMMY_BITLEN; } diff --git a/docs/en/api-reference/storage/spi_flash_optional_feature.rst b/docs/en/api-reference/storage/spi_flash_optional_feature.rst index 93e52a829eb..d79079bb258 100644 --- a/docs/en/api-reference/storage/spi_flash_optional_feature.rst +++ b/docs/en/api-reference/storage/spi_flash_optional_feature.rst @@ -15,7 +15,7 @@ Some features are not supported on all ESP chips and Flash chips. You can check .. note:: - - The features listed above needs to be supported by both esp chips and flash chips. + When Flash optional features listed in this page are used, aside from the capability of ESP chips, and ESP-IDF verison you are using, you will also need to make sure these features are supported by flash chips used. - If you are using an official Espressif modules/SiP. Some of the modules/SiPs always support the feature, in this case you can see these features listed in the datasheet. Otherwise please contact `Espressif's business team `_ to know if we can supply such products for you. @@ -28,28 +28,29 @@ Some features are not supported on all ESP chips and Flash chips. You can check Auto Suspend & Resume --------------------- -.. only:: esp32c3 +This feature is only supported on ESP32-C3 for now. + +The support for ESP32-S3 may be added in the future. - You can refer to :ref:`auto-suspend` for more information about this feature. The support list is as follows. +.. only:: esp32c3 -ESP Chips List: + List of Flash chips that support this feature: -1. ESP32C3 + 1. XM25QxxC series. -Flash Chips List: + .. attention:: -1. XM25QxxC series. + There are multiple limitations about the auto-suspend feature, please do read :ref:`auto-suspend` for more information before you enable this feature. Flash unique ID --------------- -Unique ID is not flash id, which means flash has 64-Bit unique ID for each device. The instruction to read the unique ID (4Bh) accesses a factory-set read-only 64-bit number that is unique to each flash device. This ID number helps you to recognize each single device. Not all flash vendors support this feature. If you try to read the unique ID on a chip which does not have this feature, the behavior is not determined. The support list is as follows. +This feature is supported on all Espressif chips. -ESP Chips Lists: +Unique ID is not flash id, which means flash has 64-Bit unique ID for each device. The instruction to read the unique ID (4Bh) accesses a factory-set read-only 64-bit number that is unique to each flash device. This ID number helps you to recognize each single device. Not all flash vendors support this feature. If you try to read the unique ID on a chip which does not have this feature, the behavior is not determined. The support list is as follows. -ALL -Flash Chips List: +List of Flash chips that support this feature: 1. ISSI 2. GD @@ -62,30 +63,73 @@ Flash Chips List: High performance mode --------------------- -.. note:: +This featuer is only supported on ESP32-S3 for now. - This section is provided for Dual mode (DOUT/DIO) and Quad mode (QIO/QOUT) flash chips. Octal flash used on ESP-chips support High performance mode by default so far, you can refer to the octal flash support list below. +The support for ESP32-S2, ESP32-C3 may be added in the future. -High performance mode (HPM) means that the SPI1 and flash chip works under high frequency. Usually, when the operating frequency of the flash is greater than 80MHz, it is considered that the flash works under HPM. As far as we acknowledged, flash chips have more than two different coping strategies when flash work under HPM. For some flash chips, HPM is controlled by high performance flag (HPF) in status register and for some flash chips, HPM is controlled by dummy cycle bit. +.. only:: esp32s3 -For following conditions, IDF start code deals with HPM internally. + .. note:: -ESP Chips List: + This section is provided for Dual mode (DOUT/DIO) and Quad mode (QIO/QOUT) flash chips. Octal flash used on ESP-chips support High performance mode by default so far, you can refer to the octal flash support list below. -1. ESP32S3 + High performance mode (HPM) means that the SPI1 and flash chip works under high frequency. Usually, when the operating frequency of the flash is greater than 80 MHz, it is considered that the flash works under HPM. -Flash Chips (name & ID) List: + As far as we acknowledged, there are more than three strategies for High Performance Mode (HPM) in typical SPI flash parts. For some flash chips, HPM is controlled by dummy cycle bit in the registers, while for other chips, it can be controlled by other bits (like HPM bit) in the register, or some special command. The difference in strategies requires the driver to explicitly add support for each chip. -1. GD25Q64C (ID: 0xC84017) -2. GD25Q32C (ID: 0xC84016) + .. attention:: -.. attention:: + It is hard to create several strategies to cover all situations, so all flash chips using HPM need to be supported explicitly. Therefore, if you try to use a flash not listed in :ref:`hpm_dc_support_list`, it might cause some error. So, when you try to use the flash chip beyond supported list, please test properly. + + Moreover, when the `Dummy Cycle adjustment` strategy is adopted by the flash chip, the flash remains in a state in which DC is different from the default value after a software reset. The sub mode of HPM that adjusts the dummy cycle to run at higher frequency in the application is called `HPM-DC`. `HPM-DC` feature needs a feature `DC Aware` to be enabled in the bootloader. Otherwise different DC value will forbid the 2nd bootloader from being boot up after reset. + + To enable High Performance Mode: + + 1. De-select :ref:`CONFIG_ESPTOOLPY_OCT_FLASH`. HPM is not used for Octal flash, enabling related options may bypass HPM functions. + + 2. Enable ``CONFIG_SPI_FLASH_HPM_ENA`` option. + + 3. Switch Flash frequency to HPM ones. For example, ``CONFIG_ESPTOOLPY_FLASHFREQ_120M``. + + 4. Make sure the config option for `HPM-DC` feature (under ``CONFIG_SPI_FLASH_HPM_DC`` choices) is selected correctly according to whether the bootloader supports `DC Aware`. + + - If bootloader supports `DC Aware`, select ``CONFIG_SPI_FLASH_HPM_DC_AUTO``. This allows the usage of flash chips that adopted `Dummy Cycle adjustment` strategy. + + - If bootloader doesn't support `DC Aware`, select ``CONFIG_SPI_FLASH_HPM_DC_DISABLE``. It avoid consequences caused by running HPM-DC with non-DC-aware bootloaders. But please avoid using flash chips that adopts `Dummy Cycle adjustment` strategy if ``CONFIG_SPI_FLASH_HPM_DC_DISABLE`` is selected. See list of flash models that adpot DC strategy below. + + Check whether the bootloader supports `DC Aware` in the following way: - It is hard to create several strategies to cover all situations, so all flash chips using HPM need to be supported explicitly. Therefore, if you try to use a flash not listed as supported under high performance mode, it might cause some error. So, when you try to use the flash chip beyond supported list, please test properly. + - If you are starting a new project, it's suggested to enable `DC Aware` by selecting :ref:`CONFIG_BOOTLOADER_FLASH_DC_AWARE` option in the bootloader menu. Please note that, you won't be able to modify this option via OTA, because the support is in the bootloader. + + - If you are working on an existing project and want to update `HPM-DC` config option in the app via OTA, check the sdkconfig file used to build your bootloader: (Upgrading ESP-IDF version may make this file different from the one used by bootloader to build.) + + - For latest version (ESP-IDF v4.4.7+, v5.2 and above), if :ref:`CONFIG_BOOTLOADER_FLASH_DC_AWARE` is selected, the bootloader supports `DC Aware`. + + - For versions in this range: (v4.4.4-v4.4.6, v5.0+, and v5.1+), if ``CONFIG_ESPTOOLPY_FLASHFREQ_120M`` is selected, the bootloader supports `DC Aware`. In this case, enable :ref:`CONFIG_BOOTLOADER_FLASH_DC_AWARE` to confirm this (though it will not affect bootloader in devices in the field). + + - For versions below v4.4.4, the bootloader doesn't support `DC Aware`. + + .. _hpm_dc_support_list: + + Quad Flash HPM support list + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Flash chips that don't need HPM-DC: + + 1. GD25Q64C (ID: 0xC84017) + 2. GD25Q32C (ID: 0xC84016) + 3. ZB25VQ32B (ID: 0x5E4016) + + Following flash chips also have HPM feature, but requires the bootloader to support `DC Aware`: + + 1. GD25Q64E (ID: 0xC84017) + 2. GD25Q128E (ID: 0xC84018) OPI flash support ----------------- +This feature is only supporetd on ESP32-S3 for now. + OPI flash means that the flash chip supports octal peripheral interface, which has octal I/O pins. Different octal flash has different configurations and different commands. Hence, it is necessary to carefully check the support list. .. only:: esp32s3 @@ -94,24 +138,23 @@ OPI flash means that the flash chip supports octal peripheral interface, which h To know how to configure menuconfig for a board with different Flash and PSRAM, please refer to the :ref:`SPI Flash and External SPI RAM Configuration ` -ESP Chips List: - -1. ESP32S3 + List of Flash chips that support this feature: -Flash Chips List: - -1. MX25UM25645G + 1. MX25UM25645G + 2. MX25UM12345G 32-bit Address Flash Chips -------------------------- -Most NOR flash chips used by Espressif chips use 24-bits address, which can cover 16 MBytes memory. However, for larger memory (usually equal to or larger than 16 MBytes), flash uses a 32-bits address to address larger memory. Regretfully, 32-bits address chips have vendor-specific commands, so we need to support the chips one by one. +This feature is supported on all Espressif chips (with various restrictions to application). -ESP Chips List: - -ALL ESP Chips support this. +Most NOR flash chips used by Espressif chips use 24-bits address, which can cover 16 MBytes memory. However, for larger memory (usually equal to or larger than 16 MBytes), flash uses a 32-bits address to address larger memory. Regretfully, 32-bits address chips have vendor-specific commands, so we need to support the chips one by one. -Flash Chips List: +List of Flash chips that support this feature: 1. W25Q256 2. GD25Q256 + +.. important:: + + Over 16 MBytes space on flash mentioned above can be only used for ``data saving``, like file system. If your data/instructions over 16 MBytes spaces need to be mapped to MMU (so as to be accessed by the CPU), please upgrade to ESP-IDF v5.2 and read the latest docs. diff --git a/tools/kconfig_new/gen_kconfig_doc.py b/tools/kconfig_new/gen_kconfig_doc.py index 0ba78cb80d6..5d96e483095 100644 --- a/tools/kconfig_new/gen_kconfig_doc.py +++ b/tools/kconfig_new/gen_kconfig_doc.py @@ -7,21 +7,8 @@ # generated, allowing options to be referenced in other documents # (using :ref:`CONFIG_FOO`) # -# Copyright 2017-2020 Espressif Systems (Shanghai) PTE LTD -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http:#www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from __future__ import print_function - +# SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 import re import kconfiglib @@ -108,6 +95,8 @@ def node_is_invisible(item): return (False, None) def _visible(self, node): + if node.item == kconfiglib.COMMENT: + return (False, None) if isinstance(node.item, kconfiglib.Symbol) or isinstance(node.item, kconfiglib.Choice): dependencies = node.item.direct_dep # "depends on" for configs name_id = node.item.name @@ -159,7 +148,7 @@ def write_docs(config, visibility, filename): def node_is_menu(node): try: - return node.item == kconfiglib.MENU or node.is_menuconfig + return node.item in [kconfiglib.MENU, kconfiglib.COMMENT] or node.is_menuconfig except AttributeError: return False # not all MenuNodes have is_menuconfig for some reason diff --git a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr index 537b02e9fde..b2625493196 100644 --- a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr +++ b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr @@ -1,5 +1,7 @@ # Legacy, F4R4, Flash 120M SDR, PSRAM disable CONFIG_SPI_FLASH_USE_LEGACY_IMPL=y +CONFIG_SPI_FLASH_HPM_ENA=y CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y diff --git a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_120sdr b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_120sdr index 9e2cf2e9f7c..eda1fed0772 100644 --- a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_120sdr +++ b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_120sdr @@ -1,7 +1,9 @@ # Legacy, F4R4, Flash 120M SDR, PSRAM 120M SDR CONFIG_SPI_FLASH_USE_LEGACY_IMPL=y +CONFIG_SPI_FLASH_HPM_ENA=y CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM_SPEED_120M=y diff --git a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_40sdr b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_40sdr index 05d6318a64e..d8284127cdb 100644 --- a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_40sdr +++ b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_40sdr @@ -1,7 +1,9 @@ # Legacy, F4R4, Flash 120M SDR, PSRAM 40M SDR CONFIG_SPI_FLASH_USE_LEGACY_IMPL=y +CONFIG_SPI_FLASH_HPM_ENA=y CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM_SPEED_40M=y diff --git a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_os_silent b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_os_silent index 41cbec6a1ef..a6bb08b12c3 100644 --- a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_os_silent +++ b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r4_120sdr_os_silent @@ -5,5 +5,7 @@ CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y CONFIG_SPI_FLASH_USE_LEGACY_IMPL=y +CONFIG_SPI_FLASH_HPM_ENA=y CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y diff --git a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r8_120sdr b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r8_120sdr index 2caeb8de79a..03b00c420c9 100644 --- a/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r8_120sdr +++ b/tools/test_apps/system/flash_psram/sdkconfig.ci.f4r8_120sdr @@ -1,5 +1,7 @@ # Legacy, F4R8, Flash 120M SDR, PSRAM disable CONFIG_SPI_FLASH_USE_LEGACY_IMPL=y +CONFIG_SPI_FLASH_HPM_ENA=y CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y