Skip to content

Commit 0151535

Browse files
Vge0rgekartben
authored andcommitted
boards: nordic: Add initial support for nRF54L10 with TF-M
This adds the nrf54l15dk/nrf54l10/cpuapp/ns board variant to Zephyr. It allows to build applications for this target. This is an initial support for the non secure target which allows building and running tfm_ipc and config_build. This is NOT full support of the non secure target in upstream Zephyr. There are important limitations, such as: - The hardware Crypto accelerator is not supported and thus the non secur target is NOT secure for production applications in upstream Zephyr. - The BL2 is not supported, so no DFU is supported with this support Most of the code changes here are taken from nRF Connect SDK in order to avoid having noups there. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 0c11af9 commit 0151535

File tree

13 files changed

+225
-6
lines changed

13 files changed

+225
-6
lines changed

boards/nordic/nrf54l15dk/Kconfig

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

44
# nRF54L15 DK board configuration
55

6-
if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
6+
if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS
77

88
DT_NRF_MPC := $(dt_nodelabel_path,nrf_mpc)
99

@@ -27,4 +27,4 @@ config NRF_TRUSTZONE_RAM_REGION_SIZE
2727
This abstraction allows us to configure TrustZone without depending
2828
on peripheral specific symbols.
2929

30-
endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
30+
endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS

boards/nordic/nrf54l15dk/Kconfig.defconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ config ROM_START_OFFSET
1414
endif # BOARD_NRF54L15DK_NRF54L05_CPUAPP || BOARD_NRF54L15DK_NRF54L10_CPUAPP || \
1515
# BOARD_NRF54L15DK_NRF54L15_CPUAPP
1616

17-
if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
17+
if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS
1818

1919
config BT_CTLR
2020
default BT
@@ -30,4 +30,4 @@ config FLASH_LOAD_SIZE
3030
config BUILD_WITH_TFM
3131
default y
3232

33-
endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
33+
endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS

boards/nordic/nrf54l15dk/Kconfig.nrf54l15dk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
config BOARD_NRF54L15DK
55
select SOC_NRF54L05_CPUAPP if BOARD_NRF54L15DK_NRF54L05_CPUAPP
6-
select SOC_NRF54L10_CPUAPP if BOARD_NRF54L15DK_NRF54L10_CPUAPP
6+
select SOC_NRF54L10_CPUAPP if BOARD_NRF54L15DK_NRF54L10_CPUAPP || BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS
77
select SOC_NRF54L15_CPUAPP if BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
88
select SOC_NRF54L15_CPUFLPR if BOARD_NRF54L15DK_NRF54L15_CPUFLPR || \
99
BOARD_NRF54L15DK_NRF54L15_CPUFLPR_XIP

boards/nordic/nrf54l15dk/board.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ elseif(CONFIG_SOC_NRF54L05_CPUFLPR OR CONFIG_SOC_NRF54L10_CPUFLPR)
1010
board_runner_args(jlink "--device=RISC-V" "--speed=4000" "-if SW" "--tool-opt=-jlinkscriptfile ${JLINKSCRIPTFILE}")
1111
endif()
1212

13-
if(CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS)
13+
if(CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS OR CONFIG_BOARD_NRF54L15DK_NRF54L10_CPUAPP_NS)
1414
set(TFM_PUBLIC_KEY_FORMAT "full")
1515
endif()
1616

boards/nordic/nrf54l15dk/board.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ board:
55
socs:
66
- name: nrf54l05
77
- name: nrf54l10
8+
variants:
9+
- name: ns
10+
cpucluster: cpuapp
811
- name: nrf54l15
912
variants:
1013
- name: xip
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#define USE_NON_SECURE_ADDRESS_MAP 1
10+
11+
#include <nordic/nrf54l10_cpuapp.dtsi>
12+
#include "nrf54l_05_10_15_cpuapp_common.dtsi"
13+
14+
/ {
15+
compatible = "nordic,nrf54l15dk_nrf54l10-cpuapp";
16+
model = "Nordic nRF54L15 DK nRF54L10 Application MCU";
17+
18+
chosen {
19+
zephyr,code-partition = &slot0_ns_partition;
20+
zephyr,sram = &sram0_ns;
21+
zephyr,entropy = &psa_rng;
22+
};
23+
24+
/delete-node/ rng;
25+
26+
psa_rng: psa-rng {
27+
status = "okay";
28+
};
29+
};
30+
31+
/ {
32+
/*
33+
* Default SRAM planning when building for nRF54L10 with ARM TrustZone-M support.
34+
* - Lowest 96 kB SRAM allocated to Secure image (sram0_s).
35+
* - Upper 96 kB SRAM allocated to Non-Secure image (sram0_ns).
36+
*
37+
* nRF54L10 has 192 kB of volatile memory (SRAM) but the last 42kB are reserved for
38+
* the FLPR MCU.
39+
* This static layout needs to be the same with the upstream TF-M layout in the
40+
* header flash_layout.h of the relevant platform. Any updates in the layout
41+
* needs to happen both in the flash_layout.h and in this file at the same time.
42+
*/
43+
reserved-memory {
44+
#address-cells = <1>;
45+
#size-cells = <1>;
46+
ranges;
47+
48+
sram0_s: image_s@20000000 {
49+
/* Secure image memory */
50+
reg = <0x20000000 DT_SIZE_K(72)>;
51+
};
52+
53+
sram0_ns: image_ns@20012000 {
54+
/* Non-Secure image memory */
55+
reg = <0x20012000 DT_SIZE_K(72)>;
56+
};
57+
};
58+
};
59+
60+
&cpuapp_rram {
61+
partitions {
62+
compatible = "fixed-partitions";
63+
#address-cells = <1>;
64+
#size-cells = <1>;
65+
/* nRF54L10 has 1022 kB of non volatile memory (RRAM) but the
66+
* last 62kB are reserved for the FLPR MCU.
67+
*
68+
* This static layout needs to be the same with the upstream TF-M layout in the
69+
* header flash_layout.h of the relevant platform. Any updates in the layout
70+
* needs to happen both in the flash_layout.h and in this file at the same time.
71+
*/
72+
slot0_partition: partition@0 {
73+
label = "image-0";
74+
reg = <0x0000000 DT_SIZE_K(384)>;
75+
};
76+
77+
tfm_ps_partition: partition@60000 {
78+
label = "tfm-ps";
79+
reg = <0x00060000 DT_SIZE_K(16)>;
80+
};
81+
82+
tfm_its_partition: partition@64000 {
83+
label = "tfm-its";
84+
reg = <0x00064000 DT_SIZE_K(16)>;
85+
};
86+
87+
tfm_otp_partition: partition@68000 {
88+
label = "tfm-otp";
89+
reg = <0x00068000 DT_SIZE_K(8)>;
90+
};
91+
92+
slot0_ns_partition: partition@6A000 {
93+
label = "image-0-nonsecure";
94+
reg = <0x0006A000 DT_SIZE_K(504)>;
95+
};
96+
97+
storage_partition: partition@E8000 {
98+
label = "storage";
99+
reg = <0x000E8000 DT_SIZE_K(32)>;
100+
};
101+
};
102+
};
103+
104+
&uart30 {
105+
/* Disable so that TF-M can use this UART */
106+
status = "disabled";
107+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: nrf54l15dk/nrf54l10/cpuapp/ns
5+
name: nRF54l15-DK-nRF54l10-Application-Non-Secure
6+
type: mcu
7+
arch: arm
8+
toolchain:
9+
- gnuarmemb
10+
- zephyr
11+
ram: 192
12+
flash: 1022
13+
supported:
14+
- adc
15+
- gpio
16+
- i2c
17+
- spi
18+
- counter
19+
- watchdog
20+
- adc
21+
- i2s
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_ARM_MPU=y
5+
CONFIG_HW_STACK_PROTECTION=y
6+
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
7+
CONFIG_ARM_TRUSTZONE_M=y
8+
9+
# This Board implies building Non-Secure firmware
10+
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
11+
12+
# Don't enable the cache in the non-secure image as it is a
13+
# secure-only peripheral on 54l
14+
CONFIG_CACHE_MANAGEMENT=n
15+
CONFIG_EXTERNAL_CACHE=n
16+
17+
CONFIG_UART_CONSOLE=y
18+
CONFIG_CONSOLE=y
19+
CONFIG_SERIAL=y
20+
CONFIG_GPIO=y
21+
22+
# Start SYSCOUNTER on driver init
23+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
24+
25+
# Disable TFM BL2 since it is not supported
26+
CONFIG_TFM_BL2=n
27+
28+
# Support for silence logging is not supported at the moment
29+
# Tracked by: NCSDK-31930
30+
CONFIG_TFM_LOG_LEVEL_SILENCE=n
31+
32+
# The oscillators are configured as secure and cannot be configured
33+
# from the non secure application directly. This needs to be set
34+
# otherwise nrfx will try to configure them, resulting in a bus
35+
# fault.
36+
CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG=y

modules/trusted-firmware-m/Kconfig.tfm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config TFM_BOARD
2626
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf9120" if SOC_NRF9120
2727
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf5340_cpuapp" if SOC_NRF5340_CPUAPP
2828
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf54l15_cpuapp" if SOC_NRF54L15_CPUAPP
29+
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf54l10_cpuapp" if SOC_NRF54L10_CPUAPP
2930
help
3031
The board name used for building TFM. Building with TFM requires that
3132
TFM has been ported to the given board/SoC.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (c) 2025, Nordic Semiconductor ASA.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
set(NRF_BOARD_SELECTED True)
8+
9+
add_subdirectory(${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/common/nrf54l10 nrf54l10)
10+
11+
add_subdirectory(.. common)
12+
13+
install(FILES ${CMAKE_CURRENT_LIST_DIR}/ns/cpuarch_ns.cmake
14+
DESTINATION ${INSTALL_PLATFORM_NS_DIR}
15+
RENAME cpuarch.cmake)
16+
17+
install(FILES config.cmake
18+
DESTINATION ${INSTALL_PLATFORM_NS_DIR})
19+
20+
install(DIRECTORY ${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/nrf54l15dk_nrf54l10_cpuapp/tests
21+
22+
DESTINATION ${INSTALL_PLATFORM_NS_DIR}
23+
)

0 commit comments

Comments
 (0)