Skip to content

Commit 998484c

Browse files
tpamborMaureenHelm
authored andcommitted
boards: st: stm32h573i_dk: Fix RNG configuration for TF-M builds
Only enable STM32 RNG peripheral when building for non-TF-M targets and disable it for TF-M builds to avoid conflicts with the secure side. For TF-M builds, enable the PSA Crypto RNG driver instead. Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
1 parent 7a86136 commit 998484c

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

boards/st/stm32h573i_dk/stm32h573i_dk-common.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,6 @@
261261
status = "okay";
262262
};
263263

264-
&rng {
265-
status = "okay";
266-
};
267-
268264
&mac {
269265
status = "okay";
270266
pinctrl-0 = <&eth_rxd0_pc4

boards/st/stm32h573i_dk/stm32h573i_dk.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@
6060
};
6161
};
6262
};
63+
64+
&rng {
65+
status = "okay";
66+
};

boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ext_flash_app.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@
5454
};
5555
};
5656
};
57+
58+
&rng {
59+
status = "okay";
60+
};

boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ns.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
zephyr,flash = &flash0;
1717
zephyr,flash-controller = &flash;
1818
zephyr,code-partition = &slot0_ns_partition;
19+
zephyr,entropy = &psa_rng;
20+
};
21+
22+
psa_rng: psa-rng {
23+
compatible = "zephyr,psa-crypto-rng";
24+
status = "okay";
1925
};
2026
};
2127

0 commit comments

Comments
 (0)