Skip to content

Commit 8217fd3

Browse files
tejlmandrlubos
authored andcommitted
[nrf noup] boards: add nrf54l15/nrf54l15/cpuapp/ns as board variant
This commit adds the nRF54l15//nrf54l15/cpuapp/ns board variant to sdk-zephyr. It allows to build nRF54l15pdk with TF-M in nRF Connect SDK. This is done as a nrf noup patch as the out-of-tree board extension feature is not available. When zephyrproject-rtos/zephyr#69548 is completed, then this commit can be reverted and the variant be placed in sdk-nrf repository. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> (cherry picked from commit c8cc663)
1 parent eb71554 commit 8217fd3

9 files changed

+295
-1
lines changed

boards/nordic/nrf54l15pdk/Kconfig

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,46 @@ config BOARD_ENABLE_DCDC
1111
default y
1212

1313
endif # BOARD_NRF54L15PDK_NRF54L15_CPUAPP
14+
15+
if BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS
16+
17+
# TODO: Remove the options bellow when (NCSDK-25023) is done
18+
config NRF_SPU_FLASH_REGION_SIZE
19+
hex
20+
default 0x4000
21+
# This option does not apply to 54, but we pretend the HW has this limitation
22+
# for now for easier porting. NCSDK-25023
23+
help
24+
FLASH region size for the NRF_SPU peripheral. For nrf54 the
25+
region size is configurable per-region so this option does
26+
not apply.
27+
28+
config NRF_SPU_FLASH_REGION_ALIGNMENT
29+
hex
30+
default 0x4000
31+
# This option does not apply to 54, but we pretend the HW has this limitation
32+
# for now for easier porting. NCSDK-25023
33+
help
34+
FLASH region size for the NRF_SPU peripheral. For nrf54 the
35+
region size is configurable per-region so this option does
36+
not apply.
37+
38+
config NRF_SPU_RAM_REGION_SIZE
39+
hex
40+
default 0x2000
41+
# This HW limitation does not apply to 54, but we pretend
42+
# it does for now for easier porting. NCSDK-25023
43+
help
44+
RAM region size for the NRF_SPU peripheral. For nrf54 the
45+
region size is configurable per-region so this option does
46+
not apply.
47+
48+
49+
config NRF_SPU_RAM_REGION_ALIGNMENT
50+
hex
51+
default 0x1000
52+
help
53+
RAM regions must be aligned to this value due to SPU HW
54+
limitations.
55+
56+
endif #BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS

boards/nordic/nrf54l15pdk/Kconfig.defconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,21 @@ config ROM_START_OFFSET
1111
default 0x800 if BOOTLOADER_MCUBOOT
1212

1313
endif # BOARD_NRF54L15PDK_NRF54L15_CPUAPP
14+
15+
if BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS
16+
17+
config BT_CTLR
18+
default BT
19+
20+
# By default, if we build for a Non-Secure version of the board,
21+
# enable building with TF-M as the Secure Execution Environment.
22+
config BUILD_WITH_TFM
23+
default y if BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS
24+
25+
# By default, if we build with TF-M, instruct build system to
26+
# flash the combined TF-M (Secure) & Zephyr (Non Secure) image
27+
config TFM_FLASH_MERGED_BINARY
28+
default y
29+
depends on BUILD_WITH_TFM
30+
31+
endif #BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS

boards/nordic/nrf54l15pdk/Kconfig.nrf54l15pdk

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

44
config BOARD_NRF54L15PDK
5-
select SOC_NRF54L15_ENGA_CPUAPP if BOARD_NRF54L15PDK_NRF54L15_CPUAPP
5+
select SOC_NRF54L15_ENGA_CPUAPP if BOARD_NRF54L15PDK_NRF54L15_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS
66
select SOC_NRF54L15_ENGA_CPUFLPR if BOARD_NRF54L15PDK_NRF54L15_CPUFLPR || \
77
BOARD_NRF54L15PDK_NRF54L15_CPUFLPR_XIP

boards/nordic/nrf54l15pdk/board.cmake

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

10+
if(BOARD_NRF54L15PDK_NRF54L15_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/nrfjprog.board.cmake)
1119
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
1220
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/nordic/nrf54l15pdk/board.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ board:
66
variants:
77
- name: xip
88
cpucluster: cpuflpr
9+
- name: ns
10+
cpucluster: cpuapp
911
revision:
1012
format: major.minor.patch
1113
default: "0.3.0"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&pinctrl {
8+
uart20_default: uart20_default {
9+
group1 {
10+
psels = <NRF_PSEL(UART_TX, 1, 4)>,
11+
<NRF_PSEL(UART_RX, 1, 5)>;
12+
};
13+
};
14+
15+
uart20_sleep: uart20_sleep {
16+
group1 {
17+
psels = <NRF_PSEL(UART_TX, 1, 4)>,
18+
<NRF_PSEL(UART_RX, 1, 5)>;
19+
low-power-enable;
20+
};
21+
};
22+
23+
uart30_default: uart30_default {
24+
group1 {
25+
psels = <NRF_PSEL(UART_TX, 0, 0)>,
26+
<NRF_PSEL(UART_RX, 0, 1)>;
27+
};
28+
};
29+
30+
uart30_sleep: uart30_sleep {
31+
group1 {
32+
psels = <NRF_PSEL(UART_TX, 0, 0)>,
33+
<NRF_PSEL(UART_RX, 0, 1)>;
34+
low-power-enable;
35+
};
36+
};
37+
38+
};
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/dts-v1/;
8+
#include <nordic/nrf54l15_cpuapp_ns.dtsi>
9+
#include "nrf54l15pdk_nrf54l15_cpuapp_ns-pinctrl.dtsi"
10+
11+
/ {
12+
chosen {
13+
zephyr,console = &uart20;
14+
/* TODO: NCSDK-24862: We don't support configuring RRAM and SRAM
15+
* regions in the DTS file yet. The partition manager configures
16+
* these regions now.
17+
*/
18+
zephyr,shell-uart = &uart20;
19+
zephyr,flash = &rram0;
20+
zephyr,sram = &sram0;
21+
zephyr,ieee802154 = &ieee802154;
22+
};
23+
24+
leds {
25+
compatible = "gpio-leds";
26+
led0: led_0 {
27+
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
28+
label = "Green LED 0";
29+
};
30+
led1: led_1 {
31+
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
32+
label = "Green LED 1";
33+
};
34+
led2: led_2 {
35+
gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
36+
label = "Green LED 2";
37+
};
38+
led3: led_3 {
39+
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
40+
label = "Green LED 3";
41+
};
42+
};
43+
44+
buttons {
45+
compatible = "gpio-keys";
46+
button0: button_0 {
47+
gpios = <&gpio1 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
48+
label = "Push button 0";
49+
zephyr,code = <INPUT_KEY_0>;
50+
};
51+
button1: button_1 {
52+
gpios = <&gpio1 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
53+
label = "Push button 1";
54+
zephyr,code = <INPUT_KEY_1>;
55+
};
56+
button2: button_2 {
57+
gpios = <&gpio2 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
58+
label = "Push button 2";
59+
zephyr,code = <INPUT_KEY_2>;
60+
};
61+
button3: button_3 {
62+
gpios = <&gpio2 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
63+
label = "Push button 3";
64+
zephyr,code = <INPUT_KEY_3>;
65+
};
66+
};
67+
68+
aliases {
69+
led0 = &led0;
70+
led1 = &led1;
71+
led2 = &led2;
72+
led3 = &led3;
73+
sw0 = &button0;
74+
sw1 = &button1;
75+
sw2 = &button2;
76+
sw3 = &button3;
77+
};
78+
};
79+
80+
&uart20 {
81+
status = "okay";
82+
current-speed = <115200>;
83+
pinctrl-0 = <&uart20_default>;
84+
pinctrl-1 = <&uart20_sleep>;
85+
pinctrl-names = "default", "sleep";
86+
};
87+
88+
&uart30 {
89+
/* Disable so that TF-M can use this UART */
90+
status = "disabled";
91+
92+
current-speed = <115200>;
93+
pinctrl-0 = <&uart30_default>;
94+
pinctrl-1 = <&uart30_sleep>;
95+
pinctrl-names = "default", "sleep";
96+
};
97+
98+
&grtc {
99+
status = "okay";
100+
};
101+
102+
&gpio0 {
103+
status = "okay";
104+
};
105+
106+
&gpio1 {
107+
status = "okay";
108+
};
109+
110+
&gpio2 {
111+
status = "okay";
112+
};
113+
114+
&gpiote20 {
115+
status = "okay";
116+
};
117+
118+
&gpiote30 {
119+
status = "okay";
120+
};
121+
122+
&ieee802154 {
123+
status = "okay";
124+
};
125+
126+
&temp {
127+
status = "okay";
128+
};
129+
130+
&clock {
131+
status = "okay";
132+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
identifier: nrf54l15pdk/nrf54l15/cpuapp/ns
5+
name: nRF54l15-PDK-nRF54l15-Application-Non-Secure
6+
type: mcu
7+
arch: arm
8+
toolchain:
9+
- gnuarmemb
10+
- xtools
11+
- zephyr
12+
ram: 256
13+
flash: 1524
14+
supported:
15+
- adc
16+
- gpio
17+
- i2c
18+
- spi
19+
- counter
20+
- watchdog
21+
- adc
22+
- i2s
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
# Enable MPU
5+
CONFIG_ARM_MPU=y
6+
7+
# Enable hardware stack protection
8+
CONFIG_HW_STACK_PROTECTION=y
9+
10+
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
11+
12+
# Enable TrustZone-M
13+
CONFIG_ARM_TRUSTZONE_M=y
14+
15+
# This Board implies building Non-Secure firmware
16+
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
17+
18+
# Don't enable the cache in the non-secure image as it is a
19+
# secure-only peripheral on 54l
20+
CONFIG_CACHE_MANAGEMENT=n
21+
CONFIG_EXTERNAL_CACHE=n
22+
23+
CONFIG_UART_CONSOLE=y
24+
CONFIG_CONSOLE=y
25+
CONFIG_SERIAL=y
26+
27+
# Enable GPIO
28+
CONFIG_GPIO=y
29+
30+
# Start SYSCOUNTER on driver init
31+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y

0 commit comments

Comments
 (0)