Skip to content

Commit e01b175

Browse files
committed
[nrf fromlist] soc: board: Add nRF54L20 SOC and board
Add necessary files to run nRF54L20 target Upstream PR: zephyrproject-rtos/zephyr#76332 Signed-off-by: Karol Lasończyk <[email protected]>
1 parent bac6ef7 commit e01b175

22 files changed

+2743
-0
lines changed

boards/nordic/nrf54l20pdk/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# nRF54L20 PDK board configuration
2+
3+
# Copyright (c) 2024 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NRF54L20PDK_NRF54L20_CPUAPP
7+
8+
config BOARD_ENABLE_DCDC
9+
bool "DCDC mode"
10+
select SOC_NRF54L_VREG_MAIN_DCDC
11+
default y
12+
13+
endif # BOARD_NRF54L20PDK_NRF54L20_CPUAPP
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: Apache-2.0
3+
4+
if BOARD_NRF54L20PDK_NRF54L20_CPUAPP
5+
6+
config BT_CTLR
7+
default BT
8+
9+
config ROM_START_OFFSET
10+
default 0x800 if BOOTLOADER_MCUBOOT
11+
12+
config SOC_NRF54LX_SKIP_CLOCK_CONFIG
13+
default y
14+
15+
config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
16+
default y
17+
18+
config SOC_NRF54LX_SKIP_TAMPC_SETUP
19+
default y
20+
21+
endif # BOARD_NRF54L20PDK_NRF54L20_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: Apache-2.0
3+
4+
config BOARD_NRF54L20PDK
5+
select SOC_NRF54L20_ENGA_CPUAPP if BOARD_NRF54L20PDK_NRF54L20_CPUAPP
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=cortex-m33" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
8+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
board:
2+
name: nrf54l20pdk
3+
vendor: nordic
4+
socs:
5+
- name: nrf54l20
6+
revision:
7+
format: major.minor.patch
8+
default: "0.0.0"
9+
revisions:
10+
- name: "0.0.0"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.. _nrf54l20pdk_nrf54l20:
2+
3+
nRF54L20 PDK
4+
############
5+
6+
Overview
7+
********
8+
9+
.. note::
10+
11+
All software for the nRF54L20 SoC is experimental and hardware availability
12+
is restricted to the participants in the limited sampling program.
13+
14+
The nRF54L20 Preview Development Kit hardware provides
15+
support for the Nordic Semiconductor nRF54L20 Arm Cortex-M33 CPU and
16+
the following devices:
17+
18+
* CLOCK
19+
* RRAM
20+
* :abbr:`GPIO (General Purpose Input Output)`
21+
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
22+
* :abbr:`UARTE (Universal asynchronous receiver-transmitter)`
23+
24+
Hardware
25+
********
26+
27+
nRF54L20 PDK 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+
The ``nrf54l20pdk/nrf54l20/cpuapp`` board configuration supports the following
39+
hardware features:
40+
41+
+-----------+------------+----------------------+
42+
| Interface | Controller | Driver/Component |
43+
+===========+============+======================+
44+
| CLOCK | on-chip | clock_control |
45+
+-----------+------------+----------------------+
46+
| RRAM | on-chip | flash |
47+
+-----------+------------+----------------------+
48+
| GPIO | on-chip | gpio |
49+
+-----------+------------+----------------------+
50+
| NVIC | on-chip | arch/arm |
51+
+-----------+------------+----------------------+
52+
| UARTE | on-chip | serial |
53+
+-----------+------------+----------------------+
54+
55+
Other hardware features have not been enabled yet for this board.
56+
57+
Programming and Debugging
58+
*************************
59+
60+
Applications for the ``nrf54l20pdk/nrf54l20/cpuapp`` board can be
61+
built, flashed, and debugged in the usual way. See
62+
:ref:`build_an_application` and :ref:`application_run` for more details on
63+
building and running.
64+
65+
Flashing
66+
========
67+
68+
As an example, this section shows how to build and flash the :ref:`hello_world`
69+
application.
70+
71+
Follow the instructions in the :ref:`nordic_segger` page to install
72+
and configure all the necessary software. Further information can be
73+
found in :ref:`nordic_segger_flashing`.
74+
75+
To build and program the sample to the nRF54L20 PDK, complete the following steps:
76+
77+
First, connect the nRF54L20 PDK to you computer using the IMCU USB port on the PDK.
78+
Next, build the sample by running the following command:
79+
80+
.. zephyr-app-commands::
81+
:zephyr-app: samples/hello_world
82+
:board: nrf54l20pdk/nrf54l20/cpuapp
83+
:goals: build flash
84+
85+
Testing the LEDs and buttons in the nRF54L20 PDK
86+
************************************************
87+
88+
Test the nRF54L20 PDK with a :zephyr:code-sample:`blinky` sample.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* Copyright (c) 2024 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/nrf54l20_cpuapp.dtsi>
10+
#include "nrf54l20pdk_nrf54l20-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+
};
22+
};
23+
24+
&cpuapp_sram {
25+
status = "okay";
26+
};
27+
28+
&lfxo {
29+
load-capacitors = "internal";
30+
load-capacitance-femtofarad = <15500>;
31+
};
32+
33+
&hfxo {
34+
load-capacitors = "internal";
35+
load-capacitance-femtofarad = <15000>;
36+
};
37+
38+
&grtc {
39+
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
40+
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
41+
child-owned-channels = <3 4 7 8 9 10 11>;
42+
status = "okay";
43+
};
44+
45+
&cpuapp_rram {
46+
partitions {
47+
compatible = "fixed-partitions";
48+
#address-cells = <1>;
49+
#size-cells = <1>;
50+
boot_partition: partition@0 {
51+
label = "mcuboot";
52+
reg = <0x0 DT_SIZE_K(64)>;
53+
};
54+
slot0_partition: partition@10000 {
55+
label = "image-0";
56+
reg = <0x10000 DT_SIZE_K(449)>;
57+
};
58+
slot0_ns_partition: partition@80400 {
59+
label = "image-0-nonsecure";
60+
reg = <0x80400 DT_SIZE_K(449)>;
61+
};
62+
slot1_partition: partition@f0800 {
63+
label = "image-1";
64+
reg = <0xf0800 DT_SIZE_K(449)>;
65+
};
66+
slot1_ns_partition: partition@160c00 {
67+
label = "image-1-nonsecure";
68+
reg = <0x160c00 DT_SIZE_K(449)>;
69+
};
70+
};
71+
};
72+
73+
&uart20 {
74+
status = "okay";
75+
hw-flow-control;
76+
};
77+
78+
&gpio0 {
79+
status = "okay";
80+
};
81+
82+
&gpio1 {
83+
status = "okay";
84+
};
85+
86+
&gpio2 {
87+
status = "okay";
88+
};
89+
90+
&gpiote20 {
91+
status = "okay";
92+
};
93+
94+
&gpiote30 {
95+
status = "okay";
96+
};
97+
98+
&radio {
99+
status = "okay";
100+
};
101+
102+
&temp {
103+
status = "okay";
104+
};
105+
106+
&clock {
107+
status = "okay";
108+
};
109+
110+
&adc {
111+
status = "okay";
112+
};
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "nrf54l20pdk_nrf54l20-pinctrl.dtsi"
8+
9+
/ {
10+
leds {
11+
compatible = "gpio-leds";
12+
led0: led_0 {
13+
gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
14+
label = "Green LED 0";
15+
};
16+
led1: led_1 {
17+
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
18+
label = "Green LED 1";
19+
};
20+
led2: led_2 {
21+
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
22+
label = "Green LED 2";
23+
};
24+
led3: led_3 {
25+
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
26+
label = "Green LED 3";
27+
};
28+
};
29+
30+
buttons {
31+
compatible = "gpio-keys";
32+
button0: button_0 {
33+
gpios = <&gpio1 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
34+
label = "Push button 0";
35+
zephyr,code = <INPUT_KEY_0>;
36+
};
37+
button1: button_1 {
38+
gpios = <&gpio1 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
39+
label = "Push button 1";
40+
zephyr,code = <INPUT_KEY_1>;
41+
};
42+
button2: button_2 {
43+
gpios = <&gpio1 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
44+
label = "Push button 2";
45+
zephyr,code = <INPUT_KEY_2>;
46+
};
47+
button3: button_3 {
48+
gpios = <&gpio0 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
49+
label = "Push button 3";
50+
zephyr,code = <INPUT_KEY_3>;
51+
};
52+
};
53+
54+
aliases {
55+
led0 = &led0;
56+
led1 = &led1;
57+
led2 = &led2;
58+
led3 = &led3;
59+
sw0 = &button0;
60+
sw1 = &button1;
61+
sw2 = &button2;
62+
sw3 = &button3;
63+
watchdog0 = &wdt31;
64+
};
65+
};
66+
67+
&uart20 {
68+
current-speed = <115200>;
69+
pinctrl-0 = <&uart20_default>;
70+
pinctrl-1 = <&uart20_sleep>;
71+
pinctrl-names = "default", "sleep";
72+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
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+
group2 {
12+
psels = <NRF_PSEL(UART_RX, 1, 5)>;
13+
bias-pull-up;
14+
};
15+
};
16+
17+
/omit-if-no-ref/ uart20_sleep: uart20_sleep {
18+
group1 {
19+
psels = <NRF_PSEL(UART_TX, 1, 4)>,
20+
<NRF_PSEL(UART_RX, 1, 5)>;
21+
low-power-enable;
22+
};
23+
};
24+
};
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: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "nrf54l20_cpuapp_common.dtsi"
10+
11+
/ {
12+
compatible = "nordic,nrf54l20pdk_nrf54l20-cpuapp";
13+
model = "Nordic nRF54L20 PDK nRF54L20 Application MCU";
14+
15+
chosen {
16+
zephyr,code-partition = &slot0_partition;
17+
zephyr,sram = &cpuapp_sram;
18+
};
19+
};

0 commit comments

Comments
 (0)