# 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 region 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 (@
) should be appended to the name if the node is a static allocation. properties: reg: maxItems: 1 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. iommu-addresses: $ref: /schemas/types.yaml#/definitions/phandle-array description: > A list of phandle and specifier pairs that describe static IO virtual address space mappings associated with a given reserved memory region. The phandle in the first cell refers to the device for which the mapping is to be created. The specifier consists of an address/size pair and denotes the IO virtual address range of the region for the given device. The exact format depends on the values of the "#address-cells" and "#size-cells" properties of the device referenced via the phandle. Must be used in combination with a "reg" property, an IOVA mapping is to be established for this memory region. One example where this can be useful is to create an identity mapping for physical memory that the firmware has configured some hardware to access (such as a bootsplash framebuffer). 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 dependentRequired: iommu-addresses: [reg] additionalProperties: true examples: - | / { compatible = "foo"; model = "foo"; #address-cells = <2>; #size-cells = <2>; reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; fb: framebuffer@90000000 { reg = <0x0 0x90000000 0x0 0x00800000>; iommu-addresses = <&dc0 0x0 0x90000000 0x0 0x00800000>; }; }; bus@0 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x40000000>; dc0: display@15200000 { reg = <0x15200000 0x10000>; memory-region = <&fb>; }; }; }; ...