From d5b26b808aba3b416955574212968590395ff45e Mon Sep 17 00:00:00 2001 From: Danh Doan Date: Wed, 13 Nov 2024 11:22:54 +0700 Subject: [PATCH] boards: renesas: add board support entropy driver using TRNG add support entropy for board: EK_RA6E2, EK_RA4E2, EK_RA2A1 Signed-off-by: Danh Doan Signed-off-by: Khoa Nguyen --- boards/renesas/ek_ra2a1/doc/index.rst | 2 ++ boards/renesas/ek_ra2a1/ek_ra2a1.dts | 5 +++++ boards/renesas/ek_ra4e2/doc/index.rst | 2 ++ boards/renesas/ek_ra4e2/ek_ra4e2.dts | 5 +++++ boards/renesas/ek_ra6e2/doc/index.rst | 2 ++ boards/renesas/ek_ra6e2/ek_ra6e2.dts | 5 +++++ boards/renesas/fpb_ra6e2/doc/index.rst | 2 ++ boards/renesas/fpb_ra6e2/fpb_ra6e2.dts | 5 +++++ dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi | 5 +++++ dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi | 5 +++++ dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi | 5 +++++ 11 files changed, 43 insertions(+) diff --git a/boards/renesas/ek_ra2a1/doc/index.rst b/boards/renesas/ek_ra2a1/doc/index.rst index 365a9c2e04efff..6b9d4876519140 100644 --- a/boards/renesas/ek_ra2a1/doc/index.rst +++ b/boards/renesas/ek_ra2a1/doc/index.rst @@ -82,6 +82,8 @@ hardware features: +-----------+------------+-------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------+ +| ENTROPY | on-chip | entropy | ++-----------+------------+-------------------------------+ The default configuration can be found in :zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a1_defconfig` diff --git a/boards/renesas/ek_ra2a1/ek_ra2a1.dts b/boards/renesas/ek_ra2a1/ek_ra2a1.dts index 1bb06419ca957c..fd216b546e4e5b 100644 --- a/boards/renesas/ek_ra2a1/ek_ra2a1.dts +++ b/boards/renesas/ek_ra2a1/ek_ra2a1.dts @@ -19,6 +19,7 @@ zephyr,flash = &flash0; zephyr,console = &uart0; zephyr,shell-uart = &uart0; + zephyr,entropy = &trng; }; leds { @@ -69,3 +70,7 @@ &ioport1 { status = "okay"; }; + +&trng { + status = "okay"; +}; diff --git a/boards/renesas/ek_ra4e2/doc/index.rst b/boards/renesas/ek_ra4e2/doc/index.rst index cc2eb04af0d96e..cee737af0eff16 100644 --- a/boards/renesas/ek_ra4e2/doc/index.rst +++ b/boards/renesas/ek_ra4e2/doc/index.rst @@ -100,6 +100,8 @@ The below features are currently supported on Zephyr OS for EK-RA4E2 board: +-----------+------------+----------------------+ | SPI | on-chip | spi | +-----------+------------+----------------------+ +| ENTROPY | on-chip | entropy | ++-----------+------------+----------------------+ Other hardware features are currently not supported by the port. diff --git a/boards/renesas/ek_ra4e2/ek_ra4e2.dts b/boards/renesas/ek_ra4e2/ek_ra4e2.dts index 3cd0817d35751b..1510994bc5f16c 100644 --- a/boards/renesas/ek_ra4e2/ek_ra4e2.dts +++ b/boards/renesas/ek_ra4e2/ek_ra4e2.dts @@ -19,6 +19,7 @@ zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,canbus = &canfd0; + zephyr,entropy = &trng; }; leds { @@ -111,3 +112,7 @@ status = "okay"; }; }; + +&trng { + status = "okay"; +}; diff --git a/boards/renesas/ek_ra6e2/doc/index.rst b/boards/renesas/ek_ra6e2/doc/index.rst index 4dce24edaf05b2..c7a3572032f370 100644 --- a/boards/renesas/ek_ra6e2/doc/index.rst +++ b/boards/renesas/ek_ra6e2/doc/index.rst @@ -100,6 +100,8 @@ The below features are currently supported on Zephyr OS for EK-RA6E2 board: +-----------+------------+----------------------+ | SPI | on-chip | spi | +-----------+------------+----------------------+ +| ENTROPY | on-chip | entropy | ++-----------+------------+----------------------+ Other hardware features are currently not supported by the port. diff --git a/boards/renesas/ek_ra6e2/ek_ra6e2.dts b/boards/renesas/ek_ra6e2/ek_ra6e2.dts index d4b4ff5419487e..d5afccae3887e1 100644 --- a/boards/renesas/ek_ra6e2/ek_ra6e2.dts +++ b/boards/renesas/ek_ra6e2/ek_ra6e2.dts @@ -20,6 +20,7 @@ zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,canbus = &canfd0; + zephyr,entropy = &trng; }; leds { @@ -126,3 +127,7 @@ }; }; }; + +&trng { + status ="okay"; +}; diff --git a/boards/renesas/fpb_ra6e2/doc/index.rst b/boards/renesas/fpb_ra6e2/doc/index.rst index e7aeb268852e28..0d90fceaab0601 100644 --- a/boards/renesas/fpb_ra6e2/doc/index.rst +++ b/boards/renesas/fpb_ra6e2/doc/index.rst @@ -87,6 +87,8 @@ The below features are currently supported on Zephyr OS for FPB-RA6E2 board: +-----------+------------+----------------------+ | SPI | on-chip | spi | +-----------+------------+----------------------+ +| ENTROPY | on-chip | entropy | ++-----------+------------+----------------------+ Other hardware features are currently not supported by the port. diff --git a/boards/renesas/fpb_ra6e2/fpb_ra6e2.dts b/boards/renesas/fpb_ra6e2/fpb_ra6e2.dts index 2ca322be835654..da4345cb2155f6 100644 --- a/boards/renesas/fpb_ra6e2/fpb_ra6e2.dts +++ b/boards/renesas/fpb_ra6e2/fpb_ra6e2.dts @@ -19,6 +19,7 @@ zephyr,flash = &flash0; zephyr,console = &uart0; zephyr,shell-uart = &uart0; + zephyr,entropy = &trng; }; leds { @@ -87,3 +88,7 @@ mul = <10 0>; status = "okay"; }; + +&trng { + status ="okay"; +}; diff --git a/dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi b/dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi index fc6c4d20f1e41b..4695d4250a9c77 100644 --- a/dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi +++ b/dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi @@ -25,6 +25,11 @@ interrupts = <16 1>, <17 1>, <18 1>, <19 1>; interrupt-names = "rxi", "txi", "tei", "eri"; }; + + trng: trng { + compatible = "renesas,ra-trng"; + status = "disabled"; + }; }; clocks: clocks { diff --git a/dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi b/dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi index 6685811ba03ddf..85259eb6914608 100644 --- a/dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi +++ b/dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi @@ -67,6 +67,11 @@ status = "disabled"; }; }; + + trng: trng { + compatible = "renesas,ra-trng"; + status = "disabled"; + }; }; clocks: clocks { diff --git a/dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi b/dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi index 0870b25a60ffa0..0c6cab8c9694bd 100644 --- a/dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi +++ b/dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi @@ -57,6 +57,11 @@ status = "disabled"; }; }; + + trng: trng { + compatible = "renesas,ra-trng"; + status = "disabled"; + }; }; clocks: clocks {