summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml
blob: b205215b130d131976e20b8a10bcc1715b1dca09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/reserved-memory/reserved-memory.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: /reserved-memory Child Node Common

maintainers:
  - devicetree-spec@vger.kernel.org

description: >
  Reserved memory is specified as a node under the /reserved-memory node. The
  operating system shall exclude reserved memory from normal usage one can
  create child nodes describing particular reserved (excluded from normal use)
  memory regions. Such memory regions are usually designed for the special
  usage by various device drivers.

  Each child of the reserved-memory node specifies one or more regions
  of reserved memory. Each child node may either use a 'reg' property to
  specify a specific range of reserved memory, or a 'size' property with
  optional constraints to request a dynamically allocated block of
  memory.

  Following the generic-names recommended practice, node names should
  reflect the purpose of the node (ie. "framebuffer" or "dma-pool").
  Unit address (@<address>) should be appended to the name if the node
  is a static allocation.

properties:
  reg: true

  size:
    oneOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - $ref: /schemas/types.yaml#/definitions/uint64
    description: >
      Length based on parent's \#size-cells. Size in bytes of memory to
      reserve.

  alignment:
    oneOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - $ref: /schemas/types.yaml#/definitions/uint64
    description: >
      Length based on parent's \#size-cells. Address boundary for
      alignment of allocation.

  alloc-ranges:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: >
      Address and Length pairs. Specifies regions of memory that are
      acceptable to allocate from.

  no-map:
    type: boolean
    description: >
      Indicates the operating system must not create a virtual mapping
      of the region as part of its standard mapping of system memory,
      nor permit speculative access to it under any circumstances other
      than under the control of the device driver using the region.

  reusable:
    type: boolean
    description: >
      The operating system can use the memory in this region with the
      limitation that the device driver(s) owning the region need to be
      able to reclaim it back. Typically that means that the operating
      system can use that region to store volatile or cached data that
      can be otherwise regenerated or migrated elsewhere.

allOf:
  - if:
      required:
        - no-map

    then:
      not:
        required:
          - reusable

  - if:
      required:
        - reusable

    then:
      not:
        required:
          - no-map

oneOf:
  - required:
      - reg

  - required:
      - size

additionalProperties: true

...