# Xilinx AXI GPIO controller

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

> Device-tree binding reference for Xilinx AXI GPIO controller.

<!-- SPDX-License-Identifier: (GPL-2.0 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;xlnx&#44;gpio&#45;xilinx&#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;Neeli Srinivas &#60;srinivas&#46;neeli&#64;amd&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The AXI GPIO design provides a general purpose input/output interface to an AXI4-Lite interface. The AXI GPIO can be configured as either a single or a dual-channel device. The width of each channel is independently configurable. The channels can be configured to generate an interrupt when a transition on any of their inputs occurs.</p>
</div>

<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;xlnx&#44;xps&#45;gpio&#45;1&#46;00&#46;a&#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-cfb238e0b7cdb276d83f"></a>

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

**Exact value (<code>const</code>):** <span id="dt-8950f722147d2cd640b8"><code>2</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-f5d51cae76398cdb9d95"></a>

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

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

<a id="dt-14035f3a8826cdac18bd"></a>

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

<div id="dt-f08f80c16a8648128988">
<p style="white-space: pre-wrap">strings describing the names of each gpio line</p>
</div>

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

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

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

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

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

<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-4e9a371963ac013ad39d"></a>

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

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

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

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

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

<a id="dt-430876d31352b71477a8"></a>

### <code>xlnx&#44;all&#45;inputs</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4554737d86e0a5c41d9f">[<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-6fc6505c30c34c2e605f">
<p style="white-space: pre-wrap">This option sets this GPIO channel1 bits in input mode.</p>
</div>

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

### <code>xlnx&#44;all&#45;inputs&#45;2</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1863abc665fb6bd0f2c7">[<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-21f48c0bf76df93bbfd2">
<p style="white-space: pre-wrap">This option sets this GPIO channel2 bits in input mode.</p>
</div>

<a id="dt-21d1b9653d62db01b8dd"></a>

### <code>xlnx&#44;all&#45;outputs</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ee20a04cdc72c987b44c">[<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-a774ba4111c1f0c4c7b4">
<p style="white-space: pre-wrap">This option sets this GPIO channel1 bits in output mode.</p>
</div>

<a id="dt-534928b6dd504b3da6f3"></a>

### <code>xlnx&#44;all&#45;outputs&#45;2</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-e77767e8b815c0c4cf03">[<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-6668ef832097c50d3955">
<p style="white-space: pre-wrap">This option sets this GPIO channel2 bits in output mode.</p>
</div>

<a id="dt-8921927e0e4cdd6a51d9"></a>

### <code>xlnx&#44;dout&#45;default</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-70295dbd5bb295a7c78f">[<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-a918778b3042f5c7fb82">
<p style="white-space: pre-wrap">Sets the default value of all the enabled bits of channel1.</p>
</div>

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

<a id="dt-39809ba8bf9491972248"></a>

### <code>xlnx&#44;dout&#45;default&#45;2</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-f9e75f46ec3cbf5b12cf">[<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-ff5c0d3618030cb0ce59">
<p style="white-space: pre-wrap">Sets the default value of all the enabled bits of channel2.</p>
</div>

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

<a id="dt-4a5dcf165fef96ef8026"></a>

### <code>xlnx&#44;gpio&#45;width</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-bb01fbc2dcb80ddbc5be">[<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-bb16827cf44bf158706e">
<p style="white-space: pre-wrap">The value defines the bit width of the GPIO channel1.</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-71c91d0def33e05cd72b"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-6bace157e55a5282de25"><code>32</code></span>

**Default value (<code>default</code>):** <span id="dt-7e96d696b132d91b5b62"><code>32</code></span>

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

### <code>xlnx&#44;gpio2&#45;width</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d2cdded111893ce23055">[<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-efcce3b94fae6f8184e3">
<p style="white-space: pre-wrap">The value defines the bit width of the GPIO channel2.</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-ccc23c81837b93cb0527"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-c11c5e2ba835645a8c78"><code>32</code></span>

**Default value (<code>default</code>):** <span id="dt-7c5c6b189934f98b9675"><code>32</code></span>

<a id="dt-98d1153d652a06ec18d9"></a>

### <code>xlnx&#44;interrupt&#45;present</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-602c6acbdf0c16959e31">[<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-742ec236aa42f770674e">
<p style="white-space: pre-wrap">This parameter enables interrupt control logic and interrupt registers in GPIO module.</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-310ff0bc8790405b684e"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-18111f3bdd11afa71e03"><code>1</code></span>

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

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

### <code>xlnx&#44;is&#45;dual</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4040eaf74a7ade7b3d07">[<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-3062a83b854c9c9e7212">
<p style="white-space: pre-wrap">This parameter enables a second GPIO channel (GPIO2).</p>
</div>

**Minimum value (<code>minimum</code>):** <span id="dt-d97b17b75967e0d2ab5b"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-f340a66e79334d56e005"><code>1</code></span>

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

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

### <code>xlnx&#44;tri&#45;default</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4420e6857d5ca8102379">[<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-1bd3fa1773f354041cff">
<p style="white-space: pre-wrap">This value configures the input or output mode of each bit of GPIO channel1.</p>
</div>

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

### <code>xlnx&#44;tri&#45;default&#45;2</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-9f648f61264e8dcff4c7">[<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-fffdd04309d169db124a">
<p style="white-space: pre-wrap">This value configures the input or output mode of each bit of GPIO channel2.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;reg&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;compatible&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;gpio&#45;controller&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;gpio&#45;cells&#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/interrupt-controller/arm-gic.h&gt;

gpio@a0020000 {
    compatible = "xlnx,xps-gpio-1.00.a";
    reg = &lt;0xa0020000 0x10000&gt;;
    #gpio-cells = &lt;2&gt;;
    #interrupt-cells = &lt;0x2&gt;;
    clocks = &lt;&amp;zynqmp_clk 71&gt;;
    gpio-controller;
    interrupt-controller;
    interrupt-names = "ip2intc_irpt";
    interrupt-parent = &lt;&amp;gic&gt;;
    interrupts = &lt;0 89 4&gt;;
    xlnx,all-inputs = &lt;0x0&gt;;
    xlnx,all-inputs-2 = &lt;0x0&gt;;
    xlnx,all-outputs = &lt;0x0&gt;;
    xlnx,all-outputs-2 = &lt;0x0&gt;;
    xlnx,dout-default = &lt;0x0&gt;;
    xlnx,dout-default-2 = &lt;0x0&gt;;
    xlnx,gpio-width = &lt;0x20&gt;;
    xlnx,gpio2-width = &lt;0x20&gt;;
    xlnx,interrupt-present = &lt;0x1&gt;;
    xlnx,is-dual = &lt;0x1&gt;;
    xlnx,tri-default = &lt;0xFFFFFFFF&gt;;
    xlnx,tri-default-2 = &lt;0xFFFFFFFF&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 OR BSD-2-Clause)</span></p>

</details>
