feat(spi_flash): Add exclusive support for ESP32H4

Add 32bit addr support for esp32s31 as well
This commit is contained in:
Song Ruo Jing
2026-06-08 17:56:09 +08:00
parent c9eced7205
commit 545b31e6b9
35 changed files with 647 additions and 356 deletions
@@ -69,7 +69,6 @@
#elif CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32H21 || CONFIG_IDF_TARGET_ESP32H4
// Just use the same pins for HSPI
#define SPI2_PIN_NUM_MOSI 5
#define SPI2_PIN_NUM_MISO 0
#define SPI2_PIN_NUM_CLK 4
@@ -600,7 +600,7 @@ TEST_CASE_MULTI_FLASH_IGNORE("Test esp_flash_write can toggle QE bit", test_togg
#if CONFIG_IDF_TARGET_ESP32C2
uint8_t flash_frequency_table[4] = {5, 10, 20, 40};
#elif CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32H21 || CONFIG_IDF_TARGET_ESP32H4
uint8_t flash_frequency_table[4] = {6, 12, 24, 48};
uint8_t flash_frequency_table[3] = {8, 16, 32}; // + 64
#else
uint8_t flash_frequency_table[6] = {5, 10, 20, 26, 40, 80};
#endif
@@ -122,7 +122,7 @@ TEST_CASE("flash write and erase work both on PRO CPU and on APP CPU", "[spi_fla
}
// TODO: This test is disabled on S3 with legacy impl - IDF-3505
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32, ESP32S2, ESP32S3, ESP32C3, ESP32P4, ESP32S31)
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32, ESP32S2, ESP32S3, ESP32C3, ESP32P4, ESP32S31, ESP32H4)
#if CONFIG_FREERTOS_NUMBER_OF_CORES > 1
typedef struct {