From 583f5b4de32f9aa90451065119dd1dcc83654619 Mon Sep 17 00:00:00 2001 From: gaoxu Date: Fri, 26 Jun 2026 10:55:15 +0800 Subject: [PATCH] feat(rng): basic rng support on ESP32-H21 --- .../src/bootloader_random_esp32h21.c | 18 ++++++++++++++++++ .../esp32h21/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32h21/include/soc/soc_caps.h | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 components/bootloader_support/src/bootloader_random_esp32h21.c diff --git a/components/bootloader_support/src/bootloader_random_esp32h21.c b/components/bootloader_support/src/bootloader_random_esp32h21.c new file mode 100644 index 00000000000..071ea905cfc --- /dev/null +++ b/components/bootloader_support/src/bootloader_random_esp32h21.c @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include "sdkconfig.h" +#include "bootloader_random.h" + + +void bootloader_random_enable(void) +{ + +} + +void bootloader_random_disable(void) +{ + +} diff --git a/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in index 8e8dce4b523..64dcec968de 100644 --- a/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in @@ -171,6 +171,10 @@ config SOC_SPI_EXTERNAL_NOR_FLASH_SUPPORTED bool default y +config SOC_RNG_SUPPORTED + bool + default y + config SOC_MODEM_CLOCK_SUPPORTED bool default y diff --git a/components/soc/esp32h21/include/soc/soc_caps.h b/components/soc/esp32h21/include/soc/soc_caps.h index 5ed34d361de..2311357e61c 100644 --- a/components/soc/esp32h21/include/soc/soc_caps.h +++ b/components/soc/esp32h21/include/soc/soc_caps.h @@ -71,7 +71,7 @@ #define SOC_RTC_WDT_SUPPORTED 1 #define SOC_SPI_FLASH_SUPPORTED 1 #define SOC_SPI_EXTERNAL_NOR_FLASH_SUPPORTED 1 -// #define SOC_RNG_SUPPORTED 1 //TODO: [ESP32H21] IDF-11503 +#define SOC_RNG_SUPPORTED 1 #define SOC_MODEM_CLOCK_SUPPORTED 1 #define SOC_REGI2C_SUPPORTED 1 #define SOC_PHY_SUPPORTED 1