# TI DaVinci NAND controller

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

> Device-tree binding reference for TI DaVinci 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;ti&#44;davinci&#45;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;Marcus Folkesson &#60;marcus&#46;folkesson&#64;gmail&#46;com&#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</code>](</kernel/hardware/devicetree-bindings/dt-mtd/nand-controller.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;ti&#44;davinci&#45;nand&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;ti&#44;keystone&#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">Access window.</p>
> </div>

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

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">AEMIF control registers.</p>
> </div>

<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-44ff4f04898d03eacfbb"></a>

### <code>ti&#44;davinci&#45;chipselect</code> — required here

<div id="dt-191f54ec268461798417">
<p style="white-space: pre-wrap">Number of chipselect. Indicate on the davinci_nand driver which chipselect is used for accessing the nand.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-29133721c7d0d36f2bce"></a> <span id="dt-42c4ca64d6d13c593584"><code>0</code></span>, <span id="dt-de72dbfd70dedc2fff7e"><code>1</code></span>, <span id="dt-24c6100cf7dfb6425f16"><code>2</code></span>, <span id="dt-6f62841ae30554eae030"><code>3</code></span>

<a id="dt-53e443c090cba7cc5280"></a>

### <code>ti&#44;davinci&#45;mask&#45;ale</code> — not listed as required here

<div id="dt-bcb68cb1ce1b6173cd77">
<p style="white-space: pre-wrap">Mask for ALE. Needed for executing address phase. These offset will be added to the base address for the chip select space the NAND Flash device is connected to.</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-c8e2294b03ae7ec0b4cc"><code>8</code></span>

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

### <code>ti&#44;davinci&#45;mask&#45;cle</code> — not listed as required here

<div id="dt-9ab8b2bc7d98500e310f">
<p style="white-space: pre-wrap">Mask for CLE. Needed for executing command phase. These offset will be added to the base address for the chip select space the NAND Flash device is connected to.</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-c26b86b72c886a34056c"><code>16</code></span>

<a id="dt-577549744d435dff56f9"></a>

### <code>ti&#44;davinci&#45;mask&#45;chipsel</code> — not listed as required here

<div id="dt-491f829b3b673d284be8">
<p style="white-space: pre-wrap">Mask for chipselect address. Needed to mask addresses for given chipselect.</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-6d5f4ba8c414e8dc90b9"><code>0</code></span>

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

### <code>ti&#44;davinci&#45;ecc&#45;bits</code> — not listed as required here

<div id="dt-b22c690eb8270ac6f1b8">
<p style="white-space: pre-wrap">Used ECC bits.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-5f777520292081325393"></a> <span id="dt-004eda24419ac6830ed2"><code>1</code></span>, <span id="dt-e57d6ecae8eedaa8f88e"><code>4</code></span>

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

### <code>ti&#44;davinci&#45;ecc&#45;mode</code> — not listed as required here

<div id="dt-789682edd60066001e19">
<p style="white-space: pre-wrap">Operation mode of the NAND ECC mode.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-cafc045b4a251c5bda15"></a> <span id="dt-37417c1949a7549af7a5"><code>&#34;none&#34;</code></span>, <span id="dt-61b600ba95653169103a"><code>&#34;soft&#34;</code></span>, <span id="dt-e3a10205ddc13dc1843f"><code>&#34;hw&#34;</code></span>, <span id="dt-be1d03001dbb5ee1fda7"><code>&#34;on&#45;die&#34;</code></span>

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

<a id="dt-27bf378dc1184073fd92"></a>

### <code>ti&#44;davinci&#45;nand&#45;buswidth</code> — not listed as required here

<div id="dt-a37b1f38965d6fbfc56a">
<p style="white-space: pre-wrap">Bus width to the NAND chip.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-48665030ef2e16fdd4a2"></a> <span id="dt-135a655f0a435a9c71a0"><code>8</code></span>, <span id="dt-8ce13d11a379766877af"><code>16</code></span>

**Default value (<code>default</code>):** <span id="dt-57e33e6324b32c8c0ea7"><code>8</code></span>

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

<a id="dt-9229fded639f543ee703"></a>

### <code>ti&#44;davinci&#45;nand&#45;use&#45;bbt</code> — not listed as required here

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

<div id="dt-dddc71123f34b63c065f">
<p style="white-space: pre-wrap">Use flash based bad block table support. OOB identifier is saved in OOB area.</p>
</div>

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

**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;ti&#44;davinci&#45;chipselect&#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">bus {
  #address-cells = &lt;2&gt;;
  #size-cells = &lt;1&gt;;

  nand-controller@2000000,0 {
    compatible = "ti,davinci-nand";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    reg = &lt;0 0x02000000 0x02000000&gt;,
          &lt;1 0x00000000 0x00008000&gt;;

    ti,davinci-chipselect = &lt;1&gt;;
    ti,davinci-mask-ale = &lt;0&gt;;
    ti,davinci-mask-cle = &lt;0&gt;;
    ti,davinci-mask-chipsel = &lt;0&gt;;

    ti,davinci-nand-buswidth = &lt;16&gt;;
    ti,davinci-ecc-mode = "hw";
    ti,davinci-ecc-bits = &lt;4&gt;;
    ti,davinci-nand-use-bbt;

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

      partition@0 {
        label = "u-boot env";
        reg = &lt;0 0x020000&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>
