Skip to content

Commit 499041d

Browse files
joerchande-nordic
authored andcommitted
[nrf noup] dts: choose cryptocell for entropy when available
This is a long-term noup patch because driver support is NCS-only. 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. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no> Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no> (cherry picked from commit c76cf87) (cherry picked from commit 214533f) (cherry picked from commit 3819c4a) (cherry picked from commit 910bb5f) Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
1 parent 6b01431 commit 499041d

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

dts/arm/nordic/nrf52840.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/ {
77
chosen {
8-
zephyr,entropy = &rng;
8+
zephyr,entropy = &cryptocell;
99
zephyr,flash-controller = &flash_controller;
1010
};
1111

@@ -543,7 +543,7 @@
543543
reg = <0x5002a000 0x1000>, <0x5002b000 0x1000>;
544544
reg-names = "wrapper", "core";
545545
interrupts = <42 NRF_DEFAULT_IRQ_PRIORITY>;
546-
status = "disabled";
546+
status = "okay";
547547
};
548548
};
549549
};

dts/arm/nordic/nrf5340_cpuapp.dtsi

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

3535
chosen {
36-
zephyr,entropy = &rng_hci;
36+
zephyr,entropy = &cryptocell;
3737
zephyr,flash-controller = &flash_controller;
3838
};
3939

@@ -91,7 +91,7 @@
9191
reg = <0x50844000 0x1000>, <0x50845000 0x1000>;
9292
reg-names = "wrapper", "core";
9393
interrupts = <68 NRF_DEFAULT_IRQ_PRIORITY>;
94-
status = "disabled";
94+
status = "okay";
9595
};
9696
};
9797

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/arm/nordic_nrf/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)