# Ingenic SoCs NAND controller

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

> Device-tree binding reference for Ingenic SoCs NAND controller.

<!-- 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;ingenic&#44;nand&#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;Paul Cercueil &#60;paul&#64;crapouillou&#46;net&#62;&#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

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8549616abc3b04702c51">[<code>&#47;schemas&#47;memory&#45;controllers&#47;ingenic&#44;nemc&#45;peripherals&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-memory-controllers/ingenic-nemc-peripherals.md#dt-root>)</span>

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

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;ingenic&#44;jz4740&#45;nand&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ingenic&#44;jz4725b&#45;nand&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;ingenic&#44;jz4780&#45;nand&#34;</code></span>

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

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">Bank number, offset and size of first attached NAND chip</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">Bank number, offset and size of second attached NAND chip</p>
> </div>

<a id="dt-80d36cb915ffeff5364a"></a>

**Item 3**

> <div id="dt-5151e97c331b693ee0dd">
> <p style="white-space: pre-wrap">Bank number, offset and size of third attached NAND chip</p>
> </div>

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

**Item 4**

> <div id="dt-e7b71b4619e949c538b1">
> <p style="white-space: pre-wrap">Bank number, offset and size of fourth attached NAND chip</p>
> </div>

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

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

### <code>ecc&#45;engine</code> — not listed as required here

<code>true</code> — No constraints added by this property rule.

<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>

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

<div id="dt-87783bb86ce6e2eed8a6">
<p style="white-space: pre-wrap">Node containing description of fixed partitions.</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-bc95783023ef28554fdb"></a>

**<code>rb&#45;gpios</code> — not listed as required here**

<div id="dt-1cfd14eebcd1b719edec">
<p style="white-space: pre-wrap">GPIO specifier for the busy pin.</p>
</div>

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

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

**<code>wp&#45;gpios</code> — not listed as required here**

<div id="dt-573ae57a1a252fd5c5f2">
<p style="white-space: pre-wrap">GPIO specifier for the write-protect pin.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-8404b3b148f976e2b1e9"><code>1</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>

<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/clock/ingenic,jz4780-cgu.h&gt;
memory-controller@13410000 {
    compatible = "ingenic,jz4780-nemc";
    reg = &lt;0x13410000 0x10000&gt;;
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;1&gt;;
    ranges = &lt;1 0 0x1b000000 0x1000000&gt;,
             &lt;2 0 0x1a000000 0x1000000&gt;,
             &lt;3 0 0x19000000 0x1000000&gt;,
             &lt;4 0 0x18000000 0x1000000&gt;,
             &lt;5 0 0x17000000 0x1000000&gt;,
             &lt;6 0 0x16000000 0x1000000&gt;;

    clocks = &lt;&amp;cgu JZ4780_CLK_NEMC&gt;;

    nand-controller@1 {
        compatible = "ingenic,jz4780-nand";
        reg = &lt;1 0 0x1000000&gt;;

        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;

        ecc-engine = &lt;&amp;bch&gt;;

        ingenic,nemc-tAS = &lt;10&gt;;
        ingenic,nemc-tAH = &lt;5&gt;;
        ingenic,nemc-tBP = &lt;10&gt;;
        ingenic,nemc-tAW = &lt;15&gt;;
        ingenic,nemc-tSTRV = &lt;100&gt;;

        pinctrl-names = "default";
        pinctrl-0 = &lt;&amp;pins_nemc&gt;;

        nand@1 {
            reg = &lt;1&gt;;

            nand-ecc-step-size = &lt;1024&gt;;
            nand-ecc-strength = &lt;24&gt;;
            nand-ecc-mode = "hw";
            nand-on-flash-bbt;

            pinctrl-names = "default";
            pinctrl-0 = &lt;&amp;pins_nemc_cs1&gt;;

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

                partition@0 {
                    label = "u-boot-spl";
                    reg = &lt;0x0 0x0 0x0 0x800000&gt;;
                };

                partition@800000 {
                    label = "u-boot";
                    reg = &lt;0x0 0x800000 0x0 0x200000&gt;;
                };

                partition@a00000 {
                    label = "u-boot-env";
                    reg = &lt;0x0 0xa00000 0x0 0x200000&gt;;
                };

                partition@c00000 {
                    label = "boot";
                    reg = &lt;0x0 0xc00000 0x0 0x4000000&gt;;
                };

                partition@4c00000 {
                    label = "system";
                    reg = &lt;0x0 0x4c00000 0x1 0xfb400000&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-only OR BSD-2-Clause)</span></p>

</details>
