# Qualcomm NAND controller

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

> Device-tree binding reference for Qualcomm 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;qcom&#44;nandc&#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;Manivannan Sadhasivam &#60;manivannan&#46;sadhasivam&#64;linaro&#46;org&#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**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-3b212051dcd0fc641cd8"></a> <span id="dt-bd6e6716d05ec45653db"><code>&#34;qcom&#44;sdx75&#45;nand&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;qcom&#44;sdx55&#45;nand&#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**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-aa1230b5a2b80f9fb387"></a> <span id="dt-49b534c9c8948cfc8034"><code>&#34;qcom&#44;ipq806x&#45;nand&#34;</code></span>, <span id="dt-93451931f534c9a92fb4"><code>&#34;qcom&#44;ipq4019&#45;nand&#34;</code></span>, <span id="dt-bdca084879537277097b"><code>&#34;qcom&#44;ipq6018&#45;nand&#34;</code></span>, <span id="dt-922f7901d25b667972ac"><code>&#34;qcom&#44;ipq8074&#45;nand&#34;</code></span>, <span id="dt-eb61ad381053476dae55"><code>&#34;qcom&#44;sdx55&#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-4e9a371963ac013ad39d"></a>

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

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">Core Clock</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">Always ON Clock</p>
> </div>

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

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

<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;aon&#34;</code></span>

<a id="dt-71a23eb5cf56e9869904"></a>

### <code>qcom&#44;cmd&#45;crci</code> — not listed as required here

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

<div id="dt-57031f36baff2f3ce750">
<p style="white-space: pre-wrap">Must contain the ADM command type CRCI block instance number specified for the NAND controller on the given platform</p>
</div>

<a id="dt-62e6a23872f99eca2858"></a>

### <code>qcom&#44;data&#45;crci</code> — not listed as required here

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

<div id="dt-ea283a6d187243dd51bb">
<p style="white-space: pre-wrap">Must contain the ADM data type CRCI block instance number specified for the NAND controller on the given platform</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-89179586402e00fb2db1"></a>

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

**Exact value (<code>const</code>):** <span id="dt-6a66ed0df718e0097002"><code>8</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>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-e0bd7979a17ce1c59aae"></a> <span id="dt-fe0b5f76fd0c22e710f3"><code>512</code></span>

<a id="dt-6b1979efd507b73f6b46"></a>

**<code>qcom&#44;boot&#45;partitions</code> — not listed as required here**

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

<a id="dt-845ff22f4d7e8a005698"></a>

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

> <a id="dt-2ceae21d02666cd559e1"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-de372c4ad858e7403ef6"></a>
>
> **Item 1**
>
> > <div id="dt-295750ab20bb4b105ae1">
> > <p style="white-space: pre-wrap">offset</p>
> > </div>
>
> <a id="dt-18fc243805773046e43c"></a>
>
> **Item 2**
>
> > <div id="dt-ff01c93247a5bf0a72f4">
> > <p style="white-space: pre-wrap">size</p>
> > </div>

<div id="dt-e6a527ba9a462323b60b">
<p style="white-space: pre-wrap">Boot partition use a different layout where the 4 bytes of spare data are not protected by ECC. Use this to declare these special partitions by defining first the offset and then the size.
It's in the form of &lt;offset1 size1 offset2 size2 offset3 ...&gt; and should be declared in ascending order.
Refer to the ipq8064 example on how to use this special binding.</p>
</div>

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

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

<code>false</code>

Not allowed by this rule.

<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;qcom&#44;ipq806x&#45;nand&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-26d1c84fcc55a7d91dea"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-f444428309b17730c91b"></a>
> >
> > **<code>dmas</code> — not listed as required here**
> >
> > <a id="dt-1d7b15403ebf9c9471ad"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-99a95bc7386db42558d0"></a>
> >
> > **Item 1**
> >
> > > <div id="dt-b8ca5c6118cb08d5a20e">
> > > <p style="white-space: pre-wrap">rxtx DMA channel</p>
> > > </div>
> >
> > <a id="dt-606ab4afd02d69f0a319"></a>
> >
> > **<code>dma&#45;names</code> — not listed as required here**
> >
> > <a id="dt-57cae489a5bcf2873a24"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-77058396ef4ad0e2fd84"></a>
> >
> > **Item 1**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-70cf53df506800e116a6"><code>&#34;rxtx&#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>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-7838023cb1ac8ba1fc13"></a> <span id="dt-2698b34438b1aced3e06"><code>&#34;qcom&#44;sdx75&#45;nand&#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-f65aa3e43c5397e273f5"></a>
> >
> > **<code>iommus</code> — not listed as required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-ef24450067a443ff766d"><code>1</code></span>

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

### Rule 4

> <a id="dt-5d622c5a2672c1e49b35"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-8d84f7bba76b4e26221f"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-11dc65c5cf7abc0317bb"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-3de4a4db25c09109abf4"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-2f146490cc52d0a82c19"></a> <span id="dt-b1038ed41acf3cc462f9"><code>&#34;qcom&#44;ipq4019&#45;nand&#34;</code></span>, <span id="dt-ee83d100044168836749"><code>&#34;qcom&#44;ipq6018&#45;nand&#34;</code></span>, <span id="dt-e937cad1333060d95a2c"><code>&#34;qcom&#44;ipq8074&#45;nand&#34;</code></span>, <span id="dt-056d08a65205139bcaab"><code>&#34;qcom&#44;sdx55&#45;nand&#34;</code></span>
>
> <a id="dt-889ceb40bc531bf0dc1d"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-7cd597a6bb6b91730c25"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-30cd378844be5ceaa01e"></a>
> >
> > **<code>dmas</code> — not listed as required here**
> >
> > <a id="dt-5d3334cb98c299d9ef6e"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-4fa7a7feb2191d261261"></a>
> >
> > **Item 1**
> >
> > > <div id="dt-8e394748d93917b51e13">
> > > <p style="white-space: pre-wrap">tx DMA channel</p>
> > > </div>
> >
> > <a id="dt-361c0dc1480437ecc8aa"></a>
> >
> > **Item 2**
> >
> > > <div id="dt-7f53f77f14f5ed9f1875">
> > > <p style="white-space: pre-wrap">rx DMA channel</p>
> > > </div>
> >
> > <a id="dt-b0dbad07627519b0c5f4"></a>
> >
> > **Item 3**
> >
> > > <div id="dt-326552ef024f3cdae5c3">
> > > <p style="white-space: pre-wrap">cmd DMA channel</p>
> > > </div>
> >
> > <a id="dt-3a1f132714eaad271e7f"></a>
> >
> > **<code>dma&#45;names</code> — not listed as required here**
> >
> > <a id="dt-add9dd6104c07be607e1"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > <a id="dt-0a0a8dee04750cea4206"></a>
> >
> > **Item 1**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-ce5a4dcc00fcbbee7a4b"><code>&#34;tx&#34;</code></span>
> >
> > <a id="dt-ad217e448e36b8542553"></a>
> >
> > **Item 2**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-261f588e07601a05c20d"><code>&#34;rx&#34;</code></span>
> >
> > <a id="dt-8273302a8dcf76aabb68"></a>
> >
> > **Item 3**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-5fb93adde23d3dc26ffb"><code>&#34;cmd&#34;</code></span>
> >
> > <a id="dt-fcfb80240ffa2ce39baa"></a>
> >
> > **<code>qcom&#44;cmd&#45;crci</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.
> >
> > <a id="dt-3e6d3fdea966f1995615"></a>
> >
> > **<code>qcom&#44;data&#45;crci</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.
> >
> > <a id="dt-9fff9961ce6722b392f4"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-db0009846645352666cd"></a>
> >
> > **<code>&#94;nand&#64;&#91;a&#45;f0&#45;9&#93;&#36;</code> — name matches this regular expression**
> >
> > <a id="dt-c197b3ee0523ae0af761"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-6cca4536fc3ccde27778"></a>
> >
> > **<code>qcom&#44;boot&#45;partitions</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property 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;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#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/qcom,gcc-ipq806x.h&gt;
nand-controller@1ac00000 {
    compatible = "qcom,ipq806x-nand";
    reg = &lt;0x1ac00000 0x800&gt;;

    clocks = &lt;&amp;gcc EBI2_CLK&gt;,
             &lt;&amp;gcc EBI2_AON_CLK&gt;;
    clock-names = "core", "aon";

    dmas = &lt;&amp;adm_dma 3&gt;;
    dma-names = "rxtx";
    qcom,cmd-crci = &lt;15&gt;;
    qcom,data-crci = &lt;3&gt;;

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

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

        nand-ecc-strength = &lt;4&gt;;
        nand-bus-width = &lt;8&gt;;

        qcom,boot-partitions = &lt;0x0 0x58a0000&gt;;

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

            partition@0 {
                label = "boot-nand";
                reg = &lt;0 0x58a0000&gt;;
            };

            partition@58a0000 {
                label = "fs-nand";
                reg = &lt;0x58a0000 0x4000000&gt;;
            };
        };
    };
};

#include &lt;dt-bindings/clock/qcom,gcc-ipq4019.h&gt;
nand-controller@79b0000 {
    compatible = "qcom,ipq4019-nand";
    reg = &lt;0x79b0000 0x1000&gt;;

    clocks = &lt;&amp;gcc GCC_QPIC_CLK&gt;,
             &lt;&amp;gcc GCC_QPIC_AHB_CLK&gt;;
    clock-names = "core", "aon";

    dmas = &lt;&amp;qpicbam 0&gt;,
           &lt;&amp;qpicbam 1&gt;,
           &lt;&amp;qpicbam 2&gt;;
    dma-names = "tx", "rx", "cmd";

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

    nand@0 {
        reg = &lt;0&gt;;
        nand-ecc-strength = &lt;4&gt;;
        nand-bus-width = &lt;8&gt;;

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

            partition@0 {
                label = "boot-nand";
                reg = &lt;0 0x58a0000&gt;;
            };

            partition@58a0000 {
                label = "fs-nand";
                reg = &lt;0x58a0000 0x4000000&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>
