boards: nordic: Align with updated Nordic owned memory bindings

Apply the following changes to `nrf54h20dk` and `nrf9280pdk`:

* Convert `perm-*` properties to the newly introduced `nordic,access`,
  both in board files and tests.

* Redefine shared regions to specify multiple access owners per node,
  and ensure that each such region is reserved by one domain at a time.
  `cpuapp_cpurad_ram0x_region` is only enabled by Radiocore, while
  `cpuapp_cpucell_ram0x_region` is only enabled by Application core.

* Divide `shared_ram3x_region` so that each sub-region is owned by a
  different domain. Their addresses must be rounded down to fit the
  current UICR format.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
Grzegorz Swiderski 2024-05-03 10:07:30 +02:00 committed by Anas Nashif
commit 13b1cfa5ec
9 changed files with 40 additions and 133 deletions

View file

@ -11,9 +11,7 @@
compatible = "nordic,owned-memory";
reg = <0x2f010000 DT_SIZE_K(260)>;
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f010000 0x41000>;
@ -35,9 +33,7 @@
compatible = "nordic,owned-memory";
reg = <0x2f051000 DT_SIZE_K(4)>;
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f051000 0x1000>;
@ -55,9 +51,7 @@
compatible = "nordic,owned-memory";
reg = <0x2f0be000 DT_SIZE_K(4)>;
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f0be000 0x1000>;
@ -72,8 +66,8 @@
compatible = "nordic,owned-memory";
reg = <0x2f0bf000 DT_SIZE_K(4)>;
status = "disabled";
perm-read;
perm-write;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f0bf000 0x1000>;
@ -111,16 +105,15 @@
};
/*
* NOTE: perm-execute is not required as FLPR has a direct
* bridge with RAM21, bypassing MPC.
* NOTE: FLPR has a direct bridge with RAM21 that bypasses MPC.
* This means that when this region is marked as non-executable,
* only FLPR can execute code from it.
*/
ram21_region: memory@2f890000 {
compatible = "nordic,owned-memory";
status = "disabled";
reg = <0x2f890000 DT_SIZE_K(64)>;
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f890000 0x10000>;
@ -151,9 +144,7 @@
compatible = "nordic,owned-memory";
reg = <0x2fc00000 DT_SIZE_K(64)>;
status = "disabled";
perm-read;
perm-write;
perm-execute;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2fc00000 0x10000>;
@ -172,29 +163,27 @@
};
shared_ram3x_region: memory@2fc12000 {
compatible = "nordic,owned-memory";
reg = <0x2fc12000 DT_SIZE_K(8)>;
status = "disabled";
perm-read;
perm-write;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2fc12000 0x2000>;
cpuapp_dma_region: memory@e80 {
compatible = "zephyr,memory-region";
reg = <0xe80 DT_SIZE_K(3)>;
cpuapp_dma_region: memory@0 {
compatible = "nordic,owned-memory", "zephyr,memory-region";
reg = <0x0 DT_SIZE_K(4)>;
status = "disabled";
#memory-region-cells = <0>;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
zephyr,memory-region = "DMA_RAM3x_APP";
zephyr,memory-attr = <( DT_MEM_DMA )>;
};
cpurad_dma_region: memory@1a80 {
compatible = "zephyr,memory-region";
reg = <0x1a80 0x480>;
cpurad_dma_region: memory@1000 {
compatible = "nordic,owned-memory", "zephyr,memory-region";
reg = <0x1000 DT_SIZE_K(1)>;
status = "disabled";
#memory-region-cells = <0>;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
zephyr,memory-region = "DMA_RAM3x_RAD";
zephyr,memory-attr = <( DT_MEM_DMA )>;
};
@ -206,9 +195,7 @@
cpurad_rx_partitions: cpurad-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-execute;
perm-secure;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RXS>;
#address-cells = <1>;
#size-cells = <1>;
@ -220,9 +207,7 @@
cpuapp_rx_partitions: cpuapp-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-execute;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RXS>;
#address-cells = <1>;
#size-cells = <1>;
@ -242,9 +227,7 @@
cpuapp_rw_partitions: cpuapp-rw-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;

View file

@ -116,14 +116,6 @@
status = "okay";
};
&cpuapp_cpurad_ram0x_region {
status = "okay";
};
&shared_ram3x_region {
status = "okay";
};
&ram21_region {
status = "okay";
};

View file

@ -34,10 +34,6 @@
};
};
&shared_ram3x_region {
status = "okay";
};
&cpuapp_cpurad_ram0x_region {
status = "okay";
};

View file

@ -15,9 +15,7 @@
compatible = "nordic,owned-memory";
reg = <0x2f011000 DT_SIZE_K(4)>;
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f011000 0x1000>;
@ -35,9 +33,7 @@
compatible = "nordic,owned-memory";
reg = <0x2f012000 DT_SIZE_K(516)>;
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f012000 0x81000>;
@ -59,8 +55,8 @@
compatible = "nordic,owned-memory";
reg = <0x2f0cf000 DT_SIZE_K(4)>;
status = "disabled";
perm-read;
perm-write;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f0cf000 0x1000>;
@ -75,8 +71,11 @@
};
cpuapp_cpucell_ram0x_region: memory@2f0d0000 {
compatible = "nordic,owned-memory";
reg = <0x2f0d0000 DT_SIZE_K(36)>;
status = "disabled";
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
<NRF_OWNER_ID_CELL NRF_PERM_RW>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f0d0000 0x9000>;
@ -99,31 +98,6 @@
};
};
/* Shared memory ownership.
* TODO:
* remove these two after https://github.com/zephyrproject-rtos/zephyr/pull/72273
* and let cpuapp_cpucell_ram0x_region use the `access` binding to describe
* the shared memory ownership.
*/
cpuapp_cpucell_ipc_shm: memory@2 {
compatible = "nordic,owned-memory";
reg = <0x2f0d0000 DT_SIZE_K(36)>;
owner-id = <2>;
perm-read;
perm-write;
status = "disabled";
};
cpucell_cpuapp_ipc_shm: memory@4 {
compatible = "nordic,owned-memory";
reg = <0x2f0d0000 DT_SIZE_K(36)>;
owner-id = <4>;
perm-read;
perm-write;
status = "disabled";
};
shared_ram20_region: memory@2f88f000 {
reg = <0x2f88f000 DT_SIZE_K(4)>;
#address-cells = <1>;
@ -151,9 +125,7 @@
compatible = "nordic,owned-memory";
status = "disabled";
reg = <0x2f890000 DT_SIZE_K(32)>;
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2f890000 0x8000>;
@ -172,9 +144,7 @@
compatible = "nordic,owned-memory";
reg = <0x2fc00000 DT_SIZE_K(24)>;
status = "disabled";
perm-read;
perm-write;
perm-execute;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2fc00000 0x6000>;
@ -193,29 +163,27 @@
};
shared_ram3x_region: memory@2fc06000 {
compatible = "nordic,owned-memory";
reg = <0x2fc06000 DT_SIZE_K(8)>;
status = "disabled";
perm-read;
perm-write;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x2fc06000 0x4000>;
cpuapp_dma_region: memory@0 {
compatible = "zephyr,memory-region";
compatible = "nordic,owned-memory", "zephyr,memory-region";
reg = <0x0 DT_SIZE_K(4)>;
status = "disabled";
#memory-region-cells = <0>;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
zephyr,memory-region = "DMA_RAM3x_APP";
zephyr,memory-attr = <( DT_MEM_DMA )>;
};
cpurad_dma_region: memory@1000 {
compatible = "zephyr,memory-region";
reg = <0x1000 0x80>;
compatible = "nordic,owned-memory", "zephyr,memory-region";
reg = <0x1000 DT_SIZE_K(1)>;
status = "disabled";
#memory-region-cells = <0>;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
zephyr,memory-region = "DMA_RAM3x_RAD";
zephyr,memory-attr = <( DT_MEM_DMA )>;
};
@ -227,9 +195,7 @@
cpurad_rx_partitions: cpurad-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-execute;
perm-secure;
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RXS>;
#address-cells = <1>;
#size-cells = <1>;
@ -241,9 +207,7 @@
cpuapp_rx_partitions: cpuapp-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-execute;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RXS>;
#address-cells = <1>;
#size-cells = <1>;
@ -259,9 +223,7 @@
cpuapp_rw_partitions: cpuapp-rw-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-write;
perm-secure;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
#address-cells = <1>;
#size-cells = <1>;

View file

@ -114,19 +114,7 @@
status = "okay";
};
&cpuapp_cpurad_ram0x_region {
status = "okay";
};
&cpuapp_cpucell_ipc_shm {
status = "okay";
};
&cpucell_cpuapp_ipc_shm {
status = "okay";
};
&shared_ram3x_region {
&cpuapp_cpucell_ram0x_region {
status = "okay";
};

View file

@ -35,10 +35,6 @@
};
};
&shared_ram3x_region {
status = "okay";
};
&cpuapp_cpurad_ram0x_region {
status = "okay";
};

View file

@ -4,5 +4,5 @@
*/
&cpuapp_ram0x_region {
perm-execute;
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWXS>;
};

View file

@ -5,11 +5,6 @@
*/
#include "nrf54h20dk_nrf54h20_common.dtsi"
/* Increase dma region to fit dmm heap. */
&cpurad_dma_region {
reg = <0x1e80 0x100>;
};
&spi130 {
memory-regions = <&cpurad_dma_region>;
};

View file

@ -2,11 +2,6 @@
#include "nrf54h20dk_nrf54h20_common.dtsi"
&cpurad_dma_region {
/* Default space is not enough. */
reg = <0x1e80 0x100>;
};
&dut {
memory-regions = <&cpurad_dma_region>;
};