Skip to content

Commit b59d266

Browse files
jonathannilsenrlubos
authored andcommitted
Revert "[nrf fromlist] boards: nordic: nrf54h20dk: refactor RAM memory map"
This reverts commit ba6ff5d. Signed-off-by: Jonathan Nilsen <[email protected]>
1 parent d689e34 commit b59d266

File tree

11 files changed

+153
-34
lines changed

11 files changed

+153
-34
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi

Lines changed: 102 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,62 @@
77

88
/ {
99
reserved-memory {
10-
cpuapp_data: memory@2f000000 {
11-
reg = <0x2f000000 DT_SIZE_K(760)>;
10+
cpuapp_ram0x_region: memory@2f010000 {
11+
compatible = "nordic,owned-memory";
12+
reg = <0x2f010000 DT_SIZE_K(260)>;
13+
status = "disabled";
14+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
15+
#address-cells = <1>;
16+
#size-cells = <1>;
17+
ranges = <0x0 0x2f010000 0x41000>;
18+
19+
cpuapp_data: memory@1000 {
20+
reg = <0x1000 DT_SIZE_K(256)>;
21+
};
1222
};
1323

14-
etr_buffer: memory@2f0be000 {
15-
reg = <0x2f0be000 DT_SIZE_K(4)>;
24+
cpurad_ram0x_region: memory@2f051000 {
25+
compatible = "nordic,owned-memory";
26+
reg = <0x2f051000 DT_SIZE_K(4)>;
27+
status = "disabled";
28+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
29+
#address-cells = <1>;
30+
#size-cells = <1>;
31+
ranges = <0x0 0x2f051000 0x1000>;
1632
};
1733

18-
cpuapp_cpurad_ipc_shm: memory@2f0bf000 {
19-
reg = <0x2f0bf000 DT_SIZE_K(2)>;
34+
etr_buf_ram0x_region: memory@2f0be000 {
35+
compatible = "nordic,owned-memory";
36+
reg = <0x2f0be000 DT_SIZE_K(4)>;
37+
status = "disabled";
38+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
39+
#address-cells = <1>;
40+
#size-cells = <1>;
41+
ranges = <0x0 0x2f0be000 0x1000>;
42+
43+
/* TODO In future move this region to cpuapp_ram0x_region. */
44+
etr_buffer: memory@0 {
45+
reg = <0x0 DT_SIZE_K(4)>;
46+
};
2047
};
2148

22-
cpurad_cpuapp_ipc_shm: memory@2f0bf800 {
23-
reg = <0x2f0bf800 DT_SIZE_K(2)>;
49+
cpuapp_cpurad_ram0x_region: memory@2f0bf000 {
50+
compatible = "nordic,owned-memory";
51+
reg = <0x2f0bf000 DT_SIZE_K(4)>;
52+
status = "disabled";
53+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
54+
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
55+
#address-cells = <1>;
56+
#size-cells = <1>;
57+
ranges = <0x0 0x2f0bf000 0x1000>;
58+
59+
cpuapp_cpurad_ipc_shm: memory@0 {
60+
reg = <0x0 DT_SIZE_K(2)>;
61+
};
62+
63+
cpurad_cpuapp_ipc_shm: memory@800 {
64+
reg = <0x800 DT_SIZE_K(2)>;
65+
};
2466
};
2567

2668
cpuapp_cpusys_ipc_shm: memory@2f88f600 {
@@ -63,53 +105,80 @@
63105
reg = <0x2f88fd00 0x200>;
64106
};
65107

66-
cpuflpr_code_data: memory@2f890000 {
67-
reg = <0x2f890000 DT_SIZE_K(46)>;
68-
};
108+
/*
109+
* NOTE: FLPR has a direct bridge with RAM21 that bypasses MPC.
110+
* This means that when this region is marked as non-executable,
111+
* only FLPR can execute code from it.
112+
*/
113+
ram21_region: memory@2f890000 {
114+
compatible = "nordic,owned-memory";
115+
status = "disabled";
116+
reg = <0x2f890000 DT_SIZE_K(64)>;
117+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
118+
#address-cells = <1>;
119+
#size-cells = <1>;
120+
ranges = <0x0 0x2f890000 0x10000>;
69121

70-
cpuapp_cpuflpr_ipc_shm: memory@2f89b800 {
71-
reg = <0x2f89b800 DT_SIZE_K(1)>;
72-
};
122+
cpuflpr_code_data: memory@0 {
123+
reg = <0x0 DT_SIZE_K(46)>;
124+
};
73125

74-
cpuflpr_cpuapp_ipc_shm: memory@2f89bc00 {
75-
reg = <0x2f89bc00 DT_SIZE_K(1)>;
126+
cpuapp_cpuflpr_ipc_shm: memory@b800 {
127+
reg = <0xb800 DT_SIZE_K(1)>;
128+
};
129+
130+
cpuflpr_cpuapp_ipc_shm: memory@bc00 {
131+
reg = <0xbc00 DT_SIZE_K(1)>;
132+
};
133+
134+
dma_fast_region: memory@c000 {
135+
compatible = "zephyr,memory-region";
136+
reg = <0xc000 DT_SIZE_K(16)>;
137+
status = "disabled";
138+
#memory-region-cells = <0>;
139+
zephyr,memory-region = "DMA_RAM21";
140+
zephyr,memory-attr = <( DT_MEM_DMA | DT_MEM_CACHEABLE )>;
141+
};
76142
};
77143

78-
dma_fast_region: memory@2f89c000 {
79-
compatible = "zephyr,memory-region";
80-
reg = <0x2f89c000 DT_SIZE_K(16)>;
144+
cpuppr_ram3x_region: memory@2fc00000 {
145+
compatible = "nordic,owned-memory";
146+
reg = <0x2fc00000 DT_SIZE_K(64)>;
81147
status = "disabled";
82-
#memory-region-cells = <0>;
83-
zephyr,memory-region = "DMA_RAM21";
84-
zephyr,memory-attr = <( DT_MEM_DMA | DT_MEM_CACHEABLE )>;
85-
};
148+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
149+
#address-cells = <1>;
150+
#size-cells = <1>;
151+
ranges = <0x0 0x2fc00000 0x10000>;
86152

87-
cpuppr_code_data: memory@2fc00000 {
88-
reg = <0x2fc00000 DT_SIZE_K(62)>;
89-
};
153+
cpuppr_code_data: memory@0 {
154+
reg = <0x0 DT_SIZE_K(62)>;
155+
};
90156

91-
cpuapp_cpuppr_ipc_shm: memory@2fc0f800 {
92-
reg = <0x2fc0f800 DT_SIZE_K(1)>;
93-
};
157+
cpuapp_cpuppr_ipc_shm: memory@f800 {
158+
reg = <0xf800 DT_SIZE_K(1)>;
159+
};
94160

95-
cpuppr_cpuapp_ipc_shm: memory@2fc0fc00 {
96-
reg = <0x2fc0fc00 DT_SIZE_K(1)>;
161+
cpuppr_cpuapp_ipc_shm: memory@fc00 {
162+
reg = <0xfc00 DT_SIZE_K(1)>;
163+
};
97164
};
98165

99166
cpuapp_dma_region: memory@2fc12000 {
100-
compatible = "zephyr,memory-region";
167+
compatible = "nordic,owned-memory", "zephyr,memory-region";
101168
reg = <0x2fc12000 DT_SIZE_K(4)>;
102169
status = "disabled";
103170
#memory-region-cells = <0>;
171+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
104172
zephyr,memory-region = "DMA_RAM3x_APP";
105173
zephyr,memory-attr = <( DT_MEM_DMA )>;
106174
};
107175

108176
cpurad_dma_region: memory@2fc13000 {
109-
compatible = "zephyr,memory-region";
177+
compatible = "nordic,owned-memory", "zephyr,memory-region";
110178
reg = <0x2fc13000 DT_SIZE_K(1)>;
111179
status = "disabled";
112180
#memory-region-cells = <0>;
181+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
113182
zephyr,memory-region = "DMA_RAM3x_RAD";
114183
zephyr,memory-attr = <( DT_MEM_DMA )>;
115184
};

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,18 @@
115115
};
116116
};
117117

118+
&cpuapp_ram0x_region {
119+
status = "okay";
120+
};
121+
122+
&etr_buf_ram0x_region {
123+
status = "okay";
124+
};
125+
126+
&ram21_region {
127+
status = "okay";
128+
};
129+
118130
&cpuapp_bellboard {
119131
status = "okay";
120132
interrupts = <96 NRF_DEFAULT_IRQ_PRIORITY>;

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_0_9_0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ toolchain:
99
- gnuarmemb
1010
- zephyr
1111
sysbuild: true
12-
ram: 760
12+
ram: 256
1313
flash: 392
1414
supported:
1515
- adc

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
};
4242
};
4343

44+
&cpuapp_cpurad_ram0x_region {
45+
status = "okay";
46+
};
47+
48+
&cpurad_ram0x_region {
49+
status = "okay";
50+
};
51+
4452
&cpurad_bellboard {
4553
status = "okay";
4654
interrupts = <96 NRF_DEFAULT_IRQ_PRIORITY>;

dts/vendor/nordic/nrf54h20.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <zephyr/dt-bindings/misc/nordic-domain-id-nrf54h20.h>
1515
#include <zephyr/dt-bindings/misc/nordic-owner-id-nrf54h20.h>
1616
#include <zephyr/dt-bindings/misc/nordic-tddconf.h>
17+
#include <zephyr/dt-bindings/reserved-memory/nordic-owned-memory.h>
1718
#include <zephyr/dt-bindings/power/nordic-nrf-gpd.h>
1819

1920
/delete-node/ &sw_pwm;

samples/application_development/code_relocation_nocopy/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
&cpuapp_ram0x_region {
2+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWXS>;
3+
};
4+
15
&xip_region {
26
status = "okay";
7+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RX>;
38
};
49

510
&mx25uw63 {

samples/boards/nordic/coresight_stm/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
status = "okay";
88
};
99

10+
&cpuppr_ram3x_region {
11+
status = "okay";
12+
};
13+
1014
&cpuflpr_vpr {
1115
status = "okay";
1216
};

snippets/nordic-ppr-xip/soc/nrf54h20_cpuapp.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
&cpuppr_ram3x_region {
7+
status = "okay";
8+
};
9+
610
&cpuppr_vpr {
711
execution-memory = <&cpuppr_code_partition>;
812
/delete-property/ source-memory;

snippets/nordic-ppr/soc/nrf54h20_cpuapp.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
&cpuppr_ram3x_region {
7+
status = "okay";
8+
};
9+
610
&uart135 {
711
status = "reserved";
812
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&cpuapp_ram0x_region {
7+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWXS>;
8+
};

0 commit comments

Comments
 (0)