diff options
author | Maxime Ripard <maxime@cerno.tech> | 2021-09-01 11:18:05 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-09-13 08:20:18 -0500 |
commit | bf99826f239edf9e9471a25a62e3ed00a0f28c8c (patch) | |
tree | 93b5e5581e138f3fa630743a0c3483b30762db95 /Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml | |
parent | 0e3e0fa76609aa2ea7e1fb78944b63fbf1460594 (diff) | |
download | linux-stable-bf99826f239edf9e9471a25a62e3ed00a0f28c8c.tar.gz linux-stable-bf99826f239edf9e9471a25a62e3ed00a0f28c8c.tar.bz2 linux-stable-bf99826f239edf9e9471a25a62e3ed00a0f28c8c.zip |
dt-bindings: Convert Reserved Memory binding to a schema
Convert the reserved memory bindings to DT schema format. The bindings
are split into schemas for clients, common reserved memory node
properties and a specific binding for shared-dma-pool.
Cc: devicetree-spec@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210901091852.479202-6-maxime@cerno.tech
Diffstat (limited to 'Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml')
-rw-r--r-- | Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml new file mode 100644 index 000000000000..7a0744052ff6 --- /dev/null +++ b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml @@ -0,0 +1,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 Device Tree Bindings + +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: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 2 + description: > + Length based on parent's \#size-cells. Size in bytes of memory to + reserve. + + alignment: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 2 + 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 + +... |