From 2eb686f72fae057e8863ce18de14cb09d0e35eb1 Mon Sep 17 00:00:00 2001 From: Eren Terzioglu Date: Fri, 17 Apr 2026 11:02:36 +0200 Subject: [PATCH] board/risc-v/espressif: Add ULP wakeup modes board support Add ULP wakeup modes board support for esp32[-c6|-p4] Signed-off-by: Eren Terzioglu --- .../esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c | 12 +++++++++--- .../esp32p4-function-ev-board/src/esp32p4_bringup.c | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) 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 6340b3cf730..d0f08c72046 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c @@ -543,11 +543,17 @@ int esp_bringup(void) * peripherals to use supported peripherals properly on ULP core */ - esp_ulp_init(); - + ret = esp_ulp_init(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: esp_ulp_init failed: %d\n", ret); + } + else + { # ifdef CONFIG_ESPRESSIF_ULP_USE_TEST_BIN - esp_ulp_load_bin((char *)esp_ulp_bin, esp_ulp_bin_len); + esp_ulp_load_bin((char *)esp_ulp_bin, esp_ulp_bin_len); # endif + } #endif #ifdef CONFIG_NET_OA_TC6 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 ca25f2aee8f..318a19bc152 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 @@ -459,11 +459,17 @@ int esp_bringup(void) * peripherals to use supported peripherals properly on ULP core */ - esp_ulp_init(); - + ret = esp_ulp_init(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: esp_ulp_init failed: %d\n", ret); + } + else + { # ifdef CONFIG_ESPRESSIF_ULP_USE_TEST_BIN - esp_ulp_load_bin((char *)esp_ulp_bin, esp_ulp_bin_len); + esp_ulp_load_bin((char *)esp_ulp_bin, esp_ulp_bin_len); # endif + } #endif /* If we got here then perhaps not all initialization was successful, but