# Raw NAND Chip Common Properties

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

> Device-tree binding reference for Raw NAND Chip Common Properties.

<!-- 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;raw&#45;nand&#45;chip&#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-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;chip&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-mtd/nand-chip.md#dt-root>)</span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The ECC strength and ECC step size properties define the user
desires in terms of correction capability of a controller. Together,
they request the ECC engine to correct {strength} bit errors per
{size} bytes for a particular raw NAND chip.</p>
<p style="white-space: pre-wrap">The interpretation of these parameters is implementation-defined, so
not all implementations must support all possible
combinations. However, implementations are encouraged to further
specify the value(s) they support.</p>
</div>

<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;nand&#64;&#91;a&#45;f0&#45;9&#93;&#36;&#34;</code></span>

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

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

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">Contains the chip-select IDs.</p>
</div>

<a id="dt-60025d5fb806f38d012f"></a>

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

<div id="dt-878f8bd982360b23c8f8">
<p style="white-space: pre-wrap">Location of the ECC bytes. This location is unknown by default but can be explicitly set to "oob", if all ECC bytes are known to be stored in the OOB area, or "interleaved" if ECC bytes will be interleaved with regular data in the main area.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-7114c85c72fa48926d5b">[<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-385d193eb5853cbccf17"></a> <span id="dt-8f1cc3c24d580b32bffb"><code>&#34;oob&#34;</code></span>, <span id="dt-40aad0ea66aee74d86cc"><code>&#34;interleaved&#34;</code></span>

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

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

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

<div id="dt-d09a977fba29113430c2">
<p style="white-space: pre-wrap">Legacy ECC configuration mixing the ECC engine choice and configuration.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-fa48db518dbac27de04c">[<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-185d6cadef786a2514ee"></a> <span id="dt-636c616ec8efb5692788"><code>&#34;none&#34;</code></span>, <span id="dt-adac201280d2449214b9"><code>&#34;soft&#34;</code></span>, <span id="dt-e6952d7fb7f12baeda31"><code>&#34;soft&#95;bch&#34;</code></span>, <span id="dt-0dded4751c9b775a2ee3"><code>&#34;hw&#34;</code></span>, <span id="dt-5675d98d5cbee272838d"><code>&#34;hw&#95;syndrome&#34;</code></span>, <span id="dt-b9d3a0accfbda4357306"><code>&#34;on&#45;die&#34;</code></span>

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

<a id="dt-87fb29b6c4a6f243ceb5"></a>

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-25d6147d09c5aa1dea18">[<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-6734721de3a7e564d708"></a> <span id="dt-307577e82f7c96cbd537"><code>8</code></span>, <span id="dt-4e1479dd6acac7a5e8d6"><code>16</code></span>

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

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

### <code>nand&#45;on&#45;flash&#45;bbt</code> — not listed as required here

<div id="dt-e1e46cdc5b87ff7bb1f8">
<p style="white-space: pre-wrap">With this property, the OS will search the device for a Bad Block Table (BBT). If not found, it will create one, reserve a few blocks at the end of the device to store it and update it as the device ages. Otherwise, the out-of-band area of a few pages of all the blocks will be scanned at boot time to find Bad Block Markers (BBM). These markers will help to build a volatile BBT in RAM.</p>
</div>

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

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

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

<div id="dt-95085e893ff49877e1e8">
<p style="white-space: pre-wrap">Whether or not the ECC strength should be maximized. The maximum ECC strength is both controller and chip dependent. The ECC engine has to select the ECC config providing the best strength and taking the OOB area size constraint into account. This is particularly useful when only the in-band area is used by the upper layers, and you want to make your NAND as reliable as possible.</p>
</div>

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

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

### <code>nand&#45;is&#45;boot&#45;medium</code> — not listed as required here

<div id="dt-558d7adc7e79d2c483db">
<p style="white-space: pre-wrap">Whether or not the NAND chip is a boot medium. Drivers might use this information to select ECC algorithms supported by the boot ROM or similar restrictions.</p>
</div>

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

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

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

<div id="dt-743b8e0e36a5f4857b7b">
<p style="white-space: pre-wrap">Contains the native Ready/Busy IDs.</p>
</div>

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

<a id="dt-073198d5a30667f60b51"></a>

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

<div id="dt-301648fb0dddefc0965b">
<p style="white-space: pre-wrap">Contains one or more GPIO descriptor (the numper of descriptor depends on the number of R/B pins exposed by the flash) for the Ready/Busy pins. Active state refers to the NAND ready state and should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.</p>
</div>

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

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

<div id="dt-b3d5c4aa54d3e1aefc66">
<p style="white-space: pre-wrap">Contains one GPIO descriptor for the Write Protect pin. Active state refers to the NAND Write Protect state and should be set to GPIOD_ACTIVE_LOW unless the signal is inverted.</p>
</div>

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

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;reg&#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.

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

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

</details>
