Skip to content

Commit ef6f8c8

Browse files
kl-cruznordicjm
authored andcommitted
[nrf fromtree] board: nrf: Add nRF54LM20DK board
Adding board for nRF54LM20A device. Signed-off-by: Karol Lasończyk <[email protected]> Signed-off-by: Sebastian Głąb <[email protected]> (cherry picked from commit 3d1fa8b)
1 parent 07afe45 commit ef6f8c8

14 files changed

+732
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP
5+
6+
config ROM_START_OFFSET
7+
default 0x800 if BOOTLOADER_MCUBOOT
8+
9+
endif # BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_NRF54LM20DK
5+
select SOC_NRF54LM20A_ENGA_CPUAPP if BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP
6+
select SOC_NRF54LM20A_ENGA_CPUFLPR if BOARD_NRF54LM20DK_NRF54LM20A_CPUFLPR

boards/nordic/nrf54lm20dk/board.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(CONFIG_SOC_NRF54LM20A_ENGA_CPUAPP)
5+
board_runner_args(jlink "--device=cortex-m33" "--speed=4000")
6+
elseif(CONFIG_SOC_NRF54LM20A_ENGA_CPUFLPR)
7+
board_runner_args(jlink "--speed=4000")
8+
endif()
9+
10+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
11+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/nordic/nrf54lm20dk/board.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
board:
2+
name: nrf54lm20dk
3+
full_name: nRF54LM20 DK
4+
vendor: nordic
5+
socs:
6+
- name: nrf54lm20a
7+
variants:
8+
- name: xip
9+
cpucluster: cpuflpr
10+
runners:
11+
run_once:
12+
'--recover':
13+
- runners:
14+
- nrfjprog
15+
- nrfutil
16+
run: first
17+
groups:
18+
- boards:
19+
- nrf54lm20dk/nrf54lm20a/cpuapp
20+
- nrf54lm20dk/nrf54lm20a/cpuflpr
21+
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip
22+
'--erase':
23+
- runners:
24+
- nrfjprog
25+
- jlink
26+
- nrfutil
27+
run: first
28+
groups:
29+
- boards:
30+
- nrf54lm20dk/nrf54lm20a/cpuapp
31+
- nrf54lm20dk/nrf54lm20a/cpuflpr
32+
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip
33+
'--reset':
34+
- runners:
35+
- nrfjprog
36+
- jlink
37+
- nrfutil
38+
run: last
39+
groups:
40+
- boards:
41+
- nrf54lm20dk/nrf54lm20a/cpuapp
42+
- nrf54lm20dk/nrf54lm20a/cpuflpr
43+
- nrf54lm20dk/nrf54lm20a/cpuflpr/xip
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
.. zephyr:board:: nrf54lm20dk
2+
3+
Overview
4+
********
5+
6+
The nRF54LM20 Development Kit hardware provides support for the Nordic Semiconductor
7+
nRF54LM20A Arm Cortex-M33 CPU and the following devices:
8+
9+
* :abbr:`SAADC (Successive Approximation Analog to Digital Converter)`
10+
* CLOCK
11+
* RRAM
12+
* :abbr:`GPIO (General Purpose Input Output)`
13+
* :abbr:`TWIM (I2C-compatible two-wire interface master with EasyDMA)`
14+
* MEMCONF
15+
* :abbr:`MPU (Memory Protection Unit)`
16+
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
17+
* :abbr:`PWM (Pulse Width Modulation)`
18+
* :abbr:`GRTC (Global real-time counter)`
19+
* Segger RTT (RTT Console)
20+
* :abbr:`SPI (Serial Peripheral Interface)`
21+
* :abbr:`UARTE (Universal asynchronous receiver-transmitter)`
22+
* :abbr:`WDT (Watchdog Timer)`
23+
24+
Hardware
25+
********
26+
27+
nRF54LM20 DK has two crystal oscillators:
28+
29+
* High-frequency 32 MHz crystal oscillator (HFXO)
30+
* Low-frequency 32.768 kHz crystal oscillator (LFXO)
31+
32+
The crystal oscillators can be configured to use either
33+
internal or external capacitors.
34+
35+
Supported Features
36+
==================
37+
38+
.. zephyr:board-supported-hw::
39+
40+
Programming and Debugging
41+
*************************
42+
43+
.. zephyr:board-supported-runners::
44+
45+
Applications for the ``nrf54lm20dk/nrf54lm20a/cpuapp`` board target can be
46+
built, flashed, and debugged in the usual way. See
47+
:ref:`build_an_application` and :ref:`application_run` for more details on
48+
building and running.
49+
50+
Applications for the ``nrf54lm20dk/nrf54lm20a/cpuflpr`` board target need
51+
to be built using sysbuild to include the ``vpr_launcher`` image for the application core.
52+
53+
Enter the following command to compile ``hello_world`` for the FLPR core:
54+
55+
.. code-block:: console
56+
57+
west build -p -b nrf54lm20dk/nrf54lm20a/cpuflpr --sysbuild
58+
59+
60+
Flashing
61+
========
62+
63+
As an example, this section shows how to build and flash the :zephyr:code-sample:`hello_world`
64+
application.
65+
66+
.. warning::
67+
68+
When programming the device, you might get an error similar to the following message::
69+
70+
ERROR: The operation attempted is unavailable due to readback protection in
71+
ERROR: your device. Please use --recover to unlock the device.
72+
73+
This error occurs when readback protection is enabled.
74+
To disable the readback protection, you must *recover* your device.
75+
76+
Enter the following command to recover the core::
77+
78+
west flash --recover
79+
80+
The ``--recover`` command erases the flash memory and then writes a small binary into
81+
the recovered flash memory.
82+
This binary prevents the readback protection from enabling itself again after a pin
83+
reset or power cycle.
84+
85+
Follow the instructions in the :ref:`nordic_segger` page to install
86+
and configure all the necessary software. Further information can be
87+
found in :ref:`nordic_segger_flashing`.
88+
89+
To build and program the sample to the nRF54LM20 DK, complete the following steps:
90+
91+
First, connect the nRF54LM20 DK to you computer using the IMCU USB port on the DK.
92+
Next, build the sample by running the following command:
93+
94+
.. zephyr-app-commands::
95+
:zephyr-app: samples/hello_world
96+
:board: nrf54lm20dk/nrf54lm20a/cpuapp
97+
:goals: build flash
98+
99+
Testing the LEDs and buttons in the nRF54LM20 DK
100+
************************************************
101+
102+
Test the nRF54LM20 DK with a :zephyr:code-sample:`blinky` sample.
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* This file is common to the secure and non-secure domain */
8+
9+
#include <nordic/nrf54lm20a_enga_cpuapp.dtsi>
10+
#include "nrf54lm20dk_nrf54lm20a-common.dtsi"
11+
12+
/ {
13+
chosen {
14+
zephyr,console = &uart20;
15+
zephyr,shell-uart = &uart20;
16+
zephyr,uart-mcumgr = &uart20;
17+
zephyr,bt-mon-uart = &uart20;
18+
zephyr,bt-c2h-uart = &uart20;
19+
zephyr,flash-controller = &rram_controller;
20+
zephyr,flash = &cpuapp_rram;
21+
zephyr,bt-hci = &bt_hci_sdc;
22+
zephyr,ieee802154 = &ieee802154;
23+
};
24+
};
25+
26+
&cpuapp_sram {
27+
status = "okay";
28+
};
29+
30+
&hfpll {
31+
clock-frequency = <DT_FREQ_M(128)>;
32+
};
33+
34+
&lfxo {
35+
load-capacitors = "internal";
36+
load-capacitance-femtofarad = <17000>;
37+
};
38+
39+
&hfxo {
40+
load-capacitors = "internal";
41+
load-capacitance-femtofarad = <15000>;
42+
};
43+
44+
&vregmain {
45+
status = "okay";
46+
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
47+
};
48+
49+
&grtc {
50+
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
51+
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
52+
child-owned-channels = <3 4 7 8 9 10 11>;
53+
status = "okay";
54+
};
55+
56+
&cpuapp_rram {
57+
partitions {
58+
compatible = "fixed-partitions";
59+
#address-cells = <1>;
60+
#size-cells = <1>;
61+
62+
boot_partition: partition@0 {
63+
label = "mcuboot";
64+
reg = <0x0 DT_SIZE_K(64)>;
65+
};
66+
67+
slot0_partition: partition@10000 {
68+
label = "image-0";
69+
reg = <0x10000 DT_SIZE_K(449)>;
70+
};
71+
72+
slot0_ns_partition: partition@80400 {
73+
label = "image-0-nonsecure";
74+
reg = <0x80400 DT_SIZE_K(449)>;
75+
};
76+
77+
slot1_partition: partition@f0800 {
78+
label = "image-1";
79+
reg = <0xf0800 DT_SIZE_K(449)>;
80+
};
81+
82+
slot1_ns_partition: partition@160c00 {
83+
label = "image-1-nonsecure";
84+
reg = <0x160c00 DT_SIZE_K(449)>;
85+
};
86+
87+
storage_partition: partition@1d1000 {
88+
label = "storage";
89+
reg = <0x1d1000 DT_SIZE_K(36)>;
90+
};
91+
};
92+
};
93+
94+
&uart20 {
95+
status = "okay";
96+
};
97+
98+
&nfct {
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+
&radio {
123+
status = "okay";
124+
};
125+
126+
&temp {
127+
status = "okay";
128+
};
129+
130+
&clock {
131+
status = "okay";
132+
};
133+
134+
&bt_hci_controller {
135+
status = "okay";
136+
};
137+
138+
&ieee802154 {
139+
status = "okay";
140+
};
141+
142+
zephyr_udc0: &usbhs {
143+
status = "okay";
144+
};
145+
146+
&spi00 {
147+
status = "okay";
148+
cs-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
149+
pinctrl-0 = <&spi00_default>;
150+
pinctrl-1 = <&spi00_sleep>;
151+
pinctrl-names = "default", "sleep";
152+
153+
mx25r64: mx25r6435f@0 {
154+
compatible = "jedec,spi-nor";
155+
status = "disabled";
156+
reg = <0>;
157+
spi-max-frequency = <8000000>;
158+
jedec-id = [c2 28 17];
159+
sfdp-bfp = [
160+
e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
161+
ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
162+
10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 48 44
163+
30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
164+
];
165+
size = <67108864>;
166+
has-dpd;
167+
t-enter-dpd = <10000>;
168+
t-exit-dpd = <35000>;
169+
};
170+
};

0 commit comments

Comments
 (0)