164185220SRafał Miłecki# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 264185220SRafał Miłecki%YAML 1.2 364185220SRafał Miłecki--- 464185220SRafał Miłecki$id: http://devicetree.org/schemas/mtd/partitions/partition.yaml# 564185220SRafał Miłecki$schema: http://devicetree.org/meta-schemas/core.yaml# 664185220SRafał Miłecki 764185220SRafał Miłeckititle: Partition 864185220SRafał Miłecki 964185220SRafał Miłeckidescription: | 1064185220SRafał Miłecki This binding describes a single flash partition. Each partition must have its 1164185220SRafał Miłecki relative offset and size specified. Depending on partition function extra 1264185220SRafał Miłecki properties can be used. 1364185220SRafał Miłecki 14118f3fbeSChristian Marangi A partition may be dynamically allocated by a specific parser at runtime. 15118f3fbeSChristian Marangi In this specific case, a specific suffix is required to the node name. 16118f3fbeSChristian Marangi Everything after 'partition-' will be used as the partition name to compare 17118f3fbeSChristian Marangi with the one dynamically allocated by the specific parser. 18118f3fbeSChristian Marangi If the partition contains invalid char a label can be provided that will 19118f3fbeSChristian Marangi be used instead of the node name to make the comparison. 20118f3fbeSChristian Marangi This is used to assign an OF node to the dynamiccally allocated partition 21118f3fbeSChristian Marangi so that subsystem like NVMEM can provide an OF node and declare NVMEM cells. 22118f3fbeSChristian Marangi The OF node will be assigned only if the partition label declared match the 23118f3fbeSChristian Marangi one assigned by the parser at runtime. 24118f3fbeSChristian Marangi 2564185220SRafał Miłeckimaintainers: 2664185220SRafał Miłecki - Rafał Miłecki <rafal@milecki.pl> 2764185220SRafał Miłecki 2864185220SRafał Miłeckiproperties: 2964185220SRafał Miłecki reg: 3064185220SRafał Miłecki description: partition's offset and size within the flash 3164185220SRafał Miłecki maxItems: 1 3264185220SRafał Miłecki 3364185220SRafał Miłecki label: 3464185220SRafał Miłecki description: The label / name for this partition. If omitted, the label 3564185220SRafał Miłecki is taken from the node name (excluding the unit address). 3664185220SRafał Miłecki 3764185220SRafał Miłecki read-only: 3864185220SRafał Miłecki description: This parameter, if present, is a hint that this partition 3964185220SRafał Miłecki should only be mounted read-only. This is usually used for flash 4064185220SRafał Miłecki partitions containing early-boot firmware images or data which should 4164185220SRafał Miłecki not be clobbered. 4264185220SRafał Miłecki type: boolean 4364185220SRafał Miłecki 4464185220SRafał Miłecki lock: 4564185220SRafał Miłecki description: Do not unlock the partition at initialization time (not 4664185220SRafał Miłecki supported on all devices) 4764185220SRafał Miłecki type: boolean 4864185220SRafał Miłecki 4964185220SRafał Miłecki slc-mode: 5064185220SRafał Miłecki description: This parameter, if present, allows one to emulate SLC mode 5164185220SRafał Miłecki on a partition attached to an MLC NAND thus making this partition 5264185220SRafał Miłecki immune to paired-pages corruptions 5364185220SRafał Miłecki type: boolean 5464185220SRafał Miłecki 552b9a31d7SRafał Miłecki linux,rootfs: 562b9a31d7SRafał Miłecki description: Marks partition that contains root filesystem to mount and boot 572b9a31d7SRafał Miłecki user space from 58a5e393c1SRob Herring type: boolean 592b9a31d7SRafał Miłecki 60*d8d42d47SSimon Glass align: 61*d8d42d47SSimon Glass $ref: /schemas/types.yaml#/definitions/uint32 62*d8d42d47SSimon Glass minimum: 2 63*d8d42d47SSimon Glass maximum: 0x80000000 64*d8d42d47SSimon Glass multipleOf: 2 65*d8d42d47SSimon Glass description: 66*d8d42d47SSimon Glass This sets the alignment of the entry in bytes. 67*d8d42d47SSimon Glass 68*d8d42d47SSimon Glass The entry offset is adjusted so that the entry starts on an aligned 69*d8d42d47SSimon Glass boundary within the containing section or image. For example ‘align = 70*d8d42d47SSimon Glass <16>’ means that the entry will start on a 16-byte boundary. This may 71*d8d42d47SSimon Glass mean that padding is added before the entry. The padding is part of 72*d8d42d47SSimon Glass the containing section but is not included in the entry, meaning that 73*d8d42d47SSimon Glass an empty space may be created before the entry starts. Alignment 74*d8d42d47SSimon Glass must be a power of 2. If ‘align’ is not provided, no alignment is 75*d8d42d47SSimon Glass performed. 76*d8d42d47SSimon Glass 77*d8d42d47SSimon Glass align-size: 78*d8d42d47SSimon Glass $ref: /schemas/types.yaml#/definitions/uint32 79*d8d42d47SSimon Glass minimum: 2 80*d8d42d47SSimon Glass maximum: 0x80000000 81*d8d42d47SSimon Glass multipleOf: 2 82*d8d42d47SSimon Glass description: 83*d8d42d47SSimon Glass This sets the alignment of the entry size in bytes. It must be a power 84*d8d42d47SSimon Glass of 2. 85*d8d42d47SSimon Glass 86*d8d42d47SSimon Glass For example, to ensure that the size of an entry is a multiple of 64 87*d8d42d47SSimon Glass bytes, set this to 64. While this does not affect the content of the 88*d8d42d47SSimon Glass entry itself (the padding is performed only when its parent section is 89*d8d42d47SSimon Glass assembled), the end result is that the entry ends with the padding 90*d8d42d47SSimon Glass bytes, so may grow. If ‘align-size’ is not provided, no alignment is 91*d8d42d47SSimon Glass performed. 92*d8d42d47SSimon Glass 93*d8d42d47SSimon Glass align-end: 94*d8d42d47SSimon Glass $ref: /schemas/types.yaml#/definitions/uint32 95*d8d42d47SSimon Glass minimum: 2 96*d8d42d47SSimon Glass maximum: 0x80000000 97*d8d42d47SSimon Glass multipleOf: 2 98*d8d42d47SSimon Glass description: 99*d8d42d47SSimon Glass This sets the alignment (in bytes) of the end of an entry with respect 100*d8d42d47SSimon Glass to the containing section. It must be a power of 2. 101*d8d42d47SSimon Glass 102*d8d42d47SSimon Glass Some entries require that they end on an alignment boundary, 103*d8d42d47SSimon Glass regardless of where they start. This does not move the start of the 104*d8d42d47SSimon Glass entry, so the content of the entry will still start at the beginning. 105*d8d42d47SSimon Glass But there may be padding at the end. While this does not affect the 106*d8d42d47SSimon Glass content of the entry itself (the padding is performed only when its 107*d8d42d47SSimon Glass parent section is assembled), the end result is that the entry ends 108*d8d42d47SSimon Glass with the padding bytes, so may grow. If ‘align-end’ is not provided, 109*d8d42d47SSimon Glass no alignment is performed. 110*d8d42d47SSimon Glass 111118f3fbeSChristian Marangiif: 112118f3fbeSChristian Marangi not: 113118f3fbeSChristian Marangi required: [ reg ] 114118f3fbeSChristian Marangithen: 115118f3fbeSChristian Marangi properties: 116118f3fbeSChristian Marangi $nodename: 117118f3fbeSChristian Marangi pattern: '^partition-.*$' 11864185220SRafał Miłecki 119d85cebfbSMiquel Raynal# This is a generic file other binding inherit from and extend 12064185220SRafał MiłeckiadditionalProperties: true 121