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

dt-bindings: memory: Factor out common properties of LPDDR bindings

The bindings for different LPDDR versions mostly use the same kinds of
properties, so in order to reduce duplication when we're adding support
for more versions, this patch creates a new lpddr-props subschema that
can be referenced by the others to define these common parts. (This will
consider a few smaller I/O width and density numbers "legal" for LPDDR3
that are usually not used there, but this should be harmless.)

Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220930220606.303395-1-jwerner@chromium.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Julius Werner and committed by
Krzysztof Kozlowski
b7178cd5 1de3866f

+60 -64
+52
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Common properties for LPDDR types 8 + 9 + description: 10 + Different LPDDR types generally use the same properties and only differ in the 11 + range of legal values for each. This file defines the common parts that can be 12 + reused for each type. 13 + 14 + maintainers: 15 + - Krzysztof Kozlowski <krzk@kernel.org> 16 + 17 + properties: 18 + revision-id: 19 + $ref: /schemas/types.yaml#/definitions/uint32-array 20 + description: 21 + Revision IDs read from Mode Register 6 and 7. One byte per uint32 cell (i.e. <MR6 MR7>). 22 + maxItems: 2 23 + items: 24 + minimum: 0 25 + maximum: 255 26 + 27 + density: 28 + $ref: /schemas/types.yaml#/definitions/uint32 29 + description: 30 + Density in megabits of SDRAM chip. Decoded from Mode Register 8. 31 + enum: 32 + - 64 33 + - 128 34 + - 256 35 + - 512 36 + - 1024 37 + - 2048 38 + - 4096 39 + - 8192 40 + - 16384 41 + - 32768 42 + 43 + io-width: 44 + $ref: /schemas/types.yaml#/definitions/uint32 45 + description: 46 + IO bus width in bits of SDRAM chip. Decoded from Mode Register 8. 47 + enum: 48 + - 8 49 + - 16 50 + - 32 51 + 52 + additionalProperties: true
+4 -36
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
··· 9 9 maintainers: 10 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 11 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 12 15 properties: 13 16 compatible: 14 17 oneOf: ··· 43 40 Revision 2 value of SDRAM chip. Obtained from device datasheet. 44 41 Property is deprecated, use revision-id instead. 45 42 deprecated: true 46 - 47 - revision-id: 48 - $ref: /schemas/types.yaml#/definitions/uint32-array 49 - description: | 50 - Revision IDs read from Mode Register 6 and 7. One byte per uint32 cell (i.e. <MR6 MR7>). 51 - minItems: 2 52 - maxItems: 2 53 - items: 54 - minimum: 0 55 - maximum: 255 56 - 57 - density: 58 - $ref: /schemas/types.yaml#/definitions/uint32 59 - description: | 60 - Density in megabits of SDRAM chip. Obtained from device datasheet. 61 - enum: 62 - - 64 63 - - 128 64 - - 256 65 - - 512 66 - - 1024 67 - - 2048 68 - - 4096 69 - - 8192 70 - - 16384 71 - - 32768 72 - 73 - io-width: 74 - $ref: /schemas/types.yaml#/definitions/uint32 75 - description: | 76 - IO bus width in bits of SDRAM chip. Obtained from device datasheet. 77 - enum: 78 - - 32 79 - - 16 80 - - 8 81 43 82 44 tRRD-min-tck: 83 45 $ref: /schemas/types.yaml#/definitions/uint32 ··· 136 168 - density 137 169 - io-width 138 170 139 - additionalProperties: false 171 + unevaluatedProperties: false 140 172 141 173 examples: 142 174 - |
+4 -28
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
··· 9 9 maintainers: 10 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 11 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 12 15 properties: 13 16 compatible: 14 17 items: ··· 23 20 const: 1 24 21 deprecated: true 25 22 26 - density: 27 - $ref: /schemas/types.yaml#/definitions/uint32 28 - description: | 29 - Density in megabits of SDRAM chip. 30 - enum: 31 - - 4096 32 - - 8192 33 - - 16384 34 - - 32768 35 - 36 - io-width: 37 - $ref: /schemas/types.yaml#/definitions/uint32 38 - description: | 39 - IO bus width in bits of SDRAM chip. 40 - enum: 41 - - 32 42 - - 16 43 - 44 23 manufacturer-id: 45 24 $ref: /schemas/types.yaml#/definitions/uint32 46 25 description: | 47 26 Manufacturer ID value read from Mode Register 5. The property is 48 27 deprecated, manufacturer should be derived from the compatible. 49 28 deprecated: true 50 - 51 - revision-id: 52 - $ref: /schemas/types.yaml#/definitions/uint32-array 53 - minItems: 2 54 - maxItems: 2 55 - items: 56 - maximum: 255 57 - description: | 58 - Revision value of SDRAM chip read from Mode Registers 6 and 7. 59 29 60 30 '#size-cells': 61 31 const: 0 ··· 182 206 - density 183 207 - io-width 184 208 185 - additionalProperties: false 209 + unevaluatedProperties: false 186 210 187 211 examples: 188 212 - |