mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-09 22:21:10 +00:00
feat(esp_hw_support): support power down PSRAM or Flash during sleep for esp32p4 v1.0
This commit is contained in:
@@ -8,8 +8,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/chip_revision.h"
|
||||
#include "esp_bit_defs.h"
|
||||
#include "hal/misc.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/pmu_types.h"
|
||||
#include "soc/pmu_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -122,6 +125,10 @@ __attribute__((always_inline))
|
||||
static inline void ldo_ll_enable(int ldo_unit, bool enable)
|
||||
{
|
||||
uint8_t index_array[LDO_LL_NUM_UNITS] = {0, 3, 1, 4};
|
||||
if (ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 100) && (ldo_unit == 0)) {
|
||||
// If chip_rev >= v1.0, slp_mem_dbias[3] is used to control the volt output of VO1.
|
||||
PMU.hp_sys[PMU_MODE_HP_ACTIVE].regulator0.xpd_0p1a = (enable ? 8 : 0);
|
||||
}
|
||||
PMU.ext_ldo[index_array[ldo_unit]].pmu_ext_ldo.xpd = enable;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user