1# Copyright (c) 2024 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5  Nordic Owned Memory
6
7  Memory region with permission attributes. Each enabled region of this kind
8  will be recorded in the UICR of the compiled domain. Memory ownership and
9  access is then configured for the domain at boot time, based on the UICR.
10
11  Example:
12
13    reserved-memory {
14        memory@2fc00000 {
15            compatible = "nordic,owned-memory";
16            reg = <0x2fc00000 0x1000>;
17            status = "okay";
18            nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_R>,
19                            <NRF_OWNER_ID_RADIOCORE NRF_PERM_W>;
20        };
21    };
22
23  A single local domain can request a memory region to be reserved on behalf of
24  multiple access owners. A single memory region shall be reserved by at most
25  one domain, by setting status "okay" on the associated node. For example, if
26  the region defined above is enabled by Application on behalf of Radiocore,
27  then the Radiocore's devicetree must set status "disabled" on that node.
28
29  Each of the different owners may have a different set of permissions granted,
30  as also shown above.
31
32  Note: one domain can also reserve memory for another domain and not itself.
33  Whichever domain has status "okay" set on the node does not need to be listed
34  as one of the access owners.
35
36compatible: "nordic,owned-memory"
37
38include: [base.yaml, "zephyr,memory-common.yaml"]
39
40properties:
41  reg:
42    required: true
43
44  nordic,access:
45    type: array
46    description: |
47      Array of (owner-id, permission-flags) pairs, where:
48
49      - Owner ID represents the domain that will have access to this memory.
50        Valid values can be found in dts/common/nordic/<soc>.dtsi,
51        where they are defined as NRF_OWNER_ID_*
52
53      - Permissions are encoded as a 32-bit bitfield, using the flags found in
54        include/zephyr/dt-bindings/reserved-memory/nordic-owned-memory.h,
55        where they are defined as NRF_PERM_*
56
57        The same file defines all possible permission flag combinations.
58        For example, one can use:
59          <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>
60
61        as a shorthand for:
62          <NRF_OWNER_ID_APPLICATION (NRF_PERM_R | NRF_PERM_W | NRF_PERM_X)>
63
64  owner-id:
65    type: int
66    deprecated: true
67    description: |
68      Deprecated, applies only if 'nordic,access' is not defined.
69      Owner ID of the domain that will own this memory region. If not defined,
70      the ownership will default to the domain being compiled.
71
72      Note: owner ID is not the same as domain ID; see the product specification
73      for details.
74
75  perm-read:
76    type: boolean
77    deprecated: true
78    description: |
79      Deprecated, applies only if 'nordic,access' is not defined.
80      Owner has read access to the region.
81
82  perm-write:
83    type: boolean
84    deprecated: true
85    description: |
86      Deprecated, applies only if 'nordic,access' is not defined.
87      Owner has write access to the region.
88
89  perm-execute:
90    type: boolean
91    deprecated: true
92    description: |
93      Deprecated, applies only if 'nordic,access' is not defined.
94      Owner can execute code from the region.
95
96  perm-secure:
97    type: boolean
98    deprecated: true
99    description: |
100      Deprecated, applies only if 'nordic,access' is not defined.
101      Owner has secure-only access to the region.
102
103  non-secure-callable:
104    type: boolean
105    deprecated: true
106    description: |
107      Deprecated, applies only if 'nordic,access' is not defined.
108      Memory region is used for non-secure-callable code.
109