# Awinic AW9523/AW9523B I2C GPIO Expander

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

> Device-tree binding reference for Awinic AW9523/AW9523B I2C GPIO Expander.

<!-- 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;pinctrl&#47;awinic&#44;aw9523&#45;pinctrl&#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;AngeloGioacchino Del Regno &#60;angelogioacchino&#46;delregno&#64;somainline&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Awinic AW9523/AW9523B I2C GPIO Expander featuring 16 multi-function
I/O, 256 steps PWM mode and interrupt support.</p>
</div>

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

## Properties and child nodes (<code>properties</code>)

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;awinic&#44;aw9523&#45;pinctrl&#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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">Specifying the pin number and flags, as defined in
include/dt-bindings/gpio/gpio.h</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> — required here

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">Specifies the INTN pin IRQ.</p>
</div>

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

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

<div id="dt-0cc2c51365b6879fba3b">
<p style="white-space: pre-wrap">Specifies the PIN numbers and Flags, as defined in defined in include/dt-bindings/interrupt-controller/irq.h</p>
</div>

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

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

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

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

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

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

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

### <code>&#45;pins&#36;</code> — name matches this regular expression

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

<div id="dt-d0f0a177b390ac94f08f">
<p style="white-space: pre-wrap">Pinctrl node's client devices use subnodes for desired pin configuration. Client device subnodes use below standard properties.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8c082b219690062f90c6">[<code>&#47;schemas&#47;pinctrl&#47;pincfg&#45;node&#46;yaml</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pincfg-node.md#dt-root>)</span>

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

#### Properties and child nodes (<code>properties</code>)

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

**<code>pins</code> — required here**

<div id="dt-ae2868911c1bf30f9e3a">
<p style="white-space: pre-wrap">List of gpio pins affected by the properties specified in this subnode.</p>
</div>

<a id="dt-913e91d29e95b48eb7ed"></a>

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

> **String pattern (<code>pattern</code>):** <span id="dt-5ec3dd9c19aa0ad7fb5e"><code>&#34;&#94;gpio&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-9cedca4768e57e3cbf35"><code>16</code></span>

<a id="dt-7f14e6537456475371d0"></a>

**<code>function</code> — required here**

<div id="dt-66e1b1f7ee05f109c7f9">
<p style="white-space: pre-wrap">Specify the alternative function to be configured for the specified pins.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-f150d7cb555e54280f5a"></a> <span id="dt-418c17df698d2c35b9a2"><code>&#34;gpio&#34;</code></span>, <span id="dt-872ddb5a8d0ec9f5b887"><code>&#34;pwm&#34;</code></span>

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

**<code>bias&#45;disable</code> — not listed as required here**

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

<a id="dt-1393a97b2895bd98f294"></a>

**<code>bias&#45;pull&#45;down</code> — not listed as required here**

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

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

**<code>bias&#45;pull&#45;up</code> — not listed as required here**

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

<a id="dt-742b42f7200d80a8c11a"></a>

**<code>drive&#45;open&#45;drain</code> — not listed as required here**

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

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

**<code>drive&#45;push&#45;pull</code> — not listed as required here**

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

<a id="dt-113e3394dee3f7b73cc4"></a>

**<code>input&#45;enable</code> — not listed as required here**

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

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

**<code>input&#45;disable</code> — not listed as required here**

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

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

**<code>output&#45;high</code> — not listed as required here**

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

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

**<code>output&#45;low</code> — not listed as required here**

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

**Required in this object (<code>required</code>):** <a id="dt-4d6b758afb351ac15201"></a> <span id="dt-4e7a6c8aa526cfc124a2"><code>&#34;pins&#34;</code></span>, <span id="dt-81f0f2d362e66a97bff0"><code>&#34;function&#34;</code></span>

<a id="dt-9069dcc32114c9a4bdd9"></a>

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

<code>false</code>

Not 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;gpio&#45;controller&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;gpio&#45;ranges&#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/gpio/gpio.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    aw9523: gpio-expander@58 {
            compatible = "awinic,aw9523-pinctrl";
            reg = &lt;0x58&gt;;
            interrupt-parent = &lt;&amp;tlmm&gt;;
            interrupts = &lt;50 IRQ_TYPE_EDGE_FALLING&gt;;
            gpio-controller;
            #gpio-cells = &lt;2&gt;;
            gpio-ranges = &lt;&amp;tlmm 0 0 16&gt;;
            interrupt-controller;
            #interrupt-cells = &lt;2&gt;;
            reset-gpios = &lt;&amp;tlmm 51 GPIO_ACTIVE_HIGH&gt;;

            keyboard-matrix-col-pins {
                    pins = "gpio8", "gpio9", "gpio10", "gpio11",
                           "gpio12", "gpio13", "gpio14", "gpio15";
                    function = "gpio";
                    input-disable;
                    output-low;
            };

            keyboard-matrix-row-pins {
                    pins = "gpio0", "gpio1", "gpio2", "gpio3",
                           "gpio4", "gpio5", "gpio6", "gpio7";
                    function = "gpio";
                    bias-pull-up;
                    drive-open-drain;
                    input-enable;
            };
    };
};
</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>

<p id="dt-comment-1"><strong>Line 49:</strong> <span> PIN CONFIGURATION NODES</span></p>

<p id="dt-comment-2"><strong>Line 101:</strong> <span> Example configuration to drive pins for a keyboard matrix</span></p>

</details>
