Skip to content

Commit b1ae931

Browse files
committed
boards: nordic: Add initial support for nRF54LM20A/ns
Add board files for nRF54LM20A/ns. Update existing nRF54LM20A board files to support this. Signed-off-by: Dag Erik Gjørvad <[email protected]>
1 parent 0572c83 commit b1ae931

19 files changed

+358
-43
lines changed

boards/nordic/nrf54lm20dk/Kconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
DT_NRF_MPC := $(dt_nodelabel_path,nrf_mpc)
5+
6+
if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS
7+
8+
config NRF_TRUSTZONE_FLASH_REGION_SIZE
9+
hex
10+
default $(dt_node_int_prop_hex,$(DT_NRF_MPC),override-granularity)
11+
help
12+
This defines the flash region size from the TrustZone perspective.
13+
It is used when configuring the TrustZone and when setting alignments
14+
requirements for the partitions.
15+
This abstraction allows us to configure TrustZone without depending
16+
on peripheral-specific symbols.
17+
18+
config NRF_TRUSTZONE_RAM_REGION_SIZE
19+
hex
20+
default $(dt_node_int_prop_hex,$(DT_NRF_MPC),override-granularity)
21+
help
22+
This defines the RAM region size from the TrustZone perspective.
23+
It is used when configuring the TrustZone and when setting alignments
24+
requirements for the partitions.
25+
This abstraction allows us to configure TrustZone without depending
26+
on peripheral specific symbols.
27+
28+
endif # BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS

boards/nordic/nrf54lm20dk/Kconfig.defconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ config HW_STACK_PROTECTION
77
default ARCH_HAS_STACK_PROTECTION
88

99
endif # BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP
10+
11+
if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS
12+
13+
# By default, if we build for a Non-Secure version of the board,
14+
# enable building with TF-M as the Secure Execution Environment.
15+
config BUILD_WITH_TFM
16+
default y
17+
18+
endif # BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS

boards/nordic/nrf54lm20dk/Kconfig.nrf54lm20dk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_NRF54LM20DK
5-
select SOC_NRF54LM20A_ENGA_CPUAPP if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP
5+
select SOC_NRF54LM20A_ENGA_CPUAPP if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP || BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS
66
select SOC_NRF54LM20A_ENGA_CPUFLPR if BOARD_NRF54LM20DK_NRF54LM20A_CPUFLPR

boards/nordic/nrf54lm20dk/board.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@ elseif(CONFIG_SOC_NRF54LM20A_ENGA_CPUFLPR)
77
board_runner_args(jlink "--speed=4000")
88
endif()
99

10+
if(CONFIG_BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS)
11+
set(TFM_PUBLIC_KEY_FORMAT "full")
12+
endif()
13+
14+
if(CONFIG_TFM_FLASH_MERGED_BINARY)
15+
set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex)
16+
endif()
17+
1018
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
1119
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/nordic/nrf54lm20dk/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ board:
55
socs:
66
- name: nrf54lm20a
77
variants:
8+
- name: ns
9+
cpucluster: cpuapp
810
- name: xip
911
cpucluster: cpuflpr
1012
runners:
@@ -17,6 +19,7 @@ runners:
1719
groups:
1820
- boards:
1921
- nrf54lm20dk/nrf54lm20a/cpuapp
22+
- nrf54lm20dk/nrf54lm20a/cpuapp/ns
2023
- nrf54lm20dk/nrf54lm20a/cpuflpr
2124
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip
2225
'--erase':
@@ -28,6 +31,7 @@ runners:
2831
groups:
2932
- boards:
3033
- nrf54lm20dk/nrf54lm20a/cpuapp
34+
- nrf54lm20dk/nrf54lm20a/cpuapp/ns
3135
- nrf54lm20dk/nrf54lm20a/cpuflpr
3236
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip
3337
'--reset':
@@ -39,5 +43,6 @@ runners:
3943
groups:
4044
- boards:
4145
- nrf54lm20dk/nrf54lm20a/cpuapp
46+
- nrf54lm20dk/nrf54lm20a/cpuapp/ns
4247
- nrf54lm20dk/nrf54lm20a/cpuflpr
4348
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip

boards/nordic/nrf54lm20dk/nrf54lm20a_cpuapp_common.dtsi

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -58,44 +58,6 @@
5858
status = "okay";
5959
};
6060

61-
&cpuapp_rram {
62-
partitions {
63-
compatible = "fixed-partitions";
64-
#address-cells = <1>;
65-
#size-cells = <1>;
66-
67-
boot_partition: partition@0 {
68-
label = "mcuboot";
69-
reg = <0x0 DT_SIZE_K(64)>;
70-
};
71-
72-
slot0_partition: partition@10000 {
73-
label = "image-0";
74-
reg = <0x10000 DT_SIZE_K(449)>;
75-
};
76-
77-
slot0_ns_partition: partition@80400 {
78-
label = "image-0-nonsecure";
79-
reg = <0x80400 DT_SIZE_K(449)>;
80-
};
81-
82-
slot1_partition: partition@f0800 {
83-
label = "image-1";
84-
reg = <0xf0800 DT_SIZE_K(449)>;
85-
};
86-
87-
slot1_ns_partition: partition@160c00 {
88-
label = "image-1-nonsecure";
89-
reg = <0x160c00 DT_SIZE_K(449)>;
90-
};
91-
92-
storage_partition: partition@1d1000 {
93-
label = "storage";
94-
reg = <0x1d1000 DT_SIZE_K(36)>;
95-
};
96-
};
97-
};
98-
9961
&uart20 {
10062
status = "okay";
10163
};
@@ -136,10 +98,6 @@
13698
status = "okay";
13799
};
138100

139-
&bt_hci_controller {
140-
status = "okay";
141-
};
142-
143101
&ieee802154 {
144102
status = "okay";
145103
};

boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20a_cpuapp.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88

99
#include "nrf54lm20a_cpuapp_common.dtsi"
10+
#include <nordic/nrf54lm20a_partition.dtsi>
1011

1112
/ {
1213
compatible = "nordic,nrf54lm20dk_nrf54lm20a-cpuapp";
@@ -22,5 +23,9 @@
2223
status = "okay";
2324
};
2425

26+
&uart30 {
27+
status = "okay";
28+
};
29+
2530
/* Get a node label for wi-fi spi to use in shield files */
2631
wifi_spi: &spi22 {};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 "nrf54lm20a_cpuapp_common.dtsi"
12+
13+
/ {
14+
compatible = "nordic,nrf54lm20dk_nrf54lm20a-cpuapp-ns";
15+
model = "Nordic nRF54LM20 DK nRF54LM20A Application MCU Non-Secure";
16+
17+
chosen {
18+
zephyr,code-partition = &slot0_ns_partition;
19+
zephyr,sram = &sram0_ns;
20+
zephyr,entropy = &psa_rng;
21+
};
22+
23+
psa_rng: psa-rng {
24+
status = "okay";
25+
};
26+
};
27+
28+
/ {
29+
/*
30+
* Default SRAM planning when building for nRF54LM20A with ARM TrustZone-M support
31+
* - Lowest 208 kB SRAM allocated to Secure image (sram0_s).
32+
* - Upper 208 kB SRAM allocated to Non-Secure image (sram0_ns).
33+
*
34+
* nRF54LM20A has 512 kB of volatile memory (SRAM), but 96kB is allocated for the FLPR MCU.
35+
* This static layout needs to be the same with the upstream TF-M layout in the
36+
* header flash_layout.h of the relevant platform. Any updates in the layout
37+
* needs to happen both in the flash_layout.h and in this file at the same time.
38+
*/
39+
reserved-memory {
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
ranges;
43+
44+
sram0_s: image_s@20000000 {
45+
/* Secure image memory */
46+
reg = <0x20000000 DT_SIZE_K(208)>;
47+
};
48+
49+
sram0_ns: image_ns@20034000 {
50+
/* Non-Secure image memory */
51+
reg = <0x20034000 DT_SIZE_K(208)>;
52+
};
53+
};
54+
};
55+
56+
/* Include default memory partition configuration file */
57+
#include <nordic/nrf54lm20a_ns_partition.dtsi>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
identifier: nrf54lm20dk/nrf54lm20a/cpuapp/ns
2+
name: nRF54lm20-DK-nRF54lm20a-Application-Non-Secure
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- gnuarmemb
7+
- zephyr
8+
ram: 208
9+
flash: 1356
10+
supported:
11+
- adc
12+
- counter
13+
- dmic
14+
- gpio
15+
- i2c
16+
- i2s
17+
- pwm
18+
- spi
19+
- usbd
20+
- watchdog
21+
vendor: nordic
22+
sysbuild: true
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Enable MPU
5+
CONFIG_ARM_MPU=y
6+
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
7+
8+
# Enable TrustZone-M
9+
CONFIG_ARM_TRUSTZONE_M=y
10+
11+
# This Board implies building Non-Secure firmware
12+
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
13+
14+
# Enable UART driver
15+
CONFIG_SERIAL=y
16+
17+
# Enable console
18+
CONFIG_CONSOLE=y
19+
CONFIG_UART_CONSOLE=y
20+
21+
# Enable GPIO
22+
CONFIG_GPIO=y
23+
24+
# Don't enable the cache in the non-secure image as it is a
25+
# secure-only peripheral on 54l
26+
CONFIG_CACHE_MANAGEMENT=n
27+
CONFIG_EXTERNAL_CACHE=n
28+
29+
# Start SYSCOUNTER on driver init
30+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
31+
32+
# Disable TFM BL2 since it is not supported
33+
CONFIG_TFM_BL2=n
34+
# Support for silence logging is not supported at the moment
35+
# Tracked by: NCSDK-31930
36+
CONFIG_TFM_LOG_LEVEL_SILENCE=n
37+
38+
# The oscillators are configured as secure and cannot be configured
39+
# from the non secure application directly. This needs to be set
40+
# otherwise nrfx will try to configure them, resulting in a bus
41+
# fault.
42+
CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG=y

0 commit comments

Comments
 (0)