Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: renesas: Add support for Renesas RA entropy running on TRNG HWIP #83069

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boards/renesas/ek_ra2a1/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ hardware features:
+-----------+------------+-------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------+
| ENTROPY | on-chip | entropy |
+-----------+------------+-------------------------------+

The default configuration can be found in
:zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a1_defconfig`
Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra2a1/ek_ra2a1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,entropy = &trng;
};

leds {
Expand Down Expand Up @@ -93,3 +94,7 @@
interrupt-names = "gtioca", "overflow";
status = "okay";
};

&trng {
status = "okay";
};
2 changes: 2 additions & 0 deletions boards/renesas/ek_ra4e2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ The below features are currently supported on Zephyr OS for EK-RA4E2 board:
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| ENTROPY | on-chip | entropy |
+-----------+------------+----------------------+

Other hardware features are currently not supported by the port.

Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra4e2/ek_ra4e2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,canbus = &canfd0;
zephyr,entropy = &trng;
};

leds {
Expand Down Expand Up @@ -162,3 +163,7 @@
divider = <RA_PWM_SOURCE_DIV_256>;
status = "okay";
};

&trng {
status = "okay";
};
2 changes: 2 additions & 0 deletions boards/renesas/ek_ra6e2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ The below features are currently supported on Zephyr OS for EK-RA6E2 board:
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| ENTROPY | on-chip | entropy |
+-----------+------------+----------------------+

Other hardware features are currently not supported by the port.

Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra6e2/ek_ra6e2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,canbus = &canfd0;
zephyr,entropy = &trng;
};

leds {
Expand Down Expand Up @@ -177,3 +178,7 @@
divider = <RA_PWM_SOURCE_DIV_256>;
status = "okay";
};

&trng {
status ="okay";
};
2 changes: 2 additions & 0 deletions boards/renesas/fpb_ra6e2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ The below features are currently supported on Zephyr OS for FPB-RA6E2 board:
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| ENTROPY | on-chip | entropy |
+-----------+------------+----------------------+

Other hardware features are currently not supported by the port.

Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/fpb_ra6e2/fpb_ra6e2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,entropy = &trng;
};

leds {
Expand Down Expand Up @@ -123,3 +124,7 @@
divider = <RA_PWM_SOURCE_DIV_256>;
status = "okay";
};

&trng {
status ="okay";
};
2 changes: 1 addition & 1 deletion drivers/entropy/Kconfig.renesas_ra
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 \
|| DT_HAS_RENESAS_RA_SCE5_RNG_ENABLED
|| DT_HAS_RENESAS_RA_SCE5_RNG_ENABLED || DT_HAS_RENESAS_RA_TRNG_ENABLED
select ENTROPY_HAS_DRIVER
select USE_RA_FSP_SCE
help
Expand Down
1 change: 1 addition & 0 deletions drivers/entropy/entropy_renesas_ra.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ static int entropy_renesas_ra_init(const struct device *dev)
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)
DT_FOREACH_STATUS_OKAY(renesas_ra_trng, RENESAS_RA_ENTROPY_INIT)
5 changes: 5 additions & 0 deletions dts/arm/renesas/ra/ra2/r7fa2a1xh.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
#pwm-cells = <3>;
status = "disabled";
};

trng: trng {
compatible = "renesas,ra-trng";
status = "disabled";
};
};

clocks: clocks {
Expand Down
5 changes: 5 additions & 0 deletions dts/arm/renesas/ra/ra4/r7fa4e2b93cfm.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
status = "disabled";
};
};

trng: trng {
compatible = "renesas,ra-trng";
status = "disabled";
};
};

clocks: clocks {
Expand Down
5 changes: 5 additions & 0 deletions dts/arm/renesas/ra/ra6/r7fa6e2bx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
#pwm-cells = <3>;
status = "disabled";
};

trng: trng {
compatible = "renesas,ra-trng";
status = "disabled";
};
};

clocks: clocks {
Expand Down
8 changes: 8 additions & 0 deletions dts/bindings/rng/renesas,ra-trng.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

description: Renesas RA TRNG

compatible: "renesas,ra-trng"

include: base.yaml
7 changes: 7 additions & 0 deletions modules/Kconfig.renesas_fsp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ config HAS_RENESAS_RA_SCE5
help
Includes SCE5 implementation for SCE driver

config HAS_RENESAS_RA_TRNG
bool
default y
depends on DT_HAS_RENESAS_RA_TRNG_ENABLED
help
Includes TRNG implementation for SCE driver

endif

config USE_RA_FSP_SPI_B
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ manifest:
- hal
- name: hal_renesas
path: modules/hal/renesas
revision: 3c68562411cfe2e4bfb8546854fe9a24cb83c71a
revision: 3a8466b2ceca87d05280a071b9b9aabda1915235
groups:
- hal
- name: hal_rpi_pico
Expand Down
Loading