feat(esp_hw_support): disable all unused pll source in rtc_clk_init to save power

This commit is contained in:
wuzhenghui
2026-07-22 16:32:12 +08:00
parent 7c75525edd
commit 90cb8a760d
4 changed files with 36 additions and 4 deletions
@@ -34,7 +34,6 @@
#include "esp_rom_sys.h"
#include "soc/regi2c_bias.h"
#include "hal/regi2c_ctrl.h"
#include "hal/clk_tree_ll.h"
#include "hal/psram_ctrlr_ll.h"
ESP_LOG_ATTR_TAG(TAG, "boot.esp32s31");
@@ -61,11 +60,11 @@ 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);
/* Disable MPLL by default, during mmu_hal_init, a valid clock source is required for the PSRAM,
so before shutting down mpll, the PSRAM clock source should be selected to an always-on source. */
/* During mmu_hal_init, a valid clock source is required for the PSRAM,
so before shutting down MPLL in rtc_clk_init, the PSRAM clock source
should be selected to an always-on source. */
_psram_ctrlr_ll_select_clk_source(PSRAM_CTRLR_LL_MSPI_ID_2, PSRAM_CLK_SRC_XTAL);
_psram_ctrlr_ll_select_clk_source(PSRAM_CTRLR_LL_MSPI_ID_3, PSRAM_CLK_SRC_XTAL);
clk_ll_mpll_disable();
}
void bootloader_enable_cpu_reset_info(void)