# TP-Link SafeLoader partitions

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

> Device-tree binding reference for TP-Link SafeLoader 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;tplink&#44;safeloader&#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">TP-Link home routers store various data on flash (e.g. bootloader,
flash layout, firmware, product info, configuration, calibration
data). That requires flash partitioning.</p>
<p style="white-space: pre-wrap">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.</p>
<p style="white-space: pre-wrap">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).</p>
<p style="white-space: pre-wrap">This binding describes partitioning method and defines offset of ASCII
based partitions table. That offset is picked at manufacturing process
and doesn't change.</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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;tplink&#44;safeloader&#45;partitions&#34;</code></span>

<a id="dt-7a5b0e30539af4e7a972"></a>

### <code>partitions&#45;table&#45;offset</code> — required here

<div id="dt-92a07f0da47492836a6c">
<p style="white-space: pre-wrap">Flash offset of partitions table</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8b86ac9ceccb3eed307c">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

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

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

<a id="dt-231a3b187307fb46e134"></a>

### <code>&#94;partition&#45;&#46;&#42;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ba27bd4aa2ba8f5bdd43">[<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;partitions&#45;table&#45;offset&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</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 = "tplink,safeloader-partitions";
    partitions-table-offset = &lt;0x100000&gt;;

    partition-file-system {
            linux,rootfs;
    };
};
</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>

</details>
