Skip to content

Commit 3ef8bff

Browse files
kl-cruznika-nordic
authored andcommitted
board: soc: dts: Add nRF54LM20A SOC and Board
Addition of the nRF54LM20A device with corresponding board. Signed-off-by: Karol Lasończyk <[email protected]>
1 parent b62a0ed commit 3ef8bff

18 files changed

+1315
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
if BOARD_NRF54LM20APDK_NRF54LM20A_CPUAPP
5+
6+
config ROM_START_OFFSET
7+
default 0x800 if BOOTLOADER_MCUBOOT
8+
9+
config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
10+
default y
11+
12+
endif # BOARD_NRF54LM20APDK_NRF54LM20A_CPUAPP
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
config BOARD_NRF54LM20APDK
5+
select SOC_NRF54LM20A_ENGA_CPUAPP if BOARD_NRF54LM20APDK_NRF54LM20A_CPUAPP
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
board_runner_args(jlink "--device=cortex-m33" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: nrf54lm20apdk
3+
full_name: nRF54LM20A PDK
4+
vendor: nordic
5+
socs:
6+
- name: nrf54lm20a
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* This file is common to the secure and non-secure domain */
8+
9+
#include <nordic/nrf54lm20a_enga_cpuapp.dtsi>
10+
#include "nrf54lm20apdk_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_controller;
22+
zephyr,ieee802154 = &ieee802154;
23+
};
24+
};
25+
26+
&cpuapp_sram {
27+
status = "okay";
28+
};
29+
30+
&hfpll {
31+
/* For now use 64 MHz clock for CPU and fast peripherals. */
32+
clock-frequency = <DT_FREQ_M(64)>;
33+
};
34+
35+
&lfxo {
36+
load-capacitors = "internal";
37+
load-capacitance-femtofarad = <15500>;
38+
};
39+
40+
&hfxo {
41+
load-capacitors = "internal";
42+
load-capacitance-femtofarad = <15000>;
43+
};
44+
45+
&grtc {
46+
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
47+
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
48+
child-owned-channels = <3 4 7 8 9 10 11>;
49+
status = "okay";
50+
};
51+
52+
&cpuapp_rram {
53+
partitions {
54+
compatible = "fixed-partitions";
55+
#address-cells = <1>;
56+
#size-cells = <1>;
57+
58+
boot_partition: partition@0 {
59+
label = "mcuboot";
60+
reg = <0x0 DT_SIZE_K(64)>;
61+
};
62+
63+
slot0_partition: partition@10000 {
64+
label = "image-0";
65+
reg = <0x10000 DT_SIZE_K(449)>;
66+
};
67+
68+
slot0_ns_partition: partition@80400 {
69+
label = "image-0-nonsecure";
70+
reg = <0x80400 DT_SIZE_K(449)>;
71+
};
72+
73+
slot1_partition: partition@f0800 {
74+
label = "image-1";
75+
reg = <0xf0800 DT_SIZE_K(449)>;
76+
};
77+
78+
slot1_ns_partition: partition@160c00 {
79+
label = "image-1-nonsecure";
80+
reg = <0x160c00 DT_SIZE_K(449)>;
81+
};
82+
};
83+
};
84+
85+
&uart20 {
86+
status = "okay";
87+
};
88+
89+
&gpio0 {
90+
status = "okay";
91+
};
92+
93+
&gpio1 {
94+
status = "okay";
95+
};
96+
97+
&gpio2 {
98+
status = "okay";
99+
};
100+
101+
&gpiote20 {
102+
status = "okay";
103+
};
104+
105+
&gpiote30 {
106+
status = "okay";
107+
};
108+
109+
&radio {
110+
status = "okay";
111+
};
112+
113+
&temp {
114+
status = "okay";
115+
};
116+
117+
&clock {
118+
status = "okay";
119+
};
120+
121+
&bt_hci_controller {
122+
status = "okay";
123+
};
124+
125+
&ieee802154 {
126+
status = "okay";
127+
};
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "nrf54lm20apdk_nrf54lm20a-pinctrl.dtsi"
8+
9+
/ {
10+
leds {
11+
compatible = "gpio-leds";
12+
13+
led0: led_0 {
14+
gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
15+
label = "Green LED 0";
16+
};
17+
18+
led1: led_1 {
19+
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
20+
label = "Green LED 1";
21+
};
22+
23+
led2: led_2 {
24+
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
25+
label = "Green LED 2";
26+
};
27+
28+
led3: led_3 {
29+
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
30+
label = "Green LED 3";
31+
};
32+
};
33+
34+
pwmleds {
35+
compatible = "pwm-leds";
36+
37+
/*
38+
* PWM signal can be exposed on GPIO pin only within same domain.
39+
* There is only one domain which contains both PWM and GPIO:
40+
* PWM20/21/22 and GPIO Port P1/P3.
41+
* Only LEDs connected to P1/P3 can work with PWM, for example LED1.
42+
*/
43+
pwm_led1: pwm_led_1 {
44+
pwms = <&pwm20 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
45+
};
46+
};
47+
48+
buttons {
49+
compatible = "gpio-keys";
50+
51+
button0: button_0 {
52+
gpios = <&gpio1 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
53+
label = "Push button 0";
54+
zephyr,code = <INPUT_KEY_0>;
55+
};
56+
57+
button1: button_1 {
58+
gpios = <&gpio1 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
59+
label = "Push button 1";
60+
zephyr,code = <INPUT_KEY_1>;
61+
};
62+
63+
button2: button_2 {
64+
gpios = <&gpio1 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
65+
label = "Push button 2";
66+
zephyr,code = <INPUT_KEY_2>;
67+
};
68+
69+
button3: button_3 {
70+
gpios = <&gpio0 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
71+
label = "Push button 3";
72+
zephyr,code = <INPUT_KEY_3>;
73+
};
74+
};
75+
76+
aliases {
77+
led0 = &led0;
78+
led1 = &led1;
79+
led2 = &led2;
80+
led3 = &led3;
81+
pwm-led0 = &pwm_led1;
82+
sw0 = &button0;
83+
sw1 = &button1;
84+
sw2 = &button2;
85+
sw3 = &button3;
86+
watchdog0 = &wdt31;
87+
};
88+
};
89+
90+
&uart20 {
91+
current-speed = <115200>;
92+
pinctrl-0 = <&uart20_default>;
93+
pinctrl-1 = <&uart20_sleep>;
94+
pinctrl-names = "default", "sleep";
95+
};
96+
97+
&pwm20 {
98+
status = "okay";
99+
pinctrl-0 = <&pwm20_default>;
100+
pinctrl-1 = <&pwm20_sleep>;
101+
pinctrl-names = "default", "sleep";
102+
};
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
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
&pinctrl {
7+
/omit-if-no-ref/ uart20_default: uart20_default {
8+
group1 {
9+
psels = <NRF_PSEL(UART_TX, 1, 4)>;
10+
};
11+
12+
group2 {
13+
psels = <NRF_PSEL(UART_RX, 1, 5)>;
14+
bias-pull-up;
15+
};
16+
};
17+
18+
/omit-if-no-ref/ uart20_sleep: uart20_sleep {
19+
group1 {
20+
psels = <NRF_PSEL(UART_TX, 1, 4)>,
21+
<NRF_PSEL(UART_RX, 1, 5)>;
22+
low-power-enable;
23+
};
24+
};
25+
26+
/omit-if-no-ref/ pwm20_default: pwm20_default {
27+
group1 {
28+
psels = <NRF_PSEL(PWM_OUT0, 1, 7)>;
29+
};
30+
};
31+
32+
/omit-if-no-ref/ pwm20_sleep: pwm20_sleep {
33+
group1 {
34+
psels = <NRF_PSEL(PWM_OUT0, 1, 7)>;
35+
low-power-enable;
36+
};
37+
};
38+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "nrf54lm20a_cpuapp_common.dtsi"
10+
11+
/ {
12+
compatible = "nordic,nrf54lm20apdk_nrf54lm20a-cpuapp";
13+
model = "Nordic nRF54LM20A PDK nRF54LM20A Application MCU";
14+
15+
chosen {
16+
zephyr,code-partition = &slot0_partition;
17+
zephyr,sram = &cpuapp_sram;
18+
};
19+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
identifier: nrf54lm20apdk/nrf54lm20a/cpuapp
5+
name: nRF54LM20A-PDK-nRF54LM20A-Application
6+
type: mcu
7+
arch: arm
8+
toolchain:
9+
- gnuarmemb
10+
- zephyr
11+
sysbuild: true
12+
ram: 512
13+
flash: 449
14+
supported:
15+
- adc
16+
- counter
17+
- dmic
18+
- gpio
19+
- i2c
20+
- pwm
21+
- watchdog
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
# Enable UART driver
5+
CONFIG_SERIAL=y
6+
7+
# Enable console
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
11+
# Enable GPIO
12+
CONFIG_GPIO=y
13+
14+
# Enable MPU
15+
CONFIG_ARM_MPU=y
16+
17+
# Enable hardware stack protection
18+
CONFIG_HW_STACK_PROTECTION=y
19+
20+
# MPU-based null-pointer dereferencing detection cannot
21+
# be applied as the (0x0 - 0x400) is unmapped for this target.
22+
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
23+
24+
# Enable Cache
25+
CONFIG_CACHE_MANAGEMENT=y
26+
CONFIG_EXTERNAL_CACHE=y
27+
28+
# Start SYSCOUNTER on driver init
29+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y

0 commit comments

Comments
 (0)