Skip to content

Commit d8a80b8

Browse files
wearyzennordicjm
authored andcommitted
[nrf fromtree] boards: arm: add support for MPS4 Corstone-320
Add initial support for the MPS4 Corstone-320 platform, including board and SoC definitions. This platform features a Cortex-M85 CPU with an Ethos-U85 NPU and runs in simulation using the FVP_Corstone_SSE-320 Fixed Virtual Platform. Signed-off-by: Sudan Landge <[email protected]> (cherry picked from commit d1e830f)
1 parent ba9655c commit d8a80b8

19 files changed

+769
-0
lines changed

boards/arm/mps4/Kconfig.defconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_MPS4_CORSTONE320_FVP
5+
6+
if SERIAL
7+
8+
config UART_INTERRUPT_DRIVEN
9+
default y
10+
11+
endif # SERIAL
12+
13+
if ROMSTART_RELOCATION_ROM && BOARD_MPS4_CORSTONE320_FVP
14+
15+
config ROMSTART_REGION_ADDRESS
16+
default $(dt_nodelabel_reg_addr_hex,itcm)
17+
18+
config ROMSTART_REGION_SIZE
19+
default $(dt_nodelabel_reg_size_hex,itcm,0,k)
20+
21+
endif
22+
23+
endif

boards/arm/mps4/Kconfig.mps4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MPS4
5+
select SOC_SERIES_MPS4
6+
select SOC_MPS4_CORSTONE320 if BOARD_MPS4_CORSTONE320_FVP || BOARD_MPS4_CORSTONE320_FVP_NS

boards/arm/mps4/board.cmake

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
#
5+
# Default emulation:
6+
# FVP is used by default for corstone320/fvp.
7+
#
8+
9+
10+
if(CONFIG_BOARD_MPS4_CORSTONE320_FVP OR CONFIG_BOARD_MPS4_CORSTONE320_FVP_NS)
11+
set(SUPPORTED_EMU_PLATFORMS armfvp)
12+
set(ARMFVP_BIN_NAME FVP_Corstone_SSE-320)
13+
if(CONFIG_BOARD_MPS4_CORSTONE320_FVP)
14+
set(ARMFVP_FLAGS
15+
# default is '0x11000000' but should match cpu<i>.INITSVTOR which is 0.
16+
-C mps4_board.subsystem.iotss3_systemcontrol.INITSVTOR_RST=0
17+
# default is 0x8, this change is needed since we split flash into itcm
18+
# and sram and it reduces the number of available mpu regions causing a
19+
# few MPU tests to fail.
20+
-C mps4_board.subsystem.cpu0.MPU_S=16
21+
)
22+
endif()
23+
endif()
24+
25+
if(CONFIG_BUILD_WITH_TFM)
26+
set(ARMFVP_FLAGS ${ARMFVP_FLAGS} -a ${APPLICATION_BINARY_DIR}/zephyr/tfm_merged.hex)
27+
endif()
28+
29+
# FVP Parameters
30+
# -C indicate a config option in the form of:
31+
# instance.parameter=value
32+
# Run the FVP with --list-params to list all options
33+
set(ARMFVP_FLAGS ${ARMFVP_FLAGS}
34+
-C mps4_board.uart0.out_file=-
35+
-C mps4_board.uart0.unbuffered_output=1
36+
-C mps4_board.uart1.out_file=-
37+
-C mps4_board.uart1.unbuffered_output=1
38+
-C mps4_board.uart2.out_file=-
39+
-C mps4_board.uart2.unbuffered_output=1
40+
-C mps4_board.visualisation.disable-visualisation=1
41+
-C mps4_board.telnetterminal0.start_telnet=0
42+
-C mps4_board.telnetterminal1.start_telnet=0
43+
-C mps4_board.telnetterminal2.start_telnet=0
44+
-C vis_hdlcd.disable_visualisation=1
45+
)

boards/arm/mps4/board.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
board:
2+
name: mps4
3+
full_name: MPS4
4+
vendor: arm
5+
socs:
6+
- name: 'corstone320'
7+
variants:
8+
- name: 'fvp'
9+
variants:
10+
- name: 'ns'

boards/arm/mps4/mps4_common.dtsi

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* Copyright 2025 Arm Limited and/or its affiliates <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* /dts-v1/; */
8+
9+
#include <arm/armv8.1-m.dtsi>
10+
#include <zephyr/dt-bindings/i2c/i2c.h>
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
13+
#include <mem.h>
14+
15+
/ {
16+
aliases {
17+
led0 = &led_0;
18+
led1 = &led_1;
19+
sw0 = &user_button_0;
20+
sw1 = &user_button_1;
21+
};
22+
23+
leds {
24+
compatible = "gpio-leds";
25+
26+
led_0: led_0 {
27+
gpios = <&gpio_led0 0>;
28+
label = "USERLED0";
29+
};
30+
31+
led_1: led_1 {
32+
gpios = <&gpio_led0 1>;
33+
label = "USERLED1";
34+
};
35+
36+
led_2: led_2 {
37+
gpios = <&gpio_led0 2>;
38+
label = "USERLED2";
39+
};
40+
41+
led_3: led_3 {
42+
gpios = <&gpio_led0 3>;
43+
label = "USERLED3";
44+
};
45+
46+
led_4: led_4 {
47+
gpios = <&gpio_led0 4>;
48+
label = "USERLED4";
49+
};
50+
51+
led_5: led_5 {
52+
gpios = <&gpio_led0 5>;
53+
label = "USERLED5";
54+
};
55+
56+
led_6: led_6 {
57+
gpios = <&gpio_led0 6>;
58+
label = "USERLED6";
59+
};
60+
61+
led_7: led_7 {
62+
gpios = <&gpio_led0 7>;
63+
label = "USERLED7";
64+
};
65+
66+
led_8: led_8 {
67+
gpios = <&gpio_led0 8>;
68+
label = "PB1LED";
69+
};
70+
71+
led_9: led_9 {
72+
gpios = <&gpio_led0 9>;
73+
label = "PB2LED";
74+
};
75+
};
76+
77+
gpio_keys {
78+
compatible = "gpio-keys";
79+
80+
user_button_0: button_0 {
81+
label = "USERPB0";
82+
gpios = <&gpio_button 0>;
83+
zephyr,code = <INPUT_KEY_0>;
84+
};
85+
86+
user_button_1: button_1 {
87+
label = "USERPB1";
88+
gpios = <&gpio_button 1>;
89+
zephyr,code = <INPUT_KEY_1>;
90+
};
91+
};
92+
93+
null_ptr_detect: null_ptr_detect@0 {
94+
compatible = "zephyr,memory-region";
95+
/* 0 - CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE> */
96+
reg = <0x0 0x400>;
97+
zephyr,memory-region = "NULL_PTR_DETECT";
98+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_FLASH) )>;
99+
};
100+
101+
/* DDR4 - 2G, alternates non-secure/secure every 256M */
102+
ddr4: memory@60000000 {
103+
device_type = "memory";
104+
compatible = "zephyr,memory-region";
105+
reg = <0x60000000 DT_SIZE_M(256)
106+
0x70000000 DT_SIZE_M(256)
107+
0x80000000 DT_SIZE_M(256)
108+
0x90000000 DT_SIZE_M(256)
109+
0xa0000000 DT_SIZE_M(256)
110+
0xb0000000 DT_SIZE_M(256)
111+
0xc0000000 DT_SIZE_M(256)
112+
0xd0000000 DT_SIZE_M(256)>;
113+
zephyr,memory-region = "DDR4";
114+
};
115+
};
116+
117+
&nvic {
118+
arm,num-irq-priority-bits = <3>;
119+
};

0 commit comments

Comments
 (0)