# Texas Instruments GPMC Memory Controller

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

> Device-tree binding reference for Texas Instruments GPMC Memory 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;memory&#45;controllers&#47;ti&#44;gpmc&#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;Tony Lindgren &#60;tony&#64;atomide&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Roger Quadros &#60;rogerq&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The GPMC is a unified memory controller dedicated for interfacing with external memory devices like - Asynchronous SRAM-like memories and ASICs - Asynchronous, synchronous, and page mode burst NOR flash - NAND flash - Pseudo-SRAM devices</p>
</div>

<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-cc3709943397035582d2"></a>

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

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

**Item 1**

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;ti&#44;am3352&#45;gpmc&#34;</code></span>, <span id="dt-2d97ae0f34d14dd8e72b"><code>&#34;ti&#44;am64&#45;gpmc&#34;</code></span>, <span id="dt-9802844ed4869452d348"><code>&#34;ti&#44;omap2420&#45;gpmc&#34;</code></span>, <span id="dt-24a1253e29125294194d"><code>&#34;ti&#44;omap2430&#45;gpmc&#34;</code></span>, <span id="dt-6eb9cf2b3f55b257fde4"><code>&#34;ti&#44;omap3430&#45;gpmc&#34;</code></span>, <span id="dt-50ce8af78a6d0f3b7b82"><code>&#34;ti&#44;omap4430&#45;gpmc&#34;</code></span>

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

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

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

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

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

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

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

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

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

**Item 1**

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

<a id="dt-12013039402717d72b48"></a>

**Item 2**

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

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

### <code>interrupts</code> — not listed as 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> — not listed as required here

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

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">Functional clock. Used for bus timing calculations and
GPMC configuration.</p>
</div>

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

### <code>clock&#45;names</code> — not listed as 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;fck&#34;</code></span>

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — not listed as required here

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

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

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

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

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

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

**Item 1**

> <div id="dt-46fea02e2850ca221aa0">
> <p style="white-space: pre-wrap">DMA channel for GPMC NAND prefetch</p>
> </div>

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

<a id="dt-2efe70314a961a652abe"></a>

### <code>&#35;address&#45;cells</code> — required here

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

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

### <code>&#35;size&#45;cells</code> — required here

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

<a id="dt-8a30fc81c6831ec704c6"></a>

### <code>gpmc&#44;num&#45;cs</code> — required here

<div id="dt-431c97236982dfe128cf">
<p style="white-space: pre-wrap">maximum number of supported chip-select lines.</p>
</div>

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

<a id="dt-30fdaac6fdc6b02ac233"></a>

### <code>gpmc&#44;num&#45;waitpins</code> — required here

<div id="dt-35280f7193c1a323ba69">
<p style="white-space: pre-wrap">maximum number of supported wait pins.</p>
</div>

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

<a id="dt-1e6b10cf5f67a6a268f5"></a>

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

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

<div id="dt-e09d62fd28b1cb158f01">
<p style="white-space: pre-wrap">Must be set up to reflect the memory layout with four
integer values for each chip-select line in use,
&lt;cs-number&gt; 0 &lt;physical address of mapping&gt; &lt;size&gt;</p>
</div>

<a id="dt-96a99068205807cb188d"></a>

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

<a id="dt-357fed1f115630253c2c"></a>

**Item 1**

> <div id="dt-5522a1e83f207b436a6b">
> <p style="white-space: pre-wrap">NAND bank 0</p>
> </div>

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

**Item 2**

> <div id="dt-7c8d22eaf036cf685b46">
> <p style="white-space: pre-wrap">NOR/SRAM bank 0</p>
> </div>

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

**Item 3**

> <div id="dt-31699e2226c223aed59e">
> <p style="white-space: pre-wrap">NOR/SRAM bank 1</p>
> </div>

<a id="dt-8586fac2d9a71adf4795"></a>

### <code>&#35;interrupt&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-317bbf786489389e8233"><code>2</code></span>

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

### <code>interrupt&#45;controller</code> — not listed as required here

<div id="dt-a1941b3c575a7b0aef84">
<p style="white-space: pre-wrap">The GPMC driver implements an interrupt controller for
the NAND events "fifoevent" and "termcount" plus the
rising/falling edges on the GPMC_WAIT pins.
The interrupt number mapping is as follows
0 - NAND_fifoevent
1 - NAND_termcount
2 - GPMC_WAIT0 pin edge
3 - GPMC_WAIT1 pin edge, and so on.</p>
</div>

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

### <code>&#35;gpio&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-8950f722147d2cd640b8"><code>2</code></span>

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

### <code>gpio&#45;controller</code> — not listed as required here

<div id="dt-5168d714e593428371b8">
<p style="white-space: pre-wrap">The GPMC driver implements a GPIO controller for the
GPMC WAIT pins that can be used as general purpose inputs.
0 maps to GPMC_WAIT0 pin.</p>
</div>

<a id="dt-78eb8765da1b42beba07"></a>

### <code>ti&#44;hwmods</code> — not listed as required here

<div id="dt-6a8457e4523b4b4a94b2">
<p style="white-space: pre-wrap">Name of the HWMOD associated with GPMC. This is for legacy omap2/3 platforms only.</p>
</div>

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

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

<a id="dt-33342979ddca24fc4013"></a>

### <code>ti&#44;no&#45;idle&#45;on&#45;init</code> — not listed as required here

<div id="dt-b5fe7c364cd6f1d8cd7a">
<p style="white-space: pre-wrap">Prevent idling the module at init. This is for legacy omap2/3 platforms only.</p>
</div>

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

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

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

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

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

### <code>&#64;&#91;0&#45;7&#93;&#44;&#91;a&#45;f0&#45;9&#93;&#43;&#36;</code> — name matches this regular expression

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

<div id="dt-1cb793f9a929c218c452">
<p style="white-space: pre-wrap">The child device node represents the device connected to the GPMC
bus. The device can be a NAND chip, SRAM device, NOR device
or an ASIC.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4a1e36a84ee5790352b3">[<code>ti&#44;gpmc&#45;child&#46;yaml</code>](</kernel/hardware/devicetree-bindings/dt-memory-controllers/ti-gpmc-child.md#dt-root>)</span>

<a id="dt-869d282516dbc4eeddea"></a>

#### Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

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;gpmc&#44;num&#45;cs&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;gpmc&#44;num&#45;waitpins&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;&#35;size&#45;cells&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8997992e7087b5549d86"><code>&#34;ti&#44;am64&#45;gpmc&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-b0b2f2243ff9a854f151"></a> <span id="dt-4e9ead0e861b67997dec"><code>&#34;reg&#45;names&#34;</code></span>, <span id="dt-5652a54c9ddda3dcd6bf"><code>&#34;power&#45;domains&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</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;
#include &lt;dt-bindings/gpio/gpio.h&gt;

gpmc: memory-controller@50000000 {
  compatible = "ti,am3352-gpmc";
  reg = &lt;0x50000000 0x2000&gt;;
  interrupts = &lt;100&gt;;
  clocks = &lt;&amp;l3s_clkctrl&gt;;
  clock-names = "fck";
  dmas = &lt;&amp;edma 52 0&gt;;
  dma-names = "rxtx";
  gpmc,num-cs = &lt;8&gt;;
  gpmc,num-waitpins = &lt;2&gt;;
  #address-cells = &lt;2&gt;;
  #size-cells = &lt;1&gt;;
  ranges = &lt;0 0 0x08000000 0x10000000&gt;; /* CS0 @addr 0x8000000, size 0x10000000 */
  interrupt-controller;
  #interrupt-cells = &lt;2&gt;;
  gpio-controller;
  #gpio-cells = &lt;2&gt;;

  nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = &lt;0 0 4&gt;;
    interrupt-parent = &lt;&amp;gpmc&gt;;
    interrupts = &lt;0 IRQ_TYPE_NONE&gt;, /* fifoevent */
                 &lt;1 IRQ_TYPE_NONE&gt;; /* termcount */
    ti,nand-xfer-type = "prefetch-dma";
    ti,nand-ecc-opt = "bch16";
    ti,elm-id = &lt;&amp;elm&gt;;
    rb-gpios = &lt;&amp;gpmc 0 GPIO_ACTIVE_HIGH&gt;; /* gpmc_wait0 pin */
  };
};
</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>
