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

STM32WB0: add TRNG support #83152

Merged
merged 7 commits into from
Jan 22, 2025
16 changes: 16 additions & 0 deletions dts/arm/st/wb0/stm32wb0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,22 @@
dma-requests= <25>;
status = "disabled";
};

/**
* This node is valid for STM32WB05, STM32WB06 and
* STM32WB07, all equipped with the same IRQ-less
* TRNG instance. Since all those properties are
* also valid on STM32SWB09, except "compatible",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* also valid on STM32SWB09, except "compatible",
* also valid on STM32SWB09 except "compatible",

* we pretend this node is valid for all SoCs of
* the series and clean up in `stm32wb09.dtsi`.
*/
rng: rng@48600000 {
compatible = "st,stm32-rng-noirq";
reg = <0x48600000 DT_SIZE_K(4)>;
clocks = <&rcc STM32_CLOCK(AHB0, 18)>;
generation-delay-ns = <1250>; /* 1.25us */
status = "disabled";
};
};

bt_hci_wb0: bt_hci_wb0 {
Expand Down
12 changes: 12 additions & 0 deletions dts/arm/st/wb0/stm32wb09.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,17 @@
/ {
soc {
compatible = "st,stm32wb09", "st,stm32wb0", "simple-bus";

rng: rng@48600000 {
/**
* STM32WB09 TRNG has an interrupt line.
* Switch to proper compatible, delete property
* that doesn't apply to it, and add the interrupt
* line as property.
*/
/delete-property/ generation-delay-ns;
compatible = "st,stm32-rng";
interrupts = <28 0>;
};
};
};