# Marvell NAND Flash Controller (NFC)

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

> Device-tree binding reference for Marvell NAND Flash Controller (NFC).

<!-- 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;marvell&#44;nand&#45;controller&#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>

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

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

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

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

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

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

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

**Rule 1**

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-5deec2612224d8d915da"><code>&#34;marvell&#44;armada&#45;8k&#45;nand&#45;controller&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;marvell&#44;armada370&#45;nand&#45;controller&#34;</code></span>

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

**Rule 2**

> **Allowed values (<code>enum</code>):** <a id="dt-ad5dbad5326d5a61ae46"></a> <span id="dt-af4759e2a8ab9583f63d"><code>&#34;marvell&#44;ac5&#45;nand&#45;controller&#34;</code></span>, <span id="dt-9aa1d0e5d9a73a253eb7"><code>&#34;marvell&#44;armada370&#45;nand&#45;controller&#34;</code></span>, <span id="dt-5c9870d52793df25216b"><code>&#34;marvell&#44;pxa3xx&#45;nand&#45;controller&#34;</code></span>

<a id="dt-39cb5b72c94e12bd53ea"></a>

**Rule 3**

> <div id="dt-34ebc3371373135d1528">
> <p style="white-space: pre-wrap">legacy bindings</p>
> </div>
>
> **Deprecated (<code>deprecated</code>):** <span id="dt-0ced5c7fccd8fc640f58"><code>true</code></span>
>
> **Allowed values (<code>enum</code>):** <a id="dt-9fc3f5081af7fe32b794"></a> <span id="dt-264517b00ca7c7f3c30f"><code>&#34;marvell&#44;armada&#45;8k&#45;nand&#34;</code></span>, <span id="dt-78ff4d043ca24550ed33"><code>&#34;marvell&#44;armada370&#45;nand&#34;</code></span>, <span id="dt-aada3a31ecc374bd5eca"><code>&#34;marvell&#44;pxa3xx&#45;nand&#34;</code></span>

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

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

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

### <code>interrupts</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b7823fb65b2f27642d26"><code>1</code></span>

<a id="dt-4e9a371963ac013ad39d"></a>

### <code>clocks</code> — required here

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">Shall reference the NAND controller clocks, the second one is is only needed for the Armada 7K/8K SoCs</p>
</div>

**Minimum number of items (<code>minItems</code>):** <span id="dt-1f26a8d0aa315cbb9547"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>2</code></span>

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — not listed as required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-dab867b03596a88fc725"><code>1</code></span>

<a id="dt-3d1de59bdfddccf00eed"></a>

#### Array item rules (<code>items</code>)

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;core&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-0298e5f353a64a09a8a6"><code>&#34;reg&#34;</code></span>

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-9b3f438568f3e2b46d6f"><code>1</code></span>

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

### <code>dma&#45;names</code> — not listed as required here

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

#### Array item rules (<code>items</code>)

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-eb45b3d6c9e2700a17b5"><code>&#34;data&#34;</code></span>

<a id="dt-79c12c7ea27da3e75031"></a>

### <code>marvell&#44;system&#45;controller</code> — not listed as required here

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

<div id="dt-45622b00e96a8e16f2b1">
<p style="white-space: pre-wrap">Syscon node that handles NAND controller related registers</p>
</div>

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

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

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

### <code>&#94;nand&#64;&#91;a&#45;f0&#45;9&#93;&#36;</code> — name matches this regular expression

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4047c0ee7509401a701c">[<code>raw&#45;nand&#45;chip&#46;yaml</code>](</kernel/hardware/devicetree-bindings/dt-mtd/raw-nand-chip.md#dt-root>)</span>

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

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

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

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

**Minimum value (<code>minimum</code>):** <span id="dt-80ff2e801c673bba1a13"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-d10875180564e8513a00"><code>3</code></span>

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

**<code>nand&#45;rb</code> — required here**

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

**Array item rules (<code>items</code>)**

<a id="dt-930e138ba973b92125e1"></a>

**Item 1**

> **Minimum value (<code>minimum</code>):** <span id="dt-4348fadd52f3c4314b89"><code>0</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-588c35de1710dc3d8663"><code>1</code></span>

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

**<code>nand&#45;ecc&#45;step&#45;size</code> — not listed as required here**

**Exact value (<code>const</code>):** <span id="dt-f84725cab1596725434f"><code>512</code></span>

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

**<code>nand&#45;ecc&#45;strength</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-bebffea65472968a8e27"></a> <span id="dt-b19ab79d98c0506978d1"><code>1</code></span>, <span id="dt-595b660e021c90b8aef9"><code>4</code></span>, <span id="dt-311ef8a00c71bdc810dd"><code>8</code></span>, <span id="dt-e716dd52176f7d42d676"><code>12</code></span>, <span id="dt-e2b572dfc303db0f7edd"><code>16</code></span>

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

**<code>nand&#45;ecc&#45;mode</code> — not listed as required here**

**Exact value (<code>const</code>):** <span id="dt-48c9682e9bc47e8fddf0"><code>&#34;hw&#34;</code></span>

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

**<code>marvell&#44;nand&#45;keep&#45;config</code> — not listed as required here**

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

<div id="dt-35a0979624952b59a966">
<p style="white-space: pre-wrap">Orders the driver not to take the timings from the core and leaving them completely untouched. Bootloader timings will then be used.</p>
</div>

<a id="dt-712d611209166c3594d0"></a>

**<code>marvell&#44;nand&#45;enable&#45;arbiter</code> — not listed as required here**

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

<div id="dt-23c210c20c1cc115ee12">
<p style="white-space: pre-wrap">To enable the arbiter, all boards blindly used it, this bit was set by the bootloader for many boards and even if it is marked reserved in several datasheets, it might be needed to set it (otherwise it is harmless).</p>
</div>

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

**Required in this object (<code>required</code>):** <a id="dt-8e1200328650c62b97b7"></a> <span id="dt-18dc79a6a0290d3b3d52"><code>&#34;reg&#34;</code></span>, <span id="dt-66c3e05c6c74f856a207"><code>&#34;nand&#45;rb&#34;</code></span>

<a id="dt-5957228d95e49801719f"></a>

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

<code>false</code>

Not allowed by this rule.

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clocks&#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>nand&#45;controller&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-d1402748b5f4caf0b18a"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-9b74ad9882646c4a5116"><code>&#34;marvell&#44;pxa3xx&#45;nand&#45;controller&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-ee96a18d4bb2a9d39bd9"></a> <span id="dt-96ee7f71687cd234a9f8"><code>&#34;dmas&#34;</code></span>, <span id="dt-5daae4bef35eb1615659"><code>&#34;dma&#45;names&#34;</code></span>

<a id="dt-317510ea5c8bf789ca60"></a>

### Rule 3

> <a id="dt-15ef78abba37234c7e3a"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-81c13bb46c56768b42c8"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-676f6e45d3a322ea7096"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-c8f14712d9ed2dde9441"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8cd5c6ac7cc13c2d9acf"><code>&#34;marvell&#44;armada&#45;8k&#45;nand&#45;controller&#34;</code></span>
>
> <a id="dt-86c371e5831ff1f84ce5"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-4b2e0558620eefde94e1"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-8308c8f88877cb33a5a0"></a>
> >
> > **<code>clocks</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-9d121778b610668f3c64"><code>2</code></span>
> >
> > <a id="dt-c6cd9634653c9bd1a32e"></a>
> >
> > **<code>clock&#45;names</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-36a2ca4e9a374680acbd"><code>2</code></span>
> >
> > **Required in this object (<code>required</code>):** <a id="dt-caec4da91c2837148d80"></a> <span id="dt-aa785038ee05bfb1e067"><code>&#34;marvell&#44;system&#45;controller&#34;</code></span>
>
> <a id="dt-a27f5f4fc91750ae210f"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-10a581729d134f7b8a73"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-0f1a77fa3443de50a03f"></a>
> >
> > **<code>clocks</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-3a50791bde7c31e14a56"><code>1</code></span>
> >
> > <a id="dt-129bda36b9b8f209dd84"></a>
> >
> > **<code>clock&#45;names</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-6f6f7375e26e9f240363"><code>1</code></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">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
nand_controller: nand-controller@d0000 {
    compatible = "marvell,armada370-nand-controller";
    reg = &lt;0xd0000 0x54&gt;;
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    interrupts = &lt;GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH&gt;;
    clocks = &lt;&amp;coredivclk 0&gt;;

    nand@0 {
        reg = &lt;0&gt;;
        label = "main-storage";
        nand-rb = &lt;0&gt;;
        nand-ecc-mode = "hw";
        marvell,nand-keep-config;
        nand-on-flash-bbt;
        nand-ecc-strength = &lt;4&gt;;
        nand-ecc-step-size = &lt;512&gt;;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;1&gt;;

            partition@0 {
                label = "Rootfs";
                reg = &lt;0x00000000 0x40000000&gt;;
            };
        };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">cp0_nand_controller: nand-controller@720000 {
    compatible = "marvell,armada-8k-nand-controller",
            "marvell,armada370-nand-controller";
    reg = &lt;0x720000 0x54&gt;;
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    interrupts = &lt;115 IRQ_TYPE_LEVEL_HIGH&gt;;
    clock-names = "core", "reg";
    clocks = &lt;&amp;cp0_clk 1 2&gt;,
             &lt;&amp;cp0_clk 1 17&gt;;
    marvell,system-controller = &lt;&amp;cp0_syscon0&gt;;

    nand@0 {
        reg = &lt;0&gt;;
        label = "main-storage";
        nand-rb = &lt;0&gt;;
        nand-ecc-mode = "hw";
        nand-ecc-strength = &lt;8&gt;;
        nand-ecc-step-size = &lt;512&gt;;
    };
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">nand-controller@43100000 {
    compatible = "marvell,pxa3xx-nand-controller";
    reg = &lt;0x43100000 90&gt;;
    interrupts = &lt;45&gt;;
    clocks = &lt;&amp;clks 1&gt;;
    clock-names = "core";
    dmas = &lt;&amp;pdma 97 3&gt;;
    dma-names = "data";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    nand@0 {
        reg = &lt;0&gt;;
        nand-rb = &lt;0&gt;;
        nand-ecc-mode = "hw";
        marvell,nand-keep-config;
    };
};
</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>
