# Renesas RZ/A2 combined Pin and GPIO controller

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

> Device-tree binding reference for Renesas RZ/A2 combined Pin and GPIO 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;renesas&#44;rza2&#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;Chris Brandt &#60;chris&#46;brandt&#64;renesas&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Geert Uytterhoeven &#60;geert&#43;renesas&#64;glider&#46;be&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO controller. Pin multiplexing and GPIO configuration is performed on a per-pin basis. Each port features up to 8 pins, each of them configurable for GPIO function (port mode) or in alternate function mode. Up to 8 different alternate function modes exist for each single pin.</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;renesas&#44;r7s9210&#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-f5d51cae76398cdb9d95"></a>

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

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

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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">The first cell contains the global GPIO port index, constructed using the RZA2_PIN() helper macro in r7s9210-pinctrl.h. E.g. "RZA2_PIN(PORT6, 0)" for P6_0.</p>
</div>

<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-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>
>
> <a id="dt-d678a21716e72d50bf67"></a>
>
> ### All of these rules must match (<code>allOf</code>)
>
> <a id="dt-63b52706c531228fb09b"></a>
>
> #### Rule 1
>
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4ff4b4f6812780cb2b39">[<code>pincfg&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pincfg-node.md#dt-root>)</span>
>
> <a id="dt-f9736caecc060f9989d0"></a>
>
> #### Rule 2
>
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1a3f8752de2d454fbe95">[<code>pinmux&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinmux-node.md#dt-root>)</span>
>
> <div id="dt-141fc67922ca028a0439">
> <p style="white-space: pre-wrap">The child nodes of the pin controller designate pins to be used for specific peripheral functions or as GPIO.
> A pin multiplexing sub-node describes how to configure a set of (or a single) pin in some desired alternate function mode. The values for the pinmux properties are a combination of port name, pin number and the desired function index. Use the RZA2_PINMUX macro located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily define these. For assigning GPIO pins, use the macro RZA2_PIN also in to express the desired port pin.</p>
> </div>
>
> <a id="dt-861dafa8815d383f13cb"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-4674fe5ce13acc851601"></a>
>
> #### <code>pinmux</code> — required here
>
> <div id="dt-21aab25e25ed4a9255b4">
> <p style="white-space: pre-wrap">Values are constructed from GPIO port number, pin number, and alternate function configuration number using the RZA2_PINMUX() helper macro in r7s9210-pinctrl.h.</p>
> </div>
>
> **Required in this object (<code>required</code>):** <a id="dt-d0b10544ec067eed73a2"></a> <span id="dt-d8feffb8557e7097b8f9"><code>&#34;pinmux&#34;</code></span>
>
> <a id="dt-08c3741aee8aef47098b"></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-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>

**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-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/pinctrl/r7s9210-pinctrl.h&gt;
pinctrl: pinctrl@fcffe000 {
        compatible = "renesas,r7s9210-pinctrl";
        reg = &lt;0xfcffe000 0x1000&gt;;

        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        gpio-ranges = &lt;&amp;pinctrl 0 0 176&gt;;

        /* Serial Console */
        scif4_pins: serial4 {
                pinmux = &lt;RZA2_PINMUX(PORT9, 0, 4)&gt;, /* TxD4 */
                         &lt;RZA2_PINMUX(PORT9, 1, 4)&gt;; /* RxD4 */
        };
};
</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 23:</strong> <span> RZ/A2M</span></p>

</details>
