Skip to content

Commit 5bae20b

Browse files
committed
scripts: west_commands: create_board: initial support for nRF54H20
Add initial support for nRF54H20 based boards. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent b6211b8 commit 5bae20b

17 files changed

+725
-1
lines changed

scripts/west_commands/create_board/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,30 @@ products:
7171
arch: arm
7272
ram: 188
7373
flash: 324
74+
- series: nrf54h
75+
socs:
76+
- name: nrf54h20
77+
variants:
78+
- name: ckaa
79+
cores:
80+
- name: cpuapp
81+
arch: arm
82+
ram: 256
83+
flash: 296
84+
- name: cpurad
85+
arch: arm
86+
ram: 192
87+
flash: 256
88+
- name: cpuppr
89+
arch: riscv
90+
ram: 62
91+
flash: 62
92+
xip: true
93+
- name: cpuflpr
94+
arch: riscv
95+
ram: 46
96+
flash: 46
97+
xip: true
7498
- series: nrf91
7599
socs:
76100
- name: nrf9131

scripts/west_commands/create_board/ncs_create_board.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ def do_run(self, args, unknown_args):
185185
tmpl = TEMPLATE_DIR / series / "board-shared_sram.dtsi"
186186
shutil.copy(tmpl, out_dir / f"{ input['board'] }-shared_sram.dtsi")
187187

188+
# nrf54H specific files
189+
if series == "nrf54h":
190+
tmpl = TEMPLATE_DIR / series / "board-ipc_conf.dtsi"
191+
shutil.copy(tmpl, out_dir / f"{ input['board'] }-ipc_conf.dtsi")
192+
193+
tmpl = TEMPLATE_DIR / series / "board-memory_map.dtsi"
194+
shutil.copy(tmpl, out_dir / f"{ input['board'] }-memory_map.dtsi")
195+
188196
# nrf91 specific files
189197
if series == "nrf91":
190198
tmpl = env.get_template("board-partitioning.dtsi.jinja2")
@@ -205,7 +213,11 @@ def do_run(self, args, unknown_args):
205213
with open(out_dir / f"{ name }_defconfig", "w") as f:
206214
f.write(tmpl.render(target=target))
207215

208-
tmpl = env.get_template("board.dts.jinja2")
216+
if not target["xip"]:
217+
tmpl = env.get_template("board.dts.jinja2")
218+
else:
219+
tmpl = env.get_template("board-xip.dts.jinja2")
220+
209221
with open(out_dir / f"{name}.dts", "w") as f:
210222
f.write(tmpl.render(target=target))
211223

scripts/west_commands/create_board/schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"nRF52840-QFAA",
4040
"nRF52840-QIAA",
4141
"nRF5340-QKAA",
42+
"nRF54H20-CKAA",
4243
"nRF54L15-QFAA",
4344
"nRF9131-LACA",
4445
"nRF9151-LACA",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
config BOARD_{{ board | upper }}
2+
select SOC_NRF54H20_CPUAPP if BOARD_{{ board | upper }}_NRF54H20_CPUAPP
3+
select SOC_NRF54H20_CPURAD if BOARD_{{ board | upper }}_NRF54H20_CPURAD
4+
select SOC_NRF54H20_CPUPPR if BOARD_{{ board | upper }}_NRF54H20_CPUPPR || \
5+
BOARD_{{ board | upper }}_NRF54H20_CPUPPR_XIP
6+
select SOC_NRF54H20_CPUFLPR if BOARD_{{ board | upper }}_NRF54H20_CPUFLPR || \
7+
BOARD_{{ board | upper }}_NRF54H20_CPUFLPR_XIP
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if BOARD_{{ board | upper }}_NRF54H20_CPUAPP
2+
3+
config BT_HCI_IPC
4+
default y if BT
5+
6+
endif # BOARD_{{ board | upper }}_NRF54H20_CPUAPP
7+
8+
if BOARD_{{ board | upper }}_NRF54H20_CPURAD
9+
10+
config BT_CTLR
11+
default y if BT
12+
13+
endif # BOARD_{{ board | upper }}_NRF54H20_CPURAD
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "{{ board }}-memory_map.dtsi"
2+
#include "{{ board }}-ipc_conf.dtsi"
3+
#include "{{ board }}-pinctrl.dtsi"
4+
5+
&hfxo {
6+
status = "okay";
7+
accuracy-ppm = <30>;
8+
startup-time-us = <850>;
9+
mode = "crystal";
10+
};
11+
12+
&lfxo {
13+
status = "okay";
14+
accuracy-ppm = <20>;
15+
startup-time-us = <600000>;
16+
mode = "crystal";
17+
};
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/ {
2+
ipc {
3+
cpusec_cpuapp_ipc: ipc-1-2 {
4+
compatible = "zephyr,ipc-icmsg";
5+
status = "disabled";
6+
dcache-alignment = <32>;
7+
mboxes = <&cpusec_bellboard 12>,
8+
<&cpuapp_bellboard 0>;
9+
};
10+
11+
cpusec_cpurad_ipc: ipc-1-3 {
12+
compatible = "zephyr,ipc-icmsg";
13+
status = "disabled";
14+
dcache-alignment = <32>;
15+
mboxes = <&cpusec_bellboard 18>,
16+
<&cpurad_bellboard 0>;
17+
};
18+
19+
cpuapp_cpurad_ipc: ipc-2-3 {
20+
compatible = "zephyr,ipc-icbmsg";
21+
dcache-alignment = <32>;
22+
status = "disabled";
23+
mboxes = <&cpuapp_bellboard 18>,
24+
<&cpurad_bellboard 12>;
25+
};
26+
27+
cpuapp_cpusys_ipc: ipc-2-12 {
28+
compatible = "zephyr,ipc-icmsg";
29+
status = "disabled";
30+
dcache-alignment = <32>;
31+
mboxes = <&cpuapp_bellboard 6>,
32+
<&cpusys_vevif 12>;
33+
};
34+
35+
cpuapp_cpuppr_ipc: ipc-2-13 {
36+
compatible = "zephyr,ipc-icmsg";
37+
status = "disabled";
38+
dcache-alignment = <32>;
39+
mboxes = <&cpuapp_bellboard 13>,
40+
<&cpuppr_vevif 12>;
41+
};
42+
43+
cpuapp_cpuflpr_ipc: ipc-2-14 {
44+
compatible = "zephyr,ipc-icmsg";
45+
status = "disabled";
46+
dcache-alignment = <32>;
47+
mboxes = <&cpuapp_bellboard 14>,
48+
<&cpuflpr_vevif 16>;
49+
};
50+
51+
cpurad_cpusys_ipc: ipc-3-12 {
52+
compatible = "zephyr,ipc-icmsg";
53+
status = "disabled";
54+
dcache-alignment = <32>;
55+
mboxes = <&cpurad_bellboard 6>,
56+
<&cpusys_vevif 18>;
57+
};
58+
};
59+
};
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
#include <zephyr/dt-bindings/memory-attr/memory-attr.h>
2+
3+
&suit_storage_partition {
4+
reg = <0xe1eb000 DT_SIZE_K(24)>;
5+
};
6+
7+
/ {
8+
reserved-memory {
9+
cpuapp_ram0x_region: memory@2f010000 {
10+
compatible = "nordic,owned-memory";
11+
reg = <0x2f010000 DT_SIZE_K(260)>;
12+
status = "disabled";
13+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
14+
#address-cells = <1>;
15+
#size-cells = <1>;
16+
ranges = <0x0 0x2f010000 0x41000>;
17+
18+
cpusec_cpuapp_ipc_shm: memory@0 {
19+
reg = <0x0 DT_SIZE_K(2)>;
20+
};
21+
22+
cpuapp_cpusec_ipc_shm: memory@800 {
23+
reg = <0x800 DT_SIZE_K(2)>;
24+
};
25+
26+
cpuapp_data: memory@1000 {
27+
reg = <0x1000 DT_SIZE_K(256)>;
28+
};
29+
};
30+
31+
cpurad_ram0x_region: memory@2f051000 {
32+
compatible = "nordic,owned-memory";
33+
reg = <0x2f051000 DT_SIZE_K(4)>;
34+
status = "disabled";
35+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
36+
#address-cells = <1>;
37+
#size-cells = <1>;
38+
ranges = <0x0 0x2f051000 0x1000>;
39+
40+
cpusec_cpurad_ipc_shm: memory@0 {
41+
reg = <0x0 DT_SIZE_K(2)>;
42+
};
43+
44+
cpurad_cpusec_ipc_shm: memory@800 {
45+
reg = <0x800 DT_SIZE_K(2)>;
46+
};
47+
};
48+
49+
etr_buf_ram0x_region: memory@2f0be000 {
50+
compatible = "nordic,owned-memory";
51+
reg = <0x2f0be000 DT_SIZE_K(4)>;
52+
status = "disabled";
53+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
54+
#address-cells = <1>;
55+
#size-cells = <1>;
56+
ranges = <0x0 0x2f0be000 0x1000>;
57+
58+
/* TODO In future move this region to cpuapp_ram0x_region. */
59+
etr_buffer: memory@0 {
60+
reg = <0x0 DT_SIZE_K(4)>;
61+
};
62+
};
63+
64+
cpuapp_cpurad_ram0x_region: memory@2f0bf000 {
65+
compatible = "nordic,owned-memory";
66+
reg = <0x2f0bf000 DT_SIZE_K(4)>;
67+
status = "disabled";
68+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
69+
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
70+
#address-cells = <1>;
71+
#size-cells = <1>;
72+
ranges = <0x0 0x2f0bf000 0x1000>;
73+
74+
cpuapp_cpurad_ipc_shm: memory@0 {
75+
reg = <0x0 DT_SIZE_K(2)>;
76+
};
77+
78+
cpurad_cpuapp_ipc_shm: memory@800 {
79+
reg = <0x800 DT_SIZE_K(2)>;
80+
};
81+
};
82+
83+
cpuapp_cpusys_ipc_shm: memory@2f88fce0 {
84+
reg = <0x2f88fce0 0x80>;
85+
};
86+
87+
cpusys_cpuapp_ipc_shm: memory@2f88fd60 {
88+
reg = <0x2f88fd60 0x80>;
89+
};
90+
91+
cpurad_cpusys_ipc_shm: memory@2f88fe00 {
92+
reg = <0x2f88fe00 0x80>;
93+
};
94+
95+
cpusys_cpurad_ipc_shm: memory@2f88fe80 {
96+
reg = <0x2f88fe80 0x80>;
97+
};
98+
99+
/*
100+
* NOTE: FLPR has a direct bridge with RAM21 that bypasses MPC.
101+
* This means that when this region is marked as non-executable,
102+
* only FLPR can execute code from it.
103+
*/
104+
ram21_region: memory@2f890000 {
105+
compatible = "nordic,owned-memory";
106+
status = "disabled";
107+
reg = <0x2f890000 DT_SIZE_K(64)>;
108+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
109+
#address-cells = <1>;
110+
#size-cells = <1>;
111+
ranges = <0x0 0x2f890000 0x10000>;
112+
113+
cpuflpr_code_data: memory@0 {
114+
reg = <0x0 DT_SIZE_K(46)>;
115+
};
116+
117+
cpuapp_cpuflpr_ipc_shm: memory@b800 {
118+
reg = <0xb800 DT_SIZE_K(1)>;
119+
};
120+
121+
cpuflpr_cpuapp_ipc_shm: memory@bc00 {
122+
reg = <0xbc00 DT_SIZE_K(1)>;
123+
};
124+
125+
dma_fast_region: memory@c000 {
126+
compatible = "zephyr,memory-region";
127+
reg = <0xc000 DT_SIZE_K(16)>;
128+
status = "disabled";
129+
#memory-region-cells = <0>;
130+
zephyr,memory-region = "DMA_RAM21";
131+
zephyr,memory-attr = <( DT_MEM_DMA | DT_MEM_CACHEABLE )>;
132+
};
133+
};
134+
135+
cpuppr_ram3x_region: memory@2fc00000 {
136+
compatible = "nordic,owned-memory";
137+
reg = <0x2fc00000 DT_SIZE_K(64)>;
138+
status = "disabled";
139+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
140+
#address-cells = <1>;
141+
#size-cells = <1>;
142+
ranges = <0x0 0x2fc00000 0x10000>;
143+
144+
cpuppr_code_data: memory@0 {
145+
reg = <0x0 DT_SIZE_K(62)>;
146+
};
147+
148+
cpuapp_cpuppr_ipc_shm: memory@f800 {
149+
reg = <0xf800 DT_SIZE_K(1)>;
150+
};
151+
152+
cpuppr_cpuapp_ipc_shm: memory@fc00 {
153+
reg = <0xfc00 DT_SIZE_K(1)>;
154+
};
155+
};
156+
157+
cpuapp_dma_region: memory@2fc12000 {
158+
compatible = "nordic,owned-memory", "zephyr,memory-region";
159+
reg = <0x2fc12000 DT_SIZE_K(4)>;
160+
status = "disabled";
161+
#memory-region-cells = <0>;
162+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
163+
zephyr,memory-region = "DMA_RAM3x_APP";
164+
zephyr,memory-attr = <( DT_MEM_DMA )>;
165+
};
166+
167+
cpurad_dma_region: memory@2fc13000 {
168+
compatible = "nordic,owned-memory", "zephyr,memory-region";
169+
reg = <0x2fc13000 DT_SIZE_K(1)>;
170+
status = "disabled";
171+
#memory-region-cells = <0>;
172+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
173+
zephyr,memory-region = "DMA_RAM3x_RAD";
174+
zephyr,memory-attr = <( DT_MEM_DMA )>;
175+
};
176+
};
177+
};
178+
179+
&mram1x {
180+
cpurad_rx_partitions: cpurad-rx-partitions {
181+
compatible = "nordic,owned-partitions", "fixed-partitions";
182+
status = "disabled";
183+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RXS>;
184+
#address-cells = <1>;
185+
#size-cells = <1>;
186+
187+
cpurad_slot0_partition: partition@66000 {
188+
reg = <0x66000 DT_SIZE_K(256)>;
189+
};
190+
};
191+
192+
cpuapp_rx_partitions: cpuapp-rx-partitions {
193+
compatible = "nordic,owned-partitions", "fixed-partitions";
194+
status = "disabled";
195+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RXS>;
196+
#address-cells = <1>;
197+
#size-cells = <1>;
198+
199+
cpuapp_slot0_partition: partition@a6000 {
200+
reg = <0xa6000 DT_SIZE_K(248)>;
201+
};
202+
203+
cpuppr_code_partition: partition@e4000 {
204+
reg = <0xe4000 DT_SIZE_K(64)>;
205+
};
206+
207+
cpuflpr_code_partition: partition@f4000 {
208+
reg = <0xf4000 DT_SIZE_K(48)>;
209+
};
210+
};
211+
212+
cpuapp_rw_partitions: cpuapp-rw-partitions {
213+
compatible = "nordic,owned-partitions", "fixed-partitions";
214+
status = "disabled";
215+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
216+
#address-cells = <1>;
217+
#size-cells = <1>;
218+
219+
dfu_partition: partition@100000 {
220+
reg = < 0x100000 DT_SIZE_K(908) >;
221+
};
222+
223+
storage_partition: partition@1e3000 {
224+
reg = < 0x1e3000 DT_SIZE_K(24) >;
225+
};
226+
};
227+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
&pinctrl {
2+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "{{ board }}_nrf54h20_{{ target["core"] }}.dts"

0 commit comments

Comments
 (0)