Skip to content

Commit 77aeaa8

Browse files
Mathieu Choplainkartben
authored andcommitted
dts: arm: st: wb0: add TRNG node
Add Device Tree nodes corresponding to TRNG of STM32WB0 series SoCs. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 1afc044 commit 77aeaa8

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

dts/arm/st/wb0/stm32wb0.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,22 @@
259259
dma-requests= <25>;
260260
status = "disabled";
261261
};
262+
263+
/**
264+
* This node is valid for STM32WB05, STM32WB06 and
265+
* STM32WB07, all equipped with the same IRQ-less
266+
* TRNG instance. Since all those properties are
267+
* also valid on STM32SWB09, except "compatible",
268+
* we pretend this node is valid for all SoCs of
269+
* the series and clean up in `stm32wb09.dtsi`.
270+
*/
271+
rng: rng@48600000 {
272+
compatible = "st,stm32-rng-noirq";
273+
reg = <0x48600000 DT_SIZE_K(4)>;
274+
clocks = <&rcc STM32_CLOCK(AHB0, 18)>;
275+
generation-delay-ns = <1250>; /* 1.25us */
276+
status = "disabled";
277+
};
262278
};
263279

264280
bt_hci_wb0: bt_hci_wb0 {

dts/arm/st/wb0/stm32wb09.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,17 @@
1414
/ {
1515
soc {
1616
compatible = "st,stm32wb09", "st,stm32wb0", "simple-bus";
17+
18+
rng: rng@48600000 {
19+
/**
20+
* STM32WB09 TRNG has an interrupt line.
21+
* Switch to proper compatible, delete property
22+
* that doesn't apply to it, and add the interrupt
23+
* line as property.
24+
*/
25+
/delete-property/ generation-delay-ns;
26+
compatible = "st,stm32-rng";
27+
interrupts = <28 0>;
28+
};
1729
};
1830
};

0 commit comments

Comments
 (0)