Skip to content

Commit 151b510

Browse files
aescolarPerMac
authored andcommitted
[nrf fromtree] boards nrf_bsim: Add a new nrf54lm20bsim target
Add a new simulated nrf54lm20 cpuapp target Signed-off-by: Alberto Escolar Piedras <[email protected]> (cherry picked from commit 5428743)
1 parent fef7db7 commit 151b510

File tree

8 files changed

+192
-1
lines changed

8 files changed

+192
-1
lines changed

boards/native/nrf_bsim/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ config BOARD_NRF54L15BSIM_NRF54L15_CPUAPP
4545
Will produce a console Linux process which can be executed natively.
4646
It needs the BabbleSim simulator both in compile time and to execute
4747

48+
config BOARD_NRF54LM20BSIM_NRF54LM20A_CPUAPP
49+
bool
50+
select SOC_SERIES_BSIM_NRF54LX
51+
select SOC_COMPATIBLE_NRF54LM20A
52+
select SOC_COMPATIBLE_NRF54LM20A_CPUAPP
53+
select CLOCK_CONTROL
54+
help
55+
Simulated NRF54LM20 Application core
56+
Will produce a console Linux process which can be executed natively.
57+
It needs the BabbleSim simulator both in compile time and to execute
4858

4959
if SOC_SERIES_BSIM_NRFXX
5060

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_NRF54LM20BSIM
5+
select SOC_POSIX

boards/native/nrf_bsim/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ boards:
1414
vendor: zephyr
1515
socs:
1616
- name: nrf54l15
17+
- name: nrf54lm20bsim
18+
full_name: nRF54LM20 simulated boards (BabbleSim)
19+
vendor: zephyr
20+
socs:
21+
- name: nrf54lm20a
1722
# Note the 53 and 54 are referring to the real SOC yamls, but we only use their name and cpu-cluster
1823
# definitions. In practice these board uses the same native SOC (SOC_POSIX) as the nrf52_bsim

boards/native/nrf_bsim/board_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define OFFLOAD_SW_IRQ EGU0_IRQn
3939
#elif defined(CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUNET)
4040
#define OFFLOAD_SW_IRQ SWI0_IRQn
41-
#elif defined(CONFIG_BOARD_NRF54L15BSIM)
41+
#elif defined(CONFIG_SOC_SERIES_BSIM_NRF54LX)
4242
#define OFFLOAD_SW_IRQ SWI00_IRQn
4343
#endif
4444

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <mem.h>
10+
#include <arm/nordic/nrf54lm20a_enga_cpuapp.dtsi>
11+
#include <../boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20a-pinctrl.dtsi>
12+
13+
/ {
14+
model = "Nordic NRF54LM20 BSIM NRF54LM20A Application MCU";
15+
compatible = "bsim,nrf54lm20-bsim-nrf54lm20a-cpuapp", "bsim,nrf54";
16+
17+
chosen {
18+
zephyr,console = &uart20;
19+
zephyr,entropy = &rng;
20+
zephyr,bt-c2h-uart = &uart20;
21+
zephyr,flash-controller = &rram_controller;
22+
zephyr,flash = &cpuapp_rram;
23+
};
24+
25+
/delete-node/ cpus;
26+
/delete-node/ sw-pwm;
27+
28+
soc {
29+
/delete-node/ memory@20000000;
30+
/delete-node/ memory@20067c00;
31+
32+
peripheral@50000000 {
33+
/delete-node/ vpr@4c000;
34+
/delete-node/ interrupt-controller@f0000000;
35+
/delete-node/spi@4d000;
36+
/delete-node/usbhs@5a000;
37+
/delete-node/i2c@c6000;
38+
/delete-node/spi@c6000;
39+
/delete-node/i2c@c7000;
40+
/delete-node/spi@c7000;
41+
/delete-node/i2c@c8000;
42+
/delete-node/spi@c8000;
43+
/delete-node/pdm@d0000;
44+
/delete-node/pdm@d1000;
45+
/delete-node/pwm@d2000;
46+
/delete-node/pwm@d3000;
47+
/delete-node/pwm@d4000;
48+
/delete-node/adc@d5000;
49+
/delete-node/nfct@d6000;
50+
/delete-node/qdec@e0000;
51+
/delete-node/qdec@e1000;
52+
/delete-node/tdm@e8000;
53+
/delete-node/i2c@ed000;
54+
/delete-node/spi@ed000;
55+
/delete-node/i2c@ee000;
56+
/delete-node/spi@ee000;
57+
/delete-node/i2c@104000;
58+
/delete-node/spi@104000;
59+
/delete-node/comparator@106000;
60+
/delete-node/watchdog@108000;
61+
/delete-node/watchdog@109000;
62+
/delete-node/regulator@120000;
63+
};
64+
};
65+
66+
rng: rng {
67+
status = "okay";
68+
compatible = "nordic,nrf-cracen-ctrdrbg";
69+
};
70+
71+
psa_rng: psa-rng {
72+
status = "disabled";
73+
};
74+
};
75+
76+
&grtc {
77+
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
78+
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
79+
child-owned-channels = <3 4 7 8 9 10 11>;
80+
status = "okay";
81+
};
82+
83+
&cpuapp_rram {
84+
partitions {
85+
compatible = "fixed-partitions";
86+
#address-cells = <1>;
87+
#size-cells = <1>;
88+
89+
storage_partition: partition@0 {
90+
label = "storage";
91+
reg = <0x0 DT_SIZE_K(500)>;
92+
};
93+
};
94+
};
95+
96+
&uart20 {
97+
status = "okay";
98+
current-speed = <115200>;
99+
pinctrl-0 = <&uart20_default>;
100+
pinctrl-1 = <&uart20_sleep>;
101+
pinctrl-names = "default", "sleep";
102+
};
103+
104+
&uart30 {
105+
current-speed = <115200>;
106+
pinctrl-0 = <&uart30_default>;
107+
pinctrl-1 = <&uart30_sleep>;
108+
pinctrl-names = "default", "sleep";
109+
};
110+
111+
&gpio0 {
112+
status = "okay";
113+
};
114+
115+
&gpio1 {
116+
status = "okay";
117+
};
118+
119+
&gpio2 {
120+
status = "okay";
121+
};
122+
123+
&gpiote20 {
124+
status = "okay";
125+
};
126+
127+
&gpiote30 {
128+
status = "okay";
129+
};
130+
131+
&temp {
132+
status = "okay";
133+
};
134+
135+
&radio {
136+
status = "okay";
137+
/* These features are not yet supported by the RADIO model */
138+
/delete-property/ dfe-supported;
139+
/delete-property/ cs-supported;
140+
};
141+
142+
&clock {
143+
status = "okay";
144+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
identifier: nrf54lm20bsim/nrf54lm20a/cpuapp
2+
name: NRF54LM20 BabbleSim - Application Core target
3+
type: native
4+
arch: posix
5+
simulation:
6+
- name: native
7+
env:
8+
- BSIM_OUT_PATH
9+
toolchain:
10+
- zephyr
11+
supported:
12+
- counter
13+
- gpio
14+
testing:
15+
ignore_tags:
16+
- modem
17+
- bsim_skip_CI
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright (c) 2023 Nordic Semiconductor ASA
3+
4+
CONFIG_CONSOLE=y
5+
CONFIG_NO_OPTIMIZATIONS=y
6+
7+
# Start SYSCOUNTER on driver init
8+
CONFIG_NRF_GRTC_START_SYSCOUNTER=y

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L20_ENGA_CPUFLPR NRF_FLPR)
6666
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA NRF54LM20A_ENGA_XXAA)
6767
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA_CPUAPP NRF_APPLICATION)
6868
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA_CPUFLPR NRF_FLPR)
69+
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF54LM20A NRF54LM20A_ENGA_XXAA)
70+
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF54LM20A_CPUAPP NRF_APPLICATION)
6971
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9120 NRF9120_XXAA)
7072
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9160 NRF9160_XXAA)
7173

0 commit comments

Comments
 (0)