Skip to content

Introduce the nrf54lm20bsim simulated target #92390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions boards/native/nrf_bsim/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ config BOARD_NRF54L15BSIM_NRF54L15_CPUAPP
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute

config BOARD_NRF54LM20BSIM_NRF54LM20A_CPUAPP
bool
select SOC_SERIES_BSIM_NRF54LX
select SOC_COMPATIBLE_NRF54LM20A
select SOC_COMPATIBLE_NRF54LM20A_CPUAPP
select CLOCK_CONTROL
help
Simulated NRF54LM20 Application core
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute

if SOC_SERIES_BSIM_NRFXX

Expand Down
5 changes: 5 additions & 0 deletions boards/native/nrf_bsim/Kconfig.nrf54lm20bsim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config BOARD_NRF54LM20BSIM
select SOC_POSIX
5 changes: 5 additions & 0 deletions boards/native/nrf_bsim/board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ boards:
vendor: zephyr
socs:
- name: nrf54l15
- name: nrf54lm20bsim
full_name: nRF54LM20 simulated boards (BabbleSim)
vendor: zephyr
socs:
- name: nrf54lm20a
# Note the 53 and 54 are referring to the real SOC yamls, but we only use their name and cpu-cluster
# definitions. In practice these board uses the same native SOC (SOC_POSIX) as the nrf52_bsim
2 changes: 1 addition & 1 deletion boards/native/nrf_bsim/board_soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define OFFLOAD_SW_IRQ EGU0_IRQn
#elif defined(CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUNET)
#define OFFLOAD_SW_IRQ SWI0_IRQn
#elif defined(CONFIG_BOARD_NRF54L15BSIM)
#elif defined(CONFIG_SOC_SERIES_BSIM_NRF54LX)
#define OFFLOAD_SW_IRQ SWI00_IRQn
#endif

Expand Down
144 changes: 144 additions & 0 deletions boards/native/nrf_bsim/nrf54lm20bsim_nrf54lm20a_cpuapp.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <mem.h>
#include <arm/nordic/nrf54lm20a_enga_cpuapp.dtsi>
#include <../boards/nordic/nrf54lm20dk/nrf54lm20dk_nrf54lm20a-pinctrl.dtsi>

/ {
model = "Nordic NRF54LM20 BSIM NRF54LM20A Application MCU";
compatible = "bsim,nrf54lm20-bsim-nrf54lm20a-cpuapp", "bsim,nrf54";

chosen {
zephyr,console = &uart20;
zephyr,entropy = &rng;
zephyr,bt-c2h-uart = &uart20;
zephyr,flash-controller = &rram_controller;
zephyr,flash = &cpuapp_rram;
};

/delete-node/ cpus;
/delete-node/ sw-pwm;

soc {
/delete-node/ memory@20000000;
/delete-node/ memory@20067c00;

peripheral@50000000 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline on line 31

/delete-node/ vpr@4c000;
/delete-node/ interrupt-controller@f0000000;
/delete-node/spi@4d000;
/delete-node/usbhs@5a000;
/delete-node/i2c@c6000;
/delete-node/spi@c6000;
/delete-node/i2c@c7000;
/delete-node/spi@c7000;
/delete-node/i2c@c8000;
/delete-node/spi@c8000;
/delete-node/pdm@d0000;
/delete-node/pdm@d1000;
/delete-node/pwm@d2000;
/delete-node/pwm@d3000;
/delete-node/pwm@d4000;
/delete-node/adc@d5000;
/delete-node/nfct@d6000;
/delete-node/qdec@e0000;
/delete-node/qdec@e1000;
/delete-node/tdm@e8000;
/delete-node/i2c@ed000;
/delete-node/spi@ed000;
/delete-node/i2c@ee000;
/delete-node/spi@ee000;
/delete-node/i2c@104000;
/delete-node/spi@104000;
/delete-node/comparator@106000;
/delete-node/watchdog@108000;
/delete-node/watchdog@109000;
/delete-node/regulator@120000;
};
};

rng: rng {
status = "okay";
compatible = "nordic,nrf-cracen-ctrdrbg";
};

psa_rng: psa-rng {
status = "disabled";
};
};

&grtc {
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
child-owned-channels = <3 4 7 8 9 10 11>;
status = "okay";
};

&cpuapp_rram {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and 87, fix all instances in whole PR

label = "storage";
reg = <0x0 DT_SIZE_K(500)>;
};
};
};

&uart20 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart20_default>;
pinctrl-1 = <&uart20_sleep>;
pinctrl-names = "default", "sleep";
};

&uart30 {
current-speed = <115200>;
pinctrl-0 = <&uart30_default>;
pinctrl-1 = <&uart30_sleep>;
pinctrl-names = "default", "sleep";
};

&gpio0 {
status = "okay";
};

&gpio1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&gpiote20 {
status = "okay";
};

&gpiote30 {
status = "okay";
};

&temp {
status = "okay";
};

&radio {
status = "okay";
/* These features are not yet supported by the RADIO model */
/delete-property/ dfe-supported;
/delete-property/ cs-supported;
};

&clock {
status = "okay";
};
17 changes: 17 additions & 0 deletions boards/native/nrf_bsim/nrf54lm20bsim_nrf54lm20a_cpuapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
identifier: nrf54lm20bsim/nrf54lm20a/cpuapp
name: NRF54LM20 BabbleSim - Application Core target
type: native
arch: posix
simulation:
- name: native
env:
- BSIM_OUT_PATH
toolchain:
- zephyr
supported:
- counter
- gpio
testing:
ignore_tags:
- modem
- bsim_skip_CI
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 Nordic Semiconductor ASA

CONFIG_CONSOLE=y
CONFIG_NO_OPTIMIZATIONS=y

# Start SYSCOUNTER on driver init
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
2 changes: 2 additions & 0 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54L20_ENGA_CPUFLPR NRF_FLPR)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA NRF54LM20A_ENGA_XXAA)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA_CPUAPP NRF_APPLICATION)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LM20A_ENGA_CPUFLPR NRF_FLPR)
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF54LM20A NRF54LM20A_ENGA_XXAA)
zephyr_compile_definitions_ifdef(CONFIG_SOC_COMPATIBLE_NRF54LM20A_CPUAPP NRF_APPLICATION)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9120 NRF9120_XXAA)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF9160 NRF9160_XXAA)

Expand Down
6 changes: 6 additions & 0 deletions soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ config SOC_COMPATIBLE_NRF54L15
config SOC_COMPATIBLE_NRF54L15_CPUAPP
bool

config SOC_COMPATIBLE_NRF54LM20A
bool

config SOC_COMPATIBLE_NRF54LM20A_CPUAPP
bool

config SOC_DEPRECATED_RELEASE
string
help
Expand Down
4 changes: 4 additions & 0 deletions soc/nordic/nrf54l/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ config SOC_NRF54L10_CPUAPP

config SOC_NRF54L15_CPUAPP
select SOC_NRF54L_CPUAPP_COMMON
select SOC_COMPATIBLE_NRF54L15
select SOC_COMPATIBLE_NRF54L15_CPUAPP

config SOC_NRF54L20_ENGA_CPUAPP
select SOC_NRF54L_CPUAPP_COMMON

config SOC_NRF54LM20A_ENGA_CPUAPP
select SOC_NRF54L_CPUAPP_COMMON
select SOC_COMPATIBLE_NRF54LM20A
select SOC_COMPATIBLE_NRF54LM20A_CPUAPP

config SOC_NRF54L05_CPUFLPR
select RISCV_CORE_NORDIC_VPR
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* SPDX-License-Identifier: Apache-2.0 */

#include "nrf54lm20dk_nrf54lm20_common.dtsi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* SPDX-License-Identifier: Apache-2.0 */

#include "nrf54lm20dk_nrf54lm20a_cpuapp.overlay"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

#include "nrf54lm20dk_nrf54lm20a_cpuapp.overlay"
1 change: 1 addition & 0 deletions tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ common:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
- nrf54lm20dk/nrf54lm20a/cpuapp
- nrf54lm20bsim/nrf54lm20a/cpuapp
- nrf54l15bsim/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf54h20dk/nrf54h20/cpurad
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* SPDX-License-Identifier: Apache-2.0 */

#include "nrf54lm20dk_nrf54lm20a_cpuapp.overlay"
2 changes: 2 additions & 0 deletions tests/drivers/uart/uart_pm/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ common:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
- nrf54lm20dk/nrf54lm20a/cpuapp
- nrf54lm20bsim/nrf54lm20a/cpuapp
- nrf54l15bsim/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf52_bsim
Expand Down Expand Up @@ -37,6 +38,7 @@ tests:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
- nrf54lm20dk/nrf54lm20a/cpuapp
- nrf54lm20bsim/nrf54lm20a/cpuapp
- nrf54l15bsim/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf52_bsim
Expand Down
Loading