mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(spi_flash): Adjust flash clock to real 80M clock, and support 32bit address on eco1
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#include "hal/spi_flash_hal.h"
|
||||
#include "hal/assert.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/chip_revision.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#define ADDRESS_MASK_24BIT 0xFFFFFF
|
||||
@@ -130,6 +132,19 @@ esp_err_t spi_flash_hal_configure_host_io_mode(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
// TODO: This is temporarily for ESP32P4-ECO0, please remove it when eco0 is not widly used. IDF-10019
|
||||
unsigned chip_version = efuse_hal_chip_revision();
|
||||
if (unlikely(!ESP_CHIP_REV_ABOVE(chip_version, 1))) {
|
||||
if (conf_required) {
|
||||
int line_width = (io_mode == SPI_FLASH_DIO? 2: 4);
|
||||
dummy_cyclelen_base -= SPI_FLASH_LL_CONTINUOUS_MODE_BIT_NUMS / line_width;
|
||||
addr_bitlen += SPI_FLASH_LL_CONTINUOUS_MODE_BIT_NUMS;
|
||||
spi_flash_ll_set_extra_address(dev, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (command >= 0x100) {
|
||||
spi_flash_ll_set_command(dev, command, 16);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user