142 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/mtd/partitions/partition.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Partition8 9description: |10 This binding describes a single flash partition. Each partition must have its11 relative offset and size specified. Depending on partition function extra12 properties can be used.13 14 A partition may be dynamically allocated by a specific parser at runtime.15 In this specific case, a specific suffix is required to the node name.16 Everything after 'partition-' will be used as the partition name to compare17 with the one dynamically allocated by the specific parser.18 If the partition contains invalid char a label can be provided that will19 be used instead of the node name to make the comparison.20 This is used to assign an OF node to the dynamiccally allocated partition21 so that subsystem like NVMEM can provide an OF node and declare NVMEM cells.22 The OF node will be assigned only if the partition label declared match the23 one assigned by the parser at runtime.24 25maintainers:26 - Rafał Miłecki <rafal@milecki.pl>27 28properties:29 reg:30 description: partition's offset and size within the flash31 maxItems: 132 33 label:34 description: The label / name for this partition. If omitted, the label35 is taken from the node name (excluding the unit address).36 37 read-only:38 description: This parameter, if present, is a hint that this partition39 should only be mounted read-only. This is usually used for flash40 partitions containing early-boot firmware images or data which should41 not be clobbered.42 type: boolean43 44 lock:45 description: Do not unlock the partition at initialization time (not46 supported on all devices)47 type: boolean48 49 slc-mode:50 description: This parameter, if present, allows one to emulate SLC mode51 on a partition attached to an MLC NAND thus making this partition52 immune to paired-pages corruptions53 type: boolean54 55 linux,rootfs:56 description: Marks partition that contains root filesystem to mount and boot57 user space from58 type: boolean59 60 align:61 $ref: /schemas/types.yaml#/definitions/uint3262 minimum: 263 maximum: 0x8000000064 multipleOf: 265 description:66 This sets the alignment of the entry in bytes.67 68 The entry offset is adjusted so that the entry starts on an aligned69 boundary within the containing section or image. For example ‘align =70 <16>’ means that the entry will start on a 16-byte boundary. This may71 mean that padding is added before the entry. The padding is part of72 the containing section but is not included in the entry, meaning that73 an empty space may be created before the entry starts. Alignment74 must be a power of 2. If ‘align’ is not provided, no alignment is75 performed.76 77 align-size:78 $ref: /schemas/types.yaml#/definitions/uint3279 minimum: 280 maximum: 0x8000000081 multipleOf: 282 description:83 This sets the alignment of the entry size in bytes. It must be a power84 of 2.85 86 For example, to ensure that the size of an entry is a multiple of 6487 bytes, set this to 64. While this does not affect the content of the88 entry itself (the padding is performed only when its parent section is89 assembled), the end result is that the entry ends with the padding90 bytes, so may grow. If ‘align-size’ is not provided, no alignment is91 performed.92 93 align-end:94 $ref: /schemas/types.yaml#/definitions/uint3295 minimum: 296 maximum: 0x8000000097 multipleOf: 298 description:99 This sets the alignment (in bytes) of the end of an entry with respect100 to the containing section. It must be a power of 2.101 102 Some entries require that they end on an alignment boundary,103 regardless of where they start. This does not move the start of the104 entry, so the content of the entry will still start at the beginning.105 But there may be padding at the end. While this does not affect the106 content of the entry itself (the padding is performed only when its107 parent section is assembled), the end result is that the entry ends108 with the padding bytes, so may grow. If ‘align-end’ is not provided,109 no alignment is performed.110 111if:112 not:113 required: [ reg ]114then:115 properties:116 $nodename:117 pattern: '^partition-.*$'118 119# This is a generic file other binding inherit from and extend120additionalProperties: true121 122examples:123 - |124 partitions {125 compatible = "fixed-partitions";126 #address-cells = <1>;127 #size-cells = <1>;128 129 partition@100000 {130 compatible = "u-boot";131 reg = <0x100000 0xf00000>;132 align-size = <0x1000>;133 align-end = <0x10000>;134 };135 136 partition@200000 {137 compatible = "tfa-bl31";138 reg = <0x200000 0x100000>;139 align = <0x4000>;140 };141 };142