Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@

chosen {
zephyr,sram = &cpuapp_sram;
zephyr,entropy = &prng;
};

prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};
};
6 changes: 6 additions & 0 deletions boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_cpuapp_emu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
zephyr,sram = &cpuapp_sram;
zephyr,console = &uart00;
zephyr,shell-uart = &uart00;
zephyr,entropy = &prng;
};

prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/entropy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

rsource "Kconfig.nrf_prng"

config ENTROPY_CC3XX
bool "Arm CC3XX RNG driver for Nordic devices"
depends on HAS_HW_NRF_CC3XX && !BUILD_WITH_TFM
Expand Down
20 changes: 20 additions & 0 deletions drivers/entropy/Kconfig.nrf_prng
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# nRF fake entropy prng generator driver configuration
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

if ENTROPY_GENERATOR

config FAKE_ENTROPY_NRF_PRNG
bool "A fake nRF entropy driver"
default y
depends on DT_HAS_NORDIC_ENTROPY_PRNG_ENABLED
depends on (SOC_SERIES_NRF54HX || SOC_SERIES_NRF92X || SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X)
select ENTROPY_HAS_DRIVER
help
This is a super simple PRNG driver that can be used on nRF platforms that
do not have an entropy source.
This is NOT SAFE to use for cryptographic operations!
Comment on lines +7 to +18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this already exists in zephyr and properly emits a warning with:

CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TIMER_RANDOM_GENERATOR=y
CONFIG_TEST_CSPRNG_GENERATOR=y


endif