diff options
Diffstat (limited to 'dts/Bindings/mtd/partitions')
-rw-r--r-- | dts/Bindings/mtd/partitions/arm,arm-firmware-suite.yaml | 2 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/brcm,bcm4908-partitions.yaml | 4 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml | 2 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/fixed-partitions.yaml | 49 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/linksys,ns-partitions.yaml | 4 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/linux,ubi.yaml | 75 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/nvmem-cells.yaml | 5 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/partition.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/partitions.yaml | 42 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/qcom,smem-part.yaml | 40 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/redboot-fis.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/seama.yaml | 44 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/tplink,safeloader-partitions.yaml | 57 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/u-boot.yaml | 56 | ||||
-rw-r--r-- | dts/Bindings/mtd/partitions/ubi-volume.yaml | 40 |
15 files changed, 391 insertions, 41 deletions
diff --git a/dts/Bindings/mtd/partitions/arm,arm-firmware-suite.yaml b/dts/Bindings/mtd/partitions/arm,arm-firmware-suite.yaml index 76c88027b6..97618847ee 100644 --- a/dts/Bindings/mtd/partitions/arm,arm-firmware-suite.yaml +++ b/dts/Bindings/mtd/partitions/arm,arm-firmware-suite.yaml @@ -9,6 +9,8 @@ title: ARM Firmware Suite (AFS) Partitions maintainers: - Linus Walleij <linus.walleij@linaro.org> +select: false + description: | The ARM Firmware Suite is a flash partitioning system found on the ARM reference designs: Integrator AP, Integrator CP, Versatile AB, diff --git a/dts/Bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/dts/Bindings/mtd/partitions/brcm,bcm4908-partitions.yaml index 7b113e5e34..94f0742b37 100644 --- a/dts/Bindings/mtd/partitions/brcm,bcm4908-partitions.yaml +++ b/dts/Bindings/mtd/partitions/brcm,bcm4908-partitions.yaml @@ -17,6 +17,8 @@ description: | maintainers: - Rafał Miłecki <rafal@milecki.pl> +select: false + properties: compatible: const: brcm,bcm4908-partitions @@ -29,7 +31,7 @@ properties: patternProperties: "^partition@[0-9a-f]+$": - $ref: "partition.yaml#" + $ref: partition.yaml# properties: compatible: const: brcm,bcm4908-firmware diff --git a/dts/Bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml b/dts/Bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml index 3484e06d6b..939e7b50db 100644 --- a/dts/Bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml +++ b/dts/Bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml @@ -35,6 +35,8 @@ description: | maintainers: - Rafał Miłecki <rafal@milecki.pl> +select: false + properties: compatible: const: brcm,bcm947xx-cfe-partitions diff --git a/dts/Bindings/mtd/partitions/fixed-partitions.yaml b/dts/Bindings/mtd/partitions/fixed-partitions.yaml index ad3ccd2508..058253d6d8 100644 --- a/dts/Bindings/mtd/partitions/fixed-partitions.yaml +++ b/dts/Bindings/mtd/partitions/fixed-partitions.yaml @@ -29,26 +29,37 @@ properties: "#size-cells": true + compression: + $ref: /schemas/types.yaml#/definitions/string + description: | + Compression algorithm used to store the data in this partition, chosen + from a list of well-known algorithms. + + The contents are compressed using this algorithm. + + enum: + - none + - bzip2 + - gzip + - lzop + - lz4 + - lzma + - xz + - zstd + patternProperties: "@[0-9a-f]+$": - allOf: - - $ref: "partition.yaml#" - - if: - properties: - compatible: - contains: - const: sercomm,sc-partitions - then: - properties: - sercomm,scpart-id: - description: Partition id in Sercomm partition map. Mtd - parser uses this id to find a record in the partition map - containing offset and size of the current partition. The - values from partition map overrides partition offset and - size defined in reg property of the dts. Frequently these - values are the same, but may differ if device has bad - eraseblocks on a flash. - $ref: /schemas/types.yaml#/definitions/uint32 + $ref: partition.yaml# + + properties: + sercomm,scpart-id: + description: Partition id in Sercomm partition map. Mtd parser + uses this id to find a record in the partition map containing + offset and size of the current partition. The values from + partition map overrides partition offset and size defined in + reg property of the dts. Frequently these values are the same, + but may differ if device has bad eraseblocks on a flash. + $ref: /schemas/types.yaml#/definitions/uint32 required: - "#address-cells" @@ -71,6 +82,7 @@ examples: uimage@100000 { reg = <0x0100000 0x200000>; + compress = "lzma"; }; }; @@ -84,6 +96,7 @@ examples: partition@0 { label = "filesystem"; reg = <0x00000000 0x1 0x00000000>; + linux,rootfs; }; }; diff --git a/dts/Bindings/mtd/partitions/linksys,ns-partitions.yaml b/dts/Bindings/mtd/partitions/linksys,ns-partitions.yaml index 99249cdfbf..c5fa78ff71 100644 --- a/dts/Bindings/mtd/partitions/linksys,ns-partitions.yaml +++ b/dts/Bindings/mtd/partitions/linksys,ns-partitions.yaml @@ -18,6 +18,8 @@ description: | maintainers: - Rafał Miłecki <rafal@milecki.pl> +select: false + properties: compatible: const: linksys,ns-partitions @@ -30,7 +32,7 @@ properties: patternProperties: "^partition@[0-9a-f]+$": - $ref: "partition.yaml#" + $ref: partition.yaml# properties: compatible: items: diff --git a/dts/Bindings/mtd/partitions/linux,ubi.yaml b/dts/Bindings/mtd/partitions/linux,ubi.yaml new file mode 100644 index 0000000000..27e1ac1f25 --- /dev/null +++ b/dts/Bindings/mtd/partitions/linux,ubi.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unsorted Block Images + +description: | + UBI ("Unsorted Block Images") is a volume management system for raw + flash devices which manages multiple logical volumes on a single + physical flash device and spreads the I/O load (i.e wear-leveling) + across the whole flash chip. + +maintainers: + - Daniel Golle <daniel@makrotopia.org> + +allOf: + - $ref: partition.yaml# + +properties: + compatible: + const: linux,ubi + + volumes: + type: object + description: UBI Volumes + + patternProperties: + "^ubi-volume-.*$": + $ref: /schemas/mtd/partitions/ubi-volume.yaml# + + unevaluatedProperties: false + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x100000>; + label = "bootloader"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0x1ff00000>; + label = "ubi"; + compatible = "linux,ubi"; + + volumes { + ubi-volume-caldata { + volid = <2>; + volname = "rf"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + }; + }; + }; diff --git a/dts/Bindings/mtd/partitions/nvmem-cells.yaml b/dts/Bindings/mtd/partitions/nvmem-cells.yaml index 5cdd2efa91..9518281007 100644 --- a/dts/Bindings/mtd/partitions/nvmem-cells.yaml +++ b/dts/Bindings/mtd/partitions/nvmem-cells.yaml @@ -17,7 +17,9 @@ maintainers: - Ansuel Smith <ansuelsmth@gmail.com> allOf: + - $ref: /schemas/mtd/partitions/partition.yaml# - $ref: /schemas/nvmem/nvmem.yaml# + - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml# properties: compatible: @@ -26,7 +28,7 @@ properties: required: - compatible -additionalProperties: true +unevaluatedProperties: false examples: - | @@ -84,7 +86,6 @@ examples: compatible = "nvmem-cells"; label = "calibration"; reg = <0xf00000 0x100000>; - ranges = <0 0xf00000 0x100000>; #address-cells = <1>; #size-cells = <1>; diff --git a/dts/Bindings/mtd/partitions/partition.yaml b/dts/Bindings/mtd/partitions/partition.yaml index f1a02d840b..1ebe9e2347 100644 --- a/dts/Bindings/mtd/partitions/partition.yaml +++ b/dts/Bindings/mtd/partitions/partition.yaml @@ -52,6 +52,11 @@ properties: immune to paired-pages corruptions type: boolean + linux,rootfs: + description: Marks partition that contains root filesystem to mount and boot + user space from + type: boolean + if: not: required: [ reg ] @@ -60,4 +65,5 @@ then: $nodename: pattern: '^partition-.*$' +# This is a generic file other binding inherit from and extend additionalProperties: true diff --git a/dts/Bindings/mtd/partitions/partitions.yaml b/dts/Bindings/mtd/partitions/partitions.yaml new file mode 100644 index 0000000000..1dda2c8074 --- /dev/null +++ b/dts/Bindings/mtd/partitions/partitions.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Partitions + +description: | + This binding is generic and describes the content of the partitions container + node. All partition parsers must be referenced here. + +maintainers: + - Miquel Raynal <miquel.raynal@bootlin.com> + +oneOf: + - $ref: arm,arm-firmware-suite.yaml + - $ref: brcm,bcm4908-partitions.yaml + - $ref: brcm,bcm947xx-cfe-partitions.yaml + - $ref: fixed-partitions.yaml + - $ref: linksys,ns-partitions.yaml + - $ref: qcom,smem-part.yaml + - $ref: redboot-fis.yaml + - $ref: tplink,safeloader-partitions.yaml + +properties: + compatible: true + + '#address-cells': + enum: [1, 2] + + '#size-cells': + enum: [1, 2] + +patternProperties: + "^partition(-.+|@[0-9a-f]+)$": + $ref: partition.yaml + +required: + - compatible + +unevaluatedProperties: false diff --git a/dts/Bindings/mtd/partitions/qcom,smem-part.yaml b/dts/Bindings/mtd/partitions/qcom,smem-part.yaml index dc07909af0..1c2b4e780c 100644 --- a/dts/Bindings/mtd/partitions/qcom,smem-part.yaml +++ b/dts/Bindings/mtd/partitions/qcom,smem-part.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/mtd/partitions/qcom,smem-part.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm SMEM NAND flash partition parser binding +title: Qualcomm SMEM NAND flash partition parser maintainers: - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> @@ -15,13 +15,15 @@ description: | varies between partition table revisions. V3 supports maximum 16 partitions and V4 supports 48 partitions. +select: false + properties: compatible: const: qcom,smem-part patternProperties: "^partition-[0-9a-z]+$": - $ref: partition.yaml# + $ref: nvmem-cells.yaml required: - compatible @@ -39,22 +41,22 @@ examples: - | /* Example declaring dynamic partition */ flash { - partitions { - compatible = "qcom,smem-part"; - - partition-art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - label = "0:art"; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; + partitions { + compatible = "qcom,smem-part"; + + partition-art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + label = "0:art"; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; - }; }; diff --git a/dts/Bindings/mtd/partitions/redboot-fis.yaml b/dts/Bindings/mtd/partitions/redboot-fis.yaml index fee8d81b52..ba7445cd69 100644 --- a/dts/Bindings/mtd/partitions/redboot-fis.yaml +++ b/dts/Bindings/mtd/partitions/redboot-fis.yaml @@ -16,6 +16,8 @@ description: The FLASH Image System (FIS) directory is a flash description maintainers: - Linus Walleij <linus.walleij@linaro.org> +select: false + properties: compatible: const: redboot-fis @@ -26,6 +28,10 @@ properties: device. On a flash memory with 32KB eraseblocks, 0 means the first eraseblock at 0x00000000, 1 means the second eraseblock at 0x00008000 and so on. + '#address-cells': false + + '#size-cells': false + required: - compatible - fis-index-block diff --git a/dts/Bindings/mtd/partitions/seama.yaml b/dts/Bindings/mtd/partitions/seama.yaml new file mode 100644 index 0000000000..4c1cbf43e8 --- /dev/null +++ b/dts/Bindings/mtd/partitions/seama.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Seattle Image Partitions + +description: The SEAttle iMAge (SEAMA) partition is a type of partition + used for NAND flash devices. This type of flash image is found in some + D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, + DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79 + (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type + does not have children defined in the device tree, they need to be + detected by software. + +allOf: + - $ref: partition.yaml# + +maintainers: + - Linus Walleij <linus.walleij@linaro.org> + +properties: + compatible: + const: seama + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "seama"; + reg = <0x0 0x800000>; + label = "firmware"; + }; + }; diff --git a/dts/Bindings/mtd/partitions/tplink,safeloader-partitions.yaml b/dts/Bindings/mtd/partitions/tplink,safeloader-partitions.yaml new file mode 100644 index 0000000000..a24bbaac3a --- /dev/null +++ b/dts/Bindings/mtd/partitions/tplink,safeloader-partitions.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/tplink,safeloader-partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TP-Link SafeLoader partitions + +description: | + TP-Link home routers store various data on flash (e.g. bootloader, + flash layout, firmware, product info, configuration, calibration + data). That requires flash partitioning. + + Flash space layout of TP-Link devices is stored on flash itself using + a custom ASCII-based format. That format was first found in TP-Link + devices with a custom SafeLoader bootloader. Later it was adapted to + CFE and U-Boot bootloaders. + + Partitions specified in partitions table cover whole flash space. Some + contain static data that shouldn't get modified (device's MAC or WiFi + calibration data). Others are semi-static (like kernel). Finally some + partitions contain fully changeable content (like rootfs). + + This binding describes partitioning method and defines offset of ASCII + based partitions table. That offset is picked at manufacturing process + and doesn't change. + +maintainers: + - Rafał Miłecki <rafal@milecki.pl> + +properties: + compatible: + const: tplink,safeloader-partitions + + partitions-table-offset: + description: Flash offset of partitions table + $ref: /schemas/types.yaml#/definitions/uint32 + +patternProperties: + "^partition-.*$": + $ref: partition.yaml# + +required: + - partitions-table-offset + +additionalProperties: false + +examples: + - | + partitions { + compatible = "tplink,safeloader-partitions"; + partitions-table-offset = <0x100000>; + + partition-file-system { + linux,rootfs; + }; + }; diff --git a/dts/Bindings/mtd/partitions/u-boot.yaml b/dts/Bindings/mtd/partitions/u-boot.yaml new file mode 100644 index 0000000000..327fa872c0 --- /dev/null +++ b/dts/Bindings/mtd/partitions/u-boot.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/u-boot.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: U-Boot bootloader partition + +description: | + U-Boot is a bootloader commonly used in embedded devices. It's almost always + located on some kind of flash device. + + Device configuration is stored as a set of environment variables that are + located in a (usually standalone) block of data. + +maintainers: + - Rafał Miłecki <rafal@milecki.pl> + +allOf: + - $ref: partition.yaml# + +properties: + compatible: + oneOf: + - const: brcm,u-boot + description: | + Broadcom stores environment variables inside a U-Boot partition. They + can be identified by a custom header with magic value. + +patternProperties: + "^partition-.*$": + $ref: partition.yaml# + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "brcm,u-boot"; + reg = <0x0 0x100000>; + label = "u-boot"; + + partition-u-boot-env { + }; + }; + + partition@100000 { + reg = <0x100000 0x1ff00000>; + label = "firmware"; + }; + }; diff --git a/dts/Bindings/mtd/partitions/ubi-volume.yaml b/dts/Bindings/mtd/partitions/ubi-volume.yaml new file mode 100644 index 0000000000..19736b2605 --- /dev/null +++ b/dts/Bindings/mtd/partitions/ubi-volume.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: UBI volume + +description: | + This binding describes a single UBI volume. Volumes can be matches either + by their ID or their name, or both. + +maintainers: + - Daniel Golle <daniel@makrotopia.org> + +properties: + volid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Match UBI volume ID + + volname: + $ref: /schemas/types.yaml#/definitions/string + description: + Match UBI volume ID + + nvmem-layout: + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# + description: + This container may reference an NVMEM layout parser. + +anyOf: + - required: + - volid + + - required: + - volname + +# This is a generic file other binding inherit from and extend +additionalProperties: true |