diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c index fa2db59a6fd..65cb798ae34 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c @@ -461,7 +461,7 @@ int esp_bringup(void) } #endif /* CONFIG_ESPRESSIF_LEDC */ -#ifdef CONFIG_ESPRESSIF_AUTO_SLEEP +#ifdef CONFIG_PM /* Configure PM */ ret = esp_pmconfigure(); diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c index 78c6668e2c6..6340b3cf730 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c @@ -509,7 +509,7 @@ int esp_bringup(void) } #endif -#ifdef CONFIG_ESPRESSIF_AUTO_SLEEP +#ifdef CONFIG_PM /* Configure PM */ ret = esp_pmconfigure(); diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c index 8c4120eff80..b45476008b6 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c @@ -451,7 +451,7 @@ int esp_bringup(void) } #endif -#ifdef CONFIG_ESPRESSIF_AUTO_SLEEP +#ifdef CONFIG_PM /* Configure PM */ ret = esp_pmconfigure(); diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c index 5b6b1cf2265..ca25f2aee8f 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c @@ -109,6 +109,10 @@ # include "esp_board_adc.h" #endif +#ifdef CONFIG_PM +# include "espressif/esp_pm.h" +#endif + #ifdef CONFIG_SYSTEM_NXDIAG_ESPRESSIF_CHIP_WO_TOOL # include "espressif/esp_nxdiag.h" #endif @@ -423,6 +427,16 @@ int esp_bringup(void) } #endif +#ifdef CONFIG_PM + /* Configure PM */ + + ret = esp_pmconfigure(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: esp_pmconfigure failed: %d\n", ret); + } +#endif + #ifdef CONFIG_SYSTEM_NXDIAG_ESPRESSIF_CHIP_WO_TOOL ret = esp_nxdiag_initialize(); if (ret < 0)