# MTD (Memory Technology Device)

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

> Device-tree binding reference for MTD (Memory Technology Device).

<!-- SPDX-License-Identifier: (GPL-2.0 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;mtd&#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>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Miquel Raynal &#60;miquel&#46;raynal&#64;bootlin&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Richard Weinberger &#60;richard&#64;nod&#46;at&#62;&#34;</code></span>

<a id="dt-865ef19e891fb9fe7b15"></a>

## Automatic schema selection (<code>select</code>)

<code>false</code>

Not selected automatically by this rule.

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

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

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**String pattern (<code>pattern</code>):** <span id="dt-0b2111a24a010949ece7"><code>&#34;&#94;&#40;flash&#124;&#46;&#42;sram&#124;nand&#41;&#40;&#64;&#46;&#42;&#41;&#63;&#36;&#34;</code></span>

<a id="dt-0c6076cd9d6f109c5cc6"></a>

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

<div id="dt-f7c1a813bb0d2e9dd066">
<p style="white-space: pre-wrap">User-defined MTD device name. Can be used to assign user friendly names to MTD devices (instead of the flash model or flash controller based name) in order to ease flash device identification and/or describe what they are used for.</p>
</div>

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

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

**Deprecated (<code>deprecated</code>):** <span id="dt-20a9809b42bf0e01a9a2"><code>true</code></span>

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

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

**Deprecated (<code>deprecated</code>):** <span id="dt-cc1ba539712072fafe5b"><code>true</code></span>

<a id="dt-1661271ef1d2a38bb2d4"></a>

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

**Value type (<code>type</code>):** <span id="dt-8b4cb8a86658c8263a1c"><code>&#34;object&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-1718eeb40e9fa4fbc445"></a> <span id="dt-2a07ba893e51fa8e2d4a"><code>&#34;compatible&#34;</code></span>

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

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

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

### <code>&#40;&#94;partition&#41;&#63;&#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-b9a2e19b2f93d2bf30fa">[<code>&#47;schemas&#47;mtd&#47;partitions&#47;partition&#46;yaml&#35;&#47;&#36;defs&#47;partition&#45;node</code>](</kernel/hardware/devicetree-bindings/dt-mtd/partitions/partition.md#dt-b43252f69d556623c54c>)</span>

**Deprecated (<code>deprecated</code>):** <span id="dt-269397ebfd963c904178"><code>true</code></span>

<a id="dt-124159550c5f7d726609"></a>

### <code>&#94;otp&#40;&#45;&#91;0&#45;9&#93;&#43;&#41;&#63;&#36;</code> — name matches this regular expression

**Value type (<code>type</code>):** <span id="dt-c8f6fd84c955a385a0ca"><code>&#34;object&#34;</code></span>

<a id="dt-5400ecdbda2bc583ee87"></a>

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

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

**Rule 1**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-2cb700a233f9a38dc053">[<code>&#47;schemas&#47;nvmem&#47;nvmem&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-nvmem/nvmem.md#dt-root>)</span>

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

**Rule 2**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ecb24b717e48980e2596">[<code>&#47;schemas&#47;nvmem&#47;nvmem&#45;deprecated&#45;cells&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-nvmem/nvmem-deprecated-cells.md#dt-root>)</span>

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-329725bbfd563c9829d6">
<p style="white-space: pre-wrap">An OTP memory region. Some flashes provide a one-time-programmable
memory whose content can either be programmed by a user or is already
pre-programmed by the factory. Some flashes might provide both.</p>
</div>

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

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

<a id="dt-9c5c51c5c25b2817429c"></a>

**<code>compatible</code> — required here**

**Allowed values (<code>enum</code>):** <a id="dt-b9119d53304e8f0483d3"></a> <span id="dt-5ae99eba774b00186df5"><code>&#34;user&#45;otp&#34;</code></span>, <span id="dt-5b110603fcd7991c2981"><code>&#34;factory&#45;otp&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-548eeb3e38499f913c82"></a> <span id="dt-7f6a4d2ffd81fceefbeb"><code>&#34;compatible&#34;</code></span>

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

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

Allowed by this rule.

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

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

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

    flash@0 {
        reg = &lt;0&gt;;
        compatible = "jedec,spi-nor";
        label = "System-firmware";
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">spi {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    flash@0 {
        reg = &lt;0&gt;;
        compatible = "jedec,spi-nor";

        otp-1 {
            compatible = "factory-otp";
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;1&gt;;

            electronic-serial-number@0 {
                reg = &lt;0 8&gt;;
            };
        };

        otp-2 {
            compatible = "user-otp";
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;1&gt;;

            mac-address@0 {
                reg = &lt;0 6&gt;;
            };
        };
    };
};
</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 OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 66:</strong> <span> This is a generic file other binding inherit from</span></p>

</details>
