# NVIDIA Tegra GPIO Controller (Tegra20 - Tegra210)

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

> Device-tree binding reference for NVIDIA Tegra GPIO Controller (Tegra20 - Tegra210).

<!-- 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;gpio&#47;nvidia&#44;tegra20&#45;gpio&#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;Thierry Reding &#60;thierry&#46;reding&#64;gmail&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Jon Hunter &#60;jonathanh&#64;nvidia&#46;com&#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**

> **Allowed values (<code>enum</code>):** <a id="dt-617e1a2040e2496013d4"></a> <span id="dt-c31075c43df89b2793e3"><code>&#34;nvidia&#44;tegra20&#45;gpio&#34;</code></span>, <span id="dt-44b402f75e7bf3caf313"><code>&#34;nvidia&#44;tegra30&#45;gpio&#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;nvidia&#44;tegra114&#45;gpio&#34;</code></span>, <span id="dt-93451931f534c9a92fb4"><code>&#34;nvidia&#44;tegra124&#45;gpio&#34;</code></span>, <span id="dt-bdca084879537277097b"><code>&#34;nvidia&#44;tegra210&#45;gpio&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;nvidia&#44;tegra30&#45;gpio&#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-c2de09e7f7fd211b679d"></a>

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">The interrupt outputs from the controller. For Tegra20, there should be 7 interrupts specified, and for Tegra30, there should be 8 interrupts specified.</p>
</div>

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

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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">The first cell is the pin number and the second cell is used to specify the GPIO polarity (0 = active high, 1 = active low).</p>
</div>

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

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

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

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

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

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

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

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

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

<div id="dt-0cc2c51365b6879fba3b">
<p style="white-space: pre-wrap">Should be 2. The first cell is the GPIO number. The second cell is
used to specify flags:</p>
<pre><code>  bits[3:0] trigger type and level flags:
    1 = low-to-high edge triggered.
    2 = high-to-low edge triggered.
    4 = active high level-sensitive.
    8 = active low level-sensitive.</code></pre>
<p style="white-space: pre-wrap">Valid combinations are 1, 2, 3, 4, 8.</p>
</div>

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

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

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

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

<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;nvidia&#44;tegra30&#45;gpio&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-7787b28725c144fbfc92"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-434103e5dab0dc9821c6"><code>8</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-f83fd3bbdeba05802410"><code>8</code></span>
>
> <a id="dt-f985d6aaa3f73a650205"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-0b56c96a40292905ded0"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-c67bbe72af985902ec8f"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-3bc3f9c58c175fd4ea15"><code>7</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-1acbcc4149f500ebfc36"><code>7</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;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;gpio&#45;controller&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-a5d07fc4223c155670a0"><code>&#34;interrupt&#45;controller&#34;</code></span>

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

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

> **Value type (<code>type</code>):** <span id="dt-3363ef09170715607dca"><code>&#34;object&#34;</code></span>
>
> **Required in this object (<code>required</code>):** <a id="dt-d0b10544ec067eed73a2"></a> <span id="dt-d8feffb8557e7097b8f9"><code>&#34;gpio&#45;hog&#34;</code></span>

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

gpio: gpio@6000d000 {
    compatible = "nvidia,tegra20-gpio";
    reg = &lt;0x6000d000 0x1000&gt;;
    interrupts = &lt;GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH&gt;,
                 &lt;GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH&gt;;
    #gpio-cells = &lt;2&gt;;
    gpio-controller;
    #interrupt-cells = &lt;2&gt;;
    interrupt-controller;
};
</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>
