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

dt-bindings: mtd: Clarify all partition subnodes

Over time the various ways to define MTD partitions has evolved. Most of
the controllers support several different bindings. Let's define all
possible choices in one file and mark the legacy ones deprecated. This
way, we can just reference this file and avoid dupplicating these
definitions.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-2-miquel.raynal@bootlin.com

+50
+17
Documentation/devicetree/bindings/mtd/mtd.yaml
··· 21 21 based name) in order to ease flash device identification and/or 22 22 describe what they are used for. 23 23 24 + '#address-cells': 25 + deprecated: true 26 + 27 + '#size-cells': 28 + deprecated: true 29 + 30 + partitions: 31 + $ref: /schemas/mtd/partitions/partitions.yaml 32 + 24 33 patternProperties: 34 + "@[0-9a-f]+$": 35 + $ref: partitions/partition.yaml 36 + deprecated: true 37 + 38 + "^partition@[0-9a-f]+": 39 + $ref: partitions/partition.yaml 40 + deprecated: true 41 + 25 42 "^otp(-[0-9]+)?$": 26 43 type: object 27 44 $ref: ../nvmem/nvmem.yaml#
+33
Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mtd/partitions/partitions.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Partitions 8 + 9 + description: | 10 + This binding is generic and describes the content of the partitions container 11 + node. All partition parsers must be referenced here. 12 + 13 + maintainers: 14 + - Miquel Raynal <miquel.raynal@bootlin.com> 15 + 16 + properties: 17 + compatible: true 18 + 19 + '#address-cells': 20 + enum: [1, 2] 21 + 22 + '#size-cells': 23 + enum: [1, 2] 24 + 25 + patternProperties: 26 + "partition(-.+|@[0-9a-f]+)": 27 + $ref: partition.yaml 28 + 29 + required: 30 + - compatible 31 + 32 + # Temporary value, should be set to false when constraining the parsers list 33 + additionalProperties: true