Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Drop kernel copy of common reserved-memory bindings

The common reserved-memory bindings have recently been copied from the
kernel tree into dtschema. The preference is to host common, stable
bindings in dtschema. As reserved-memory is documented in the DT Spec,
it meets the criteria.

The v2023.09 version of dtschema is what contains the reserved-memory
schemas we depend on, so bump the minimum version to that. Otherwise,
references to these schemas will generate errors.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20231013200851.347042-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

+4 -374
+1 -1
Documentation/devicetree/bindings/Makefile
··· 6 6 DT_SCHEMA_LINT = $(shell which yamllint || \ 7 7 echo "warning: python package 'yamllint' not installed, skipping" >&2) 8 8 9 - DT_SCHEMA_MIN_VERSION = 2022.3 9 + DT_SCHEMA_MIN_VERSION = 2023.9 10 10 11 11 PHONY += check_dtschema_version 12 12 check_dtschema_version:
+1 -1
Documentation/devicetree/bindings/remoteproc/renesas,rcar-rproc.yaml
··· 31 31 remoteproc device. This is variable and describes the memories shared with 32 32 the remote processor (e.g. remoteproc firmware and carveouts, rpmsg 33 33 vrings, ...). 34 - (see ../reserved-memory/reserved-memory.yaml) 34 + (see reserved-memory/reserved-memory.yaml in dtschema project) 35 35 36 36 required: 37 37 - compatible
-52
Documentation/devicetree/bindings/reserved-memory/framebuffer.yaml
··· 1 - # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 - %YAML 1.2 3 - --- 4 - $id: http://devicetree.org/schemas/reserved-memory/framebuffer.yaml# 5 - $schema: http://devicetree.org/meta-schemas/core.yaml# 6 - 7 - title: /reserved-memory framebuffer node 8 - 9 - maintainers: 10 - - devicetree-spec@vger.kernel.org 11 - 12 - allOf: 13 - - $ref: reserved-memory.yaml 14 - 15 - properties: 16 - compatible: 17 - const: framebuffer 18 - description: > 19 - This indicates a region of memory meant to be used as a framebuffer for 20 - a set of display devices. It can be used by an operating system to keep 21 - the framebuffer from being overwritten and use it as the backing memory 22 - for a display device (such as simple-framebuffer). 23 - 24 - unevaluatedProperties: false 25 - 26 - examples: 27 - - | 28 - / { 29 - compatible = "foo"; 30 - model = "foo"; 31 - #address-cells = <1>; 32 - #size-cells = <1>; 33 - 34 - chosen { 35 - framebuffer { 36 - compatible = "simple-framebuffer"; 37 - memory-region = <&fb>; 38 - }; 39 - }; 40 - 41 - reserved-memory { 42 - #address-cells = <1>; 43 - #size-cells = <1>; 44 - ranges; 45 - 46 - fb: framebuffer@80000000 { 47 - compatible = "framebuffer"; 48 - reg = <0x80000000 0x007e9000>; 49 - }; 50 - }; 51 - }; 52 - ...
-40
Documentation/devicetree/bindings/reserved-memory/memory-region.yaml
··· 1 - # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 - %YAML 1.2 3 - --- 4 - $id: http://devicetree.org/schemas/reserved-memory/memory-region.yaml# 5 - $schema: http://devicetree.org/meta-schemas/core.yaml# 6 - 7 - title: Reserved Memory Region 8 - 9 - maintainers: 10 - - devicetree-spec@vger.kernel.org 11 - 12 - description: | 13 - Regions in the /reserved-memory node may be referenced by other device 14 - nodes by adding a memory-region property to the device node. 15 - 16 - select: true 17 - 18 - properties: 19 - memory-region: 20 - $ref: /schemas/types.yaml#/definitions/phandle-array 21 - description: > 22 - Phandle to a /reserved-memory child node assigned to the device. 23 - 24 - memory-region-names: 25 - $ref: /schemas/types.yaml#/definitions/string-array 26 - description: > 27 - A list of names, one for each corresponding entry in the 28 - memory-region property 29 - 30 - additionalProperties: true 31 - 32 - examples: 33 - - | 34 - fb0: video@12300000 { 35 - /* ... */ 36 - reg = <0x12300000 0x1000>; 37 - memory-region = <&display_reserved>; 38 - }; 39 - 40 - ...
+1 -1
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
··· 1 - This file has been moved to reserved-memory.yaml. 1 + This file has been moved to reserved-memory.yaml in the dtschema repository.
-181
Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml
··· 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 - 7 - title: /reserved-memory Child Node Common 8 - 9 - maintainers: 10 - - devicetree-spec@vger.kernel.org 11 - 12 - description: > 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 - 30 - properties: 31 - reg: true 32 - 33 - size: 34 - oneOf: 35 - - $ref: /schemas/types.yaml#/definitions/uint32 36 - - $ref: /schemas/types.yaml#/definitions/uint64 37 - description: > 38 - Length based on parent's \#size-cells. Size in bytes of memory to 39 - reserve. 40 - 41 - alignment: 42 - oneOf: 43 - - $ref: /schemas/types.yaml#/definitions/uint32 44 - - $ref: /schemas/types.yaml#/definitions/uint64 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 - iommu-addresses: 56 - $ref: /schemas/types.yaml#/definitions/phandle-array 57 - description: > 58 - A list of phandle and specifier pairs that describe static IO virtual 59 - address space mappings and carveouts associated with a given reserved 60 - memory region. The phandle in the first cell refers to the device for 61 - which the mapping or carveout is to be created. 62 - 63 - The specifier consists of an address/size pair and denotes the IO 64 - virtual address range of the region for the given device. The exact 65 - format depends on the values of the "#address-cells" and "#size-cells" 66 - properties of the device referenced via the phandle. 67 - 68 - When used in combination with a "reg" property, an IOVA mapping is to 69 - be established for this memory region. One example where this can be 70 - useful is to create an identity mapping for physical memory that the 71 - firmware has configured some hardware to access (such as a bootsplash 72 - framebuffer). 73 - 74 - If no "reg" property is specified, the "iommu-addresses" property 75 - defines carveout regions in the IOVA space for the given device. This 76 - can be useful if a certain memory region should not be mapped through 77 - the IOMMU. 78 - 79 - no-map: 80 - type: boolean 81 - description: > 82 - Indicates the operating system must not create a virtual mapping 83 - of the region as part of its standard mapping of system memory, 84 - nor permit speculative access to it under any circumstances other 85 - than under the control of the device driver using the region. 86 - 87 - reusable: 88 - type: boolean 89 - description: > 90 - The operating system can use the memory in this region with the 91 - limitation that the device driver(s) owning the region need to be 92 - able to reclaim it back. Typically that means that the operating 93 - system can use that region to store volatile or cached data that 94 - can be otherwise regenerated or migrated elsewhere. 95 - 96 - allOf: 97 - - if: 98 - required: 99 - - no-map 100 - 101 - then: 102 - not: 103 - required: 104 - - reusable 105 - 106 - - if: 107 - required: 108 - - reusable 109 - 110 - then: 111 - not: 112 - required: 113 - - no-map 114 - 115 - oneOf: 116 - - oneOf: 117 - - required: 118 - - reg 119 - 120 - - required: 121 - - size 122 - 123 - - oneOf: 124 - # IOMMU reservations 125 - - required: 126 - - iommu-addresses 127 - 128 - # IOMMU mappings 129 - - required: 130 - - reg 131 - - iommu-addresses 132 - 133 - additionalProperties: true 134 - 135 - examples: 136 - - | 137 - / { 138 - compatible = "foo"; 139 - model = "foo"; 140 - 141 - #address-cells = <2>; 142 - #size-cells = <2>; 143 - 144 - reserved-memory { 145 - #address-cells = <2>; 146 - #size-cells = <2>; 147 - ranges; 148 - 149 - adsp_resv: reservation-adsp { 150 - /* 151 - * Restrict IOVA mappings for ADSP buffers to the 512 MiB region 152 - * from 0x40000000 - 0x5fffffff. Anything outside is reserved by 153 - * the ADSP for I/O memory and private memory allocations. 154 - */ 155 - iommu-addresses = <&adsp 0x0 0x00000000 0x00 0x40000000>, 156 - <&adsp 0x0 0x60000000 0xff 0xa0000000>; 157 - }; 158 - 159 - fb: framebuffer@90000000 { 160 - reg = <0x0 0x90000000 0x0 0x00800000>; 161 - iommu-addresses = <&dc0 0x0 0x90000000 0x0 0x00800000>; 162 - }; 163 - }; 164 - 165 - bus@0 { 166 - #address-cells = <1>; 167 - #size-cells = <1>; 168 - ranges = <0x0 0x0 0x0 0x40000000>; 169 - 170 - adsp: adsp@2990000 { 171 - reg = <0x2990000 0x2000>; 172 - memory-region = <&adsp_resv>; 173 - }; 174 - 175 - dc0: display@15200000 { 176 - reg = <0x15200000 0x10000>; 177 - memory-region = <&fb>; 178 - }; 179 - }; 180 - }; 181 - ...
-97
Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml
··· 1 - # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 - %YAML 1.2 3 - --- 4 - $id: http://devicetree.org/schemas/reserved-memory/shared-dma-pool.yaml# 5 - $schema: http://devicetree.org/meta-schemas/core.yaml# 6 - 7 - title: /reserved-memory DMA pool 8 - 9 - maintainers: 10 - - devicetree-spec@vger.kernel.org 11 - 12 - allOf: 13 - - $ref: reserved-memory.yaml 14 - 15 - properties: 16 - compatible: 17 - oneOf: 18 - - const: shared-dma-pool 19 - description: > 20 - This indicates a region of memory meant to be used as a shared 21 - pool of DMA buffers for a set of devices. It can be used by an 22 - operating system to instantiate the necessary pool management 23 - subsystem if necessary. 24 - 25 - - const: restricted-dma-pool 26 - description: > 27 - This indicates a region of memory meant to be used as a pool 28 - of restricted DMA buffers for a set of devices. The memory 29 - region would be the only region accessible to those devices. 30 - When using this, the no-map and reusable properties must not 31 - be set, so the operating system can create a virtual mapping 32 - that will be used for synchronization. The main purpose for 33 - restricted DMA is to mitigate the lack of DMA access control 34 - on systems without an IOMMU, which could result in the DMA 35 - accessing the system memory at unexpected times and/or 36 - unexpected addresses, possibly leading to data leakage or 37 - corruption. The feature on its own provides a basic level of 38 - protection against the DMA overwriting buffer contents at 39 - unexpected times. However, to protect against general data 40 - leakage and system memory corruption, the system needs to 41 - provide way to lock down the memory access, e.g., MPU. Note 42 - that since coherent allocation needs remapping, one must set 43 - up another device coherent pool by shared-dma-pool and use 44 - dma_alloc_from_dev_coherent instead for atomic coherent 45 - allocation. 46 - 47 - linux,cma-default: 48 - type: boolean 49 - description: > 50 - If this property is present, then Linux will use the region for 51 - the default pool of the contiguous memory allocator. 52 - 53 - linux,dma-default: 54 - type: boolean 55 - description: > 56 - If this property is present, then Linux will use the region for 57 - the default pool of the consistent DMA allocator. 58 - 59 - if: 60 - properties: 61 - compatible: 62 - contains: 63 - const: restricted-dma-pool 64 - then: 65 - properties: 66 - no-map: false 67 - reusable: false 68 - 69 - unevaluatedProperties: false 70 - 71 - examples: 72 - - | 73 - reserved-memory { 74 - #address-cells = <1>; 75 - #size-cells = <1>; 76 - ranges; 77 - 78 - /* global autoconfigured region for contiguous allocations */ 79 - linux,cma { 80 - compatible = "shared-dma-pool"; 81 - reusable; 82 - size = <0x4000000>; 83 - alignment = <0x2000>; 84 - linux,cma-default; 85 - }; 86 - 87 - display_reserved: framebuffer@78000000 { 88 - reg = <0x78000000 0x800000>; 89 - }; 90 - 91 - restricted_dma_reserved: restricted-dma-pool@50000000 { 92 - compatible = "restricted-dma-pool"; 93 - reg = <0x50000000 0x4000000>; 94 - }; 95 - }; 96 - 97 - ...
+1 -1
Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml
··· 29 29 maxItems: 1 30 30 description: | 31 31 Shared memory region for AFE memif. A "shared-dma-pool". 32 - See ../reserved-memory/reserved-memory.yaml for details. 32 + See dtschema reserved-memory/shared-dma-pool.yaml for details. 33 33 34 34 mediatek,topckgen: 35 35 $ref: /schemas/types.yaml#/definitions/phandle