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

Add support for Renesas RA entropy running on SCE5 HWIP #82915

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_ra4w1/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ The below features are currently supported on Zephyr OS for EK-RA4W1 board:
+-----------+------------+----------------------+
| COUNTER | on-chip | counter |
+-----------+------------+----------------------+
| 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_ra4w1/ek_ra4w1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,entropy = &trng;
};

leds {
Expand Down Expand Up @@ -65,3 +66,7 @@
pinctrl-names = "default";
status = "okay";
};

&trng {
status = "okay";
};
3 changes: 2 additions & 1 deletion drivers/entropy/Kconfig.renesas_ra
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -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)
5 changes: 5 additions & 0 deletions dts/arm/renesas/ra/ra4/r7fa4w1ad2cng.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
interrupts = <28 1>, <29 1>, <30 1>, <31 1>;
interrupt-names = "rxi", "txi", "tei", "eri";
};

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

clocks: clocks {
Expand Down
8 changes: 8 additions & 0 deletions dts/bindings/rng/renesas,ra-sce5-rng.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 SCE5 TRNG

compatible: "renesas,ra-sce5-rng"

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 @@ -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
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ manifest:
- hal
- name: hal_renesas
path: modules/hal/renesas
revision: ca0be9e9c56bdedf2f18426639c5aca79a4e06ae
revision: 677984b44e49e01f93caf957945bc712df6be148
groups:
- hal
- name: hal_rpi_pico
Expand Down
Loading