Skip to content

Commit de051d6

Browse files
joerchannordicjm
authored andcommitted
[nrf noup] dts: choose a crypto accelerator for entropy
This is a long-term noup patch because crypto driver support is NCS-only for both cryptocell and CRACEN. Set HAS_HW_NRF_CC3XX to be defined in NS build when cryptocell is accessed through the PSA API. We need to know which CC3XX features are available. Set PSA as the entropy source for 54L. PSA is the only NCS-supported interface to CRACEN. Signed-off-by: Georgios Vasilakis <[email protected]> Signed-off-by: Joakim Andersson <[email protected]> Signed-off-by: Dominik Ermel <[email protected]> Signed-off-by: Sebastian Bøe <[email protected]> Signed-off-by: Robert Lubos <[email protected]> Signed-off-by: Rubin Gerritsen <[email protected]> (cherry picked from commit d643f17)
1 parent 6b48f84 commit de051d6

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

dts/arm/nordic/nrf52840.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/ {
99
chosen {
1010
zephyr,bt-hci = &bt_hci_controller;
11-
zephyr,entropy = &rng;
11+
zephyr,entropy = &cryptocell;
1212
zephyr,flash-controller = &flash_controller;
1313
};
1414

@@ -562,7 +562,7 @@
562562
reg = <0x5002a000 0x1000>, <0x5002b000 0x1000>;
563563
reg-names = "wrapper", "core";
564564
interrupts = <42 NRF_DEFAULT_IRQ_PRIORITY>;
565-
status = "disabled";
565+
status = "okay";
566566
};
567567
};
568568
};

dts/arm/nordic/nrf5340_cpuapp.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
};
3535

3636
chosen {
37-
zephyr,entropy = &rng_hci;
37+
zephyr,entropy = &cryptocell;
3838
zephyr,flash-controller = &flash_controller;
3939
};
4040

@@ -103,7 +103,7 @@
103103
reg = <0x50844000 0x1000>, <0x50845000 0x1000>;
104104
reg-names = "wrapper", "core";
105105
interrupts = <68 NRF_DEFAULT_IRQ_PRIORITY>;
106-
status = "disabled";
106+
status = "okay";
107107
};
108108
};
109109

dts/arm/nordic/nrf54l_05_10_15_cpuapp.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ nvic: &cpuapp_nvic {};
1616
/ {
1717
chosen {
1818
zephyr,bt-hci = &bt_hci_controller;
19+
zephyr,entropy = &psa_rng;
1920
};
2021

2122
soc {
@@ -26,7 +27,7 @@ nvic: &cpuapp_nvic {};
2627

2728
psa_rng: psa-rng {
2829
compatible = "zephyr,psa-crypto-rng";
29-
status = "disabled";
30+
status = "okay";
3031
};
3132
};
3233

dts/arm/nordic/nrf91.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
};
2929

3030
chosen {
31+
zephyr,entropy = &cryptocell;
3132
zephyr,flash-controller = &flash_controller;
3233
};
3334

@@ -51,7 +52,7 @@
5152
reg = <0x50840000 0x1000>, <0x50841000 0x1000>;
5253
reg-names = "wrapper", "core";
5354
interrupts = <64 NRF_DEFAULT_IRQ_PRIORITY>;
54-
status = "disabled";
55+
status = "okay";
5556
};
5657

5758
ctrlap: ctrlap@50006000 {

soc/nordic/common/Kconfig.peripherals

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ config HAS_HW_NRF_BPROT
1313
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_BPROT))
1414

1515
config HAS_HW_NRF_CC310
16-
def_bool $(dt_compat_enabled,$(DT_COMPAT_ARM_CRYPTOCELL_310))
16+
def_bool $(dt_compat_enabled,$(DT_COMPAT_ARM_CRYPTOCELL_310)) || \
17+
($(dt_nodelabel_enabled,psa_rng) && SOC_SERIES_NRF91X)
1718

1819
config HAS_HW_NRF_CC312
19-
def_bool $(dt_compat_enabled,$(DT_COMPAT_ARM_CRYPTOCELL_312))
20+
def_bool $(dt_compat_enabled,$(DT_COMPAT_ARM_CRYPTOCELL_312)) || \
21+
($(dt_nodelabel_enabled,psa_rng) && SOC_NRF5340_CPUAPP)
2022

2123
config HAS_HW_NRF_CCM
2224
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_CCM))

0 commit comments

Comments
 (0)