From 6a234c93658ba2c85c5f5c7ddcf6f2c0dd2bb7b3 Mon Sep 17 00:00:00 2001 From: Danh Doan Date: Mon, 4 Nov 2024 15:02:08 +0700 Subject: [PATCH] drivers: entropy: Add support for SCE5 to entropy driver add support SCE5 to entropy driver for Renesas RA Signed-off-by: Danh Doan --- drivers/entropy/Kconfig.renesas_ra | 3 ++- drivers/entropy/entropy_renesas_ra.c | 1 + dts/bindings/rng/renesas,ra-sce5-rng.yaml | 8 ++++++++ modules/Kconfig.renesas_fsp | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 dts/bindings/rng/renesas,ra-sce5-rng.yaml diff --git a/drivers/entropy/Kconfig.renesas_ra b/drivers/entropy/Kconfig.renesas_ra index 90bb5be7871db4..8d96f4097848ec 100644 --- a/drivers/entropy/Kconfig.renesas_ra +++ b/drivers/entropy/Kconfig.renesas_ra @@ -6,7 +6,8 @@ config ENTROPY_RENESAS_RA bool "Renesas RA TRNG driver" default y - depends on DT_HAS_RENESAS_RA_RSIP_E51A_TRNG_ENABLED || DT_HAS_RENESAS_RA_SCE7_RNG_ENABLED + depends on DT_HAS_RENESAS_RA_RSIP_E51A_TRNG_ENABLED || DT_HAS_RENESAS_RA_SCE7_RNG_ENABLED \ + || DT_HAS_RENESAS_RA_SCE5_RNG_ENABLED select ENTROPY_HAS_DRIVER select USE_RA_FSP_SCE help diff --git a/drivers/entropy/entropy_renesas_ra.c b/drivers/entropy/entropy_renesas_ra.c index 318fd920810c37..7537d1c05f90bc 100644 --- a/drivers/entropy/entropy_renesas_ra.c +++ b/drivers/entropy/entropy_renesas_ra.c @@ -48,4 +48,5 @@ static int entropy_renesas_ra_init(const struct device *dev) CONFIG_ENTROPY_INIT_PRIORITY, &entropy_renesas_ra_api) DT_FOREACH_STATUS_OKAY(renesas_ra_rsip_e51a_trng, RENESAS_RA_ENTROPY_INIT) +DT_FOREACH_STATUS_OKAY(renesas_ra_sce5_rng, RENESAS_RA_ENTROPY_INIT) DT_FOREACH_STATUS_OKAY(renesas_ra_sce7_rng, RENESAS_RA_ENTROPY_INIT) diff --git a/dts/bindings/rng/renesas,ra-sce5-rng.yaml b/dts/bindings/rng/renesas,ra-sce5-rng.yaml new file mode 100644 index 00000000000000..f34853cef346bd --- /dev/null +++ b/dts/bindings/rng/renesas,ra-sce5-rng.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Renesas Electronics Corporation +# SPDX-License-Identifier: Apache-2.0 + +description: Renesas RA SCE5 TRNG + +compatible: "renesas,ra-sce5-rng" + +include: base.yaml diff --git a/modules/Kconfig.renesas_fsp b/modules/Kconfig.renesas_fsp index a13152f6da2c6b..960d03ab1808ea 100644 --- a/modules/Kconfig.renesas_fsp +++ b/modules/Kconfig.renesas_fsp @@ -61,6 +61,13 @@ config HAS_RENESAS_RA_SCE7 help Includes SCE7 implementation for SCE driver +config HAS_RENESAS_RA_SCE5 + bool + default y + depends on DT_HAS_RENESAS_RA_SCE5_RNG_ENABLED + help + Includes SCE5 implementation for SCE driver + endif config USE_RA_FSP_SPI_B