# Fixed partitions

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Mtd bindings / partitions_

> Device-tree binding reference for Fixed partitions.

<!-- SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;mtd&#47;partitions&#47;fixed&#45;partitions&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This binding can be used on platforms which have strong conventions about
which portions of a flash are used for what purposes, but which don't use an
on-flash partition table such as RedBoot.</p>
<p style="white-space: pre-wrap">The partition table should be a node named "partitions". Partitions are then
defined as subnodes.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Rafał Miłecki &#60;rafal&#64;milecki&#46;pl&#62;&#34;</code></span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — not listed as required here

<a id="dt-39566f01414e34c67b85"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

<a id="dt-fe13e24e5c9612880f47"></a>

**Rule 1**

> **Exact value (<code>const</code>):** <span id="dt-d1fe1b456a54b64074d3"><code>&#34;fixed&#45;partitions&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> <a id="dt-4c3e118873fbaedb5de2"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b02d8860067795c00ae4"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-82dceb5784ff71f5fdf5"><code>&#34;sercomm&#44;sc&#45;partitions&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;fixed&#45;partitions&#34;</code></span>

<a id="dt-2efe70314a961a652abe"></a>

### <code>&#35;address&#45;cells</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-01d9ce7fc56f712455be"></a> <span id="dt-94d3735d14e27e2d7df1"><code>1</code></span>, <span id="dt-0dda607ef98de398e3f7"><code>2</code></span>

<a id="dt-ee0e5bf71366d312f1dc"></a>

### <code>&#35;size&#45;cells</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-11f8fcdf7ed0ce5274ad"></a> <span id="dt-1df5884131042d9f2b35"><code>1</code></span>, <span id="dt-0d778c9f0ef0966b501c"><code>2</code></span>

<a id="dt-e92215bd3c2f5373b164"></a>

## Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-573587cdb3ff39c5b5e0"></a>

### <code>&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1fbf03b5c1016547cb52">[<code>partition&#46;yaml&#35;&#47;&#36;defs&#47;partition&#45;node</code>](</kernel/hardware/devicetree-bindings/dt-mtd/partitions/partition.md#dt-b43252f69d556623c54c>)</span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;&#35;size&#45;cells&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>partition&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-mtd/partitions/partition.md#dt-root>)</span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">partitions {
    compatible = "fixed-partitions";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    partition@0 {
        label = "u-boot";
        reg = &lt;0x0000000 0x100000&gt;;
        read-only;
    };

    uimage@100000 {
        reg = &lt;0x0100000 0x200000&gt;;
        compression = "lzma";
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">partitions {
    compatible = "fixed-partitions";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;2&gt;;

    /* a 4 GiB partition */
    partition@0 {
        label = "filesystem";
        reg = &lt;0x00000000 0x1 0x00000000&gt;;
        linux,rootfs;
    };
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">partitions {
    compatible = "fixed-partitions";
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    /* an 8 GiB partition */
    partition@0 {
        label = "filesystem #1";
        reg = &lt;0x0 0x00000000 0x2 0x00000000&gt;;
    };

    /* a 4 GiB partition */
    partition@200000000 {
        label = "filesystem #2";
        reg = &lt;0x2 0x00000000 0x1 0x00000000&gt;;
    };
};
</code></pre>

<pre id="dt-cf8a683b5a963eb1c566"><code class="language-dts">partitions {
    compatible = "fixed-partitions";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    partition@0 {
        label = "bootloader";
        reg = &lt;0x000000 0x100000&gt;;
        read-only;
    };

    firmware@100000 {
        compatible = "brcm,trx";
        label = "firmware";
        reg = &lt;0x100000 0xe00000&gt;;
    };

    calibration@f00000 {
        compatible = "fixed-partitions";
        label = "calibration";
        reg = &lt;0xf00000 0x100000&gt;;
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;1&gt;;

        partition@0 {
            label = "wifi0";
            reg = &lt;0x000000 0x080000&gt;;
        };

        partition@80000 {
            label = "wifi1";
            reg = &lt;0x080000 0x080000&gt;;
        };
    };
};
</code></pre>

<pre id="dt-89dd782fdab7d446b5b9"><code class="language-dts">partitions {
    compatible = "sercomm,sc-partitions", "fixed-partitions";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    partition@0 {
        label = "u-boot";
        reg = &lt;0x0 0x100000&gt;;
        sercomm,scpart-id = &lt;0&gt;;
        read-only;
    };

    partition@100000 {
        label = "dynamic partition map";
        reg = &lt;0x100000 0x100000&gt;;
        sercomm,scpart-id = &lt;1&gt;;
    };

    partition@200000 {
        label = "Factory";
        reg = &lt;0x200000 0x100000&gt;;
        sercomm,scpart-id = &lt;2&gt;;
        read-only;
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause</span></p>

<p id="dt-comment-1"><strong>Line 42:</strong> <span> fixed-partitions can be nested</span></p>

</details>
