diff options
author | Bjørn Mork <bjorn@mork.no> | 2021-01-20 18:36:44 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-01-22 21:03:11 +0100 |
commit | dd5ac0546ca3f80de10db309e57090cf809b1b72 (patch) | |
tree | cd82d27de1ce975574e9112e3e18922b464d4b36 /target/linux/generic/files/Documentation | |
parent | 20b4f77bb69cdded143c15ce962ccd3483bfe77a (diff) | |
download | upstream-dd5ac0546ca3f80de10db309e57090cf809b1b72.tar.gz upstream-dd5ac0546ca3f80de10db309e57090cf809b1b72.tar.bz2 upstream-dd5ac0546ca3f80de10db309e57090cf809b1b72.zip |
dt-bindings: mtd: partitions: add OpenWrt defined U-Boot Image
Add devicetree bindings for vendor specific variants of U-Boot
Images, as defined by OpenWrt.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'target/linux/generic/files/Documentation')
-rw-r--r-- | target/linux/generic/files/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/target/linux/generic/files/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml b/target/linux/generic/files/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml new file mode 100644 index 0000000000..d052ab1fc9 --- /dev/null +++ b/target/linux/generic/files/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/openwrt,uimage.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: OpenWrt variations of U-Boot Image partitions + +maintainers: + - Bjørn Mork <bjorn@mork.no> + +description: | + The image format defined by the boot loader "Das U-Boot" is often + modified or extended by device vendors. This defines a few optional + properties which can be used to describe such modifications. + +# partition.txt defines common properties, but has not yet been +# converted to YAML +#allOf: +# - $ref: ../partition.yaml# + +properties: + compatible: + items: + - enum: + - openwrt,uimage + - const: denx,uimage + + openwrt,padding: + description: Number of padding bytes between header and data + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + + openwrt,ih-magic: + description: U-Boot Image Header magic number. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0x27051956 # IH_MAGIC + + openwrt,ih-type: + description: U-Boot Image type + $ref: /schemas/types.yaml#/definitions/uint32 + default: 2 # IH_TYPE_KERNEL + + openwrt,offset: + description: + Offset between partition start and U-Boot Image in bytes + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + + openwrt,partition-magic: + description: + Magic number found at the start of the partition. Will only be + validated if both this property and openwrt,offset is non-zero + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + +required: + - compatible + - reg + +#unevaluatedProperties: false +additionalProperties: false + +examples: + - | + // device with non-default magic + partition@300000 { + compatible = "openwrt,uimage", "denx,uimage"; + reg = <0x00300000 0xe80000>; + label = "firmware"; + openwrt,ih-magic = <0x4e474520>; + }; + - | + // device with U-Boot Image at an offset, with a partition magic value + partition@70000 { + compatible = "openwrt,uimage", "denx,uimage"; + reg = <0x00070000 0x00790000>; + label = "firmware"; + openwrt,offset = <20>; + openwrt,partition-magic = <0x43535953>; + }; + - | + // device using a non-default image type + #include "dt-bindings/mtd/partitions/uimage.h" + partition@6c0000 { + compatible = "openwrt,uimage", "denx,uimage"; + reg = <0x6c0000 0x1900000>; + label = "firmware"; + openwrt,ih-magic = <0x33373033>; + openwrt,ih-type = <IH_TYPE_FILESYSTEM>; + }; |