xref: /freebsd/sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.yaml (revision 3a3af6b2a160bea72509a9d5ef84e25906b0478a)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/reserved-memory/reserved-memory.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: /reserved-memory Child Node Common Device Tree Bindings
8
9maintainers:
10  - devicetree-spec@vger.kernel.org
11
12description: >
13  Reserved memory is specified as a node under the /reserved-memory node. The
14  operating system shall exclude reserved memory from normal usage one can
15  create child nodes describing particular reserved (excluded from normal use)
16  memory regions. Such memory regions are usually designed for the special
17  usage by various device drivers.
18
19  Each child of the reserved-memory node specifies one or more regions
20  of reserved memory. Each child node may either use a 'reg' property to
21  specify a specific range of reserved memory, or a 'size' property with
22  optional constraints to request a dynamically allocated block of
23  memory.
24
25  Following the generic-names recommended practice, node names should
26  reflect the purpose of the node (ie. "framebuffer" or "dma-pool").
27  Unit address (@<address>) should be appended to the name if the node
28  is a static allocation.
29
30properties:
31  reg: true
32
33  size:
34    $ref: /schemas/types.yaml#/definitions/uint32-array
35    minItems: 1
36    maxItems: 2
37    description: >
38      Length based on parent's \#size-cells. Size in bytes of memory to
39      reserve.
40
41  alignment:
42    $ref: /schemas/types.yaml#/definitions/uint32-array
43    minItems: 1
44    maxItems: 2
45    description: >
46      Length based on parent's \#size-cells. Address boundary for
47      alignment of allocation.
48
49  alloc-ranges:
50    $ref: /schemas/types.yaml#/definitions/uint32-array
51    description: >
52      Address and Length pairs. Specifies regions of memory that are
53      acceptable to allocate from.
54
55  no-map:
56    type: boolean
57    description: >
58      Indicates the operating system must not create a virtual mapping
59      of the region as part of its standard mapping of system memory,
60      nor permit speculative access to it under any circumstances other
61      than under the control of the device driver using the region.
62
63  reusable:
64    type: boolean
65    description: >
66      The operating system can use the memory in this region with the
67      limitation that the device driver(s) owning the region need to be
68      able to reclaim it back. Typically that means that the operating
69      system can use that region to store volatile or cached data that
70      can be otherwise regenerated or migrated elsewhere.
71
72allOf:
73  - if:
74      required:
75        - no-map
76
77    then:
78      not:
79        required:
80          - reusable
81
82  - if:
83      required:
84        - reusable
85
86    then:
87      not:
88        required:
89          - no-map
90
91oneOf:
92  - required:
93      - reg
94
95  - required:
96      - size
97
98additionalProperties: true
99
100...
101