mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 21:10:20 +00:00
feat(spi_flash): Adjust flash clock to real 80M clock, and support 32bit address on eco1
This commit is contained in:
@@ -41,11 +41,13 @@
|
||||
#include "hal/cache_hal.h"
|
||||
#include "hal/clk_tree_ll.h"
|
||||
#include "hal/lpwdt_ll.h"
|
||||
#include "hal/spimem_flash_ll.h"
|
||||
#include "soc/lp_wdt_reg.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "soc/regi2c_syspll.h"
|
||||
#include "soc/regi2c_cpll.h"
|
||||
#include "soc/regi2c_bias.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
||||
static const char *TAG = "boot.esp32p4";
|
||||
|
||||
@@ -90,6 +92,7 @@ static void bootloader_super_wdt_auto_feed(void)
|
||||
|
||||
static inline void bootloader_hardware_init(void)
|
||||
{
|
||||
int __DECLARE_RCC_ATOMIC_ENV __attribute__ ((unused));
|
||||
// regi2c is enabled by default on ESP32P4, do nothing
|
||||
unsigned chip_version = efuse_hal_chip_revision();
|
||||
if (!ESP_CHIP_REV_ABOVE(chip_version, 1)) {
|
||||
@@ -101,6 +104,12 @@ static inline void bootloader_hardware_init(void)
|
||||
}
|
||||
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_1P1, 10);
|
||||
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_1P1_PVT, 10);
|
||||
|
||||
// IDF-10019 TODO: This is temporarily for ESP32P4-ECO0, please remove it when eco0 is not widly used.
|
||||
if (likely(ESP_CHIP_REV_ABOVE(chip_version, 1))) {
|
||||
spimem_flash_ll_select_clk_source(0, FLASH_CLK_SRC_SPLL);
|
||||
spimem_ctrlr_ll_set_core_clock(0, 6);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void bootloader_ana_reset_config(void)
|
||||
|
Reference in New Issue
Block a user