# Allwinner A523 Pin Controller

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

> Device-tree binding reference for Allwinner A523 Pin 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;pinctrl&#47;allwinner&#44;sun55i&#45;a523&#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;Andre Przywara &#60;andre&#46;przywara&#64;arm&#46;com&#62;&#34;</code></span>

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

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

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

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

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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">GPIO consumers must use three arguments, first the number of the bank, then the pin number inside that bank, and finally the GPIO flags.</p>
</div>

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

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

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

<div id="dt-0cc2c51365b6879fba3b">
<p style="white-space: pre-wrap">Interrupts consumers must use three arguments, first the number of the bank, then the pin number inside that bank, and finally the interrupts flags.</p>
</div>

<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;allwinner&#44;sun55i&#45;a523&#45;pinctrl&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;allwinner&#44;sun55i&#45;a523&#45;r&#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-c2de09e7f7fd211b679d"></a>

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-1691b9edf145244244a0"><code>2</code></span>

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">One interrupt per external interrupt bank supported on the controller, sorted by bank number ascending order.</p>
</div>

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

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

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">Bus Clock</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">High Frequency Oscillator</p>
> </div>

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

**Item 3**

> <div id="dt-98e44cf6c35fb1f8c6f9">
> <p style="white-space: pre-wrap">Low Frequency Oscillator</p>
> </div>

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

### <code>clock&#45;names</code> — 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;apb&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-0298e5f353a64a09a8a6"><code>&#34;hosc&#34;</code></span>

<a id="dt-261be8310c899fd46631"></a>

**Item 3**

> **Exact value (<code>const</code>):** <span id="dt-ad55fa67f3e765bf6ab6"><code>&#34;losc&#34;</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-b98252f9c39642b1db8f"></a>

### <code>interrupt&#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

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

<a id="dt-728cd3388d41fee7f68f"></a>

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

<div id="dt-74dd16178a095d104f51">
<p style="white-space: pre-wrap">Debouncing periods in microseconds, one period per interrupt bank found in the controller</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-51708f159525bfdb868f">[<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>

**Minimum number of items (<code>minItems</code>):** <span id="dt-81bdd1266a4e1bafe16a"><code>2</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-4ef404b5c1d7fb6a2995"><code>10</code></span>

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

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

<a id="dt-73f1a0c7cc6a75895f86"></a>

### <code>&#94;&#40;&#91;rs&#93;&#45;&#41;&#63;&#40;&#40;&#91;a&#45;z0&#45;9&#93;&#123;3&#44;&#125;&#124;&#91;a&#45;oq&#45;z&#93;&#91;a&#45;z0&#45;9&#93;&#42;&#63;&#41;&#63;&#45;&#41;&#43;&#63;&#40;p&#91;a&#45;m&#93;&#91;0&#45;9&#93;&#42;&#63;&#45;&#41;&#63;&#63;pins&#63;&#36;</code> — name matches this regular expression

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

<a id="dt-677450ad0e7468d747a8"></a>

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

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

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

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

<a id="dt-848d4ca35110affb7442"></a>

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

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

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

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

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

<a id="dt-3d8370a62d8b93fd4464"></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-3f6ad861c33656e34064"></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-f78b7a8d4156f3ec6e6d"></a>

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8d4ee67ce9eef753fd08">[<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-e68ce201960a798ccf5e"></a> <span id="dt-99733cb1e497a714c30c"><code>10</code></span>, <span id="dt-408c77c2e79916fe2795"><code>20</code></span>, <span id="dt-e42b85d264262f278480"><code>30</code></span>, <span id="dt-eee0de0525fc1b60e6f5"><code>40</code></span>

<a id="dt-98001a70293330e5acbf"></a>

**<code>allwinner&#44;pinmux</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-a852311d7e70048fc9b4">[<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>

<div id="dt-e12c940682c71fc753e1">
<p style="white-space: pre-wrap">Pinmux selector value, for each pin. Almost every time this value is the same for all pins, so any array shorter than the number of pins will repeat the last value, to allow just specifying a single cell, for all cells.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-de370a0da3b9a8e1fe61"></a> <span id="dt-f7a7a0b92f13a066c4d1"><code>&#34;pins&#34;</code></span>, <span id="dt-e6d229256643d846c725"><code>&#34;allwinner&#44;pinmux&#34;</code></span>, <span id="dt-0dde35a8b65aca3079ab"><code>&#34;function&#34;</code></span>

<a id="dt-c4fe37a2c8a14ac05c68"></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-bdfd32a814ae75358fb7"></a>

### <code>&#94;vcc&#45;p&#91;a&#45;m&#93;&#45;supply&#36;</code> — name matches this regular expression

<div id="dt-4a8a396228dbaa21aeaa">
<p style="white-space: pre-wrap">Power supplies for pin banks.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;compatible&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;reg&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clocks&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;gpio&#45;controller&#34;</code></span>, <span id="dt-a5d07fc4223c155670a0"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-4503833a9b225761c43a"><code>&#34;interrupts&#34;</code></span>, <span id="dt-727c9b818c335e022c0e"><code>&#34;interrupt&#45;controller&#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>pinctrl&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinctrl.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-c0ab484bd71d0671c6ab"></a> <span id="dt-4eb87bb951292ac8d56d"><code>&#34;allwinner&#44;sun55i&#45;a523&#45;pinctrl&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-26d1c84fcc55a7d91dea"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-46e318450db8639361ba"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-4e9b8776c0efa8e9014c"><code>10</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-5826f726e17db7a38ebe"><code>10</code></span>

<a id="dt-317510ea5c8bf789ca60"></a>

### Rule 3

> <a id="dt-15ef78abba37234c7e3a"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-81c13bb46c56768b42c8"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-676f6e45d3a322ea7096"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-22249f3875646fe5ea9e"></a> <span id="dt-5632855001ed404c9e46"><code>&#34;allwinner&#44;sun55i&#45;a523&#45;r&#45;pinctrl&#34;</code></span>
>
> <a id="dt-86c371e5831ff1f84ce5"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-4b2e0558620eefde94e1"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-3a46c9d3a981c9cf87fd"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-bdba428219950f8e5929"><code>2</code></span>
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-52113361a767aeb1a6b3"><code>2</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">r_pio: pinctrl@7022000 {
    compatible = "allwinner,sun55i-a523-r-pinctrl";
    reg = &lt;0x7022000 0x800&gt;;
    interrupts = &lt;0 159 4&gt;, &lt;0 161 4&gt;;
    clocks = &lt;&amp;r_ccu 1&gt;, &lt;&amp;osc24M&gt;, &lt;&amp;osc32k&gt;;
    clock-names = "apb", "hosc", "losc";
    gpio-controller;
    #gpio-cells = &lt;3&gt;;
    interrupt-controller;
    #interrupt-cells = &lt;3&gt;;

    r_i2c_pins: r-i2c-pins {
        pins = "PL0", "PL1";
        allwinner,pinmux = &lt;2&gt;;
        function = "r_i2c0";
        bias-pull-up;
    };

    r_spi_pins: r-spi-pins {
        pins = "PL11" ,"PL12", "PL13";
        allwinner,pinmux = &lt;6&gt;;
        function = "r_spi";
    };
};
</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 67:</strong> <span> It's pretty scary, but the basic idea is that:</span></p>

<p id="dt-comment-2"><strong>Line 68:</strong> <span>   - One node name can start with either s- or r- for PRCM nodes,</span></p>

<p id="dt-comment-3"><strong>Line 69:</strong> <span>   - Then, the name itself can be any repetition of &lt;string&gt;- (to</span></p>

<p id="dt-comment-4"><strong>Line 70:</strong> <span>     accommodate with nodes like uart4-rts-cts-pins), where each</span></p>

<p id="dt-comment-5"><strong>Line 71:</strong> <span>     string can be either starting with 'p' but in a string longer</span></p>

<p id="dt-comment-6"><strong>Line 72:</strong> <span>     than 3, or something that doesn't start with 'p',</span></p>

<p id="dt-comment-7"><strong>Line 73:</strong> <span>   - Then, the bank name is optional and will be between pa and pm.</span></p>

<p id="dt-comment-8"><strong>Line 74:</strong> <span>     Some pins groups that have several options will have the pin</span></p>

<p id="dt-comment-9"><strong>Line 75:</strong> <span>     numbers then,</span></p>

<p id="dt-comment-10"><strong>Line 76:</strong> <span>   - Finally, the name will end with either -pin or pins.</span></p>

</details>
