# Microchip PIO3 Pinmux Controller

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

> Device-tree binding reference for Microchip PIO3 Pinmux 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;atmel&#44;at91rm9200&#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;Manikandan Muralidharan &#60;manikandan&#46;m&#64;microchip&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The AT91 Pinmux Controller, enables the IC to share one PAD to several functional blocks. The sharing is done by multiplexing the PAD input/output signals. For each PAD there are up to 8 muxing options (called periph modes). Since different modules require different PAD settings (like pull up, keeper, etc) the controller controls also the PAD settings parameters.</p>
</div>

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

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-3b212051dcd0fc641cd8"></a> <span id="dt-bd6e6716d05ec45653db"><code>&#34;atmel&#44;at91rm9200&#45;pinctrl&#34;</code></span>, <span id="dt-3e7fb897881b12f43f81"><code>&#34;atmel&#44;at91sam9x5&#45;pinctrl&#34;</code></span>, <span id="dt-b7d19de74fd35364d49f"><code>&#34;atmel&#44;sama5d3&#45;pinctrl&#34;</code></span>, <span id="dt-6cbdeefc52e7132bc62c"><code>&#34;microchip&#44;sam9x60&#45;pinctrl&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;simple&#45;mfd&#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;microchip&#44;sam9x7&#45;pinctrl&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;microchip&#44;sam9x60&#45;pinctrl&#34;</code></span>
>
> <a id="dt-1655c7bc2063a21f60f8"></a>
>
> **Item 3**
>
> > **Exact value (<code>const</code>):** <span id="dt-7c57653c6bcac024338a"><code>&#34;simple&#45;mfd&#34;</code></span>

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

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

**Exact value (<code>const</code>):** <span id="dt-e6e6af09ab617572731b"><code>1</code></span>

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

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

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>1</code></span>

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

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

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

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

### <code>atmel&#44;mux&#45;mask</code> — required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-a1d62e646c1f764700e3">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>

<div id="dt-72bbe1990b9c8fe86608">
<p style="white-space: pre-wrap">Array of mask (periph per bank) to describe if a pin can be
configured in this periph mode. All the periph and bank need to
be described.</p>
<p style="white-space: pre-wrap">#How to create such array:</p>
<p style="white-space: pre-wrap">Each column will represent the possible peripheral of the pinctrl
Each line will represent a pio bank</p>
<p style="white-space: pre-wrap">#Example:</p>
<p style="white-space: pre-wrap">In at91sam9260.dtsi,
Peripheral: 2 ( A and B)
Bank: 3 (A, B and C)</p>
<p style="white-space: pre-wrap">#    A          B
0xffffffff 0xffc00c3b  # pioA
0xffffffff 0x7fff3ccf  # pioB
0xffffffff 0x007fffff  # pioC</p>
<p style="white-space: pre-wrap">For each peripheral/bank we will describe in a u32 if a pin can be
configured in it by putting 1 to the pin bit (1 &lt;&lt; pin)</p>
<p style="white-space: pre-wrap">Let's take the pioA on peripheral B whose value is 0xffc00c3b
From the datasheet Table 10-2.
Peripheral B
PA0     MCDB0
PA1     MCCDB
PA2
PA3     MCDB3
PA4     MCDB2
PA5     MCDB1
PA6
PA7
PA8
PA9
PA10    ETX2
PA11    ETX3
PA12
PA13
PA14
PA15
PA16
PA17
PA18
PA19
PA20
PA21
PA22    ETXER
PA23    ETX2
PA24    ETX3
PA25    ERX2
PA26    ERX3
PA27    ERXCK
PA28    ECRS
PA29    ECOL
PA30    RXD4
PA31    TXD4</p>
</div>

<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;ranges&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;size&#45;cells&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;atmel&#44;mux&#45;mask&#34;</code></span>

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

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

<a id="dt-546ec54c954516762458"></a>

### <code>gpio&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4852901c1e5d507ef85c">[<code>&#47;schemas&#47;gpio&#47;atmel&#44;at91rm9200&#45;gpio&#46;yaml</code>](</kernel/hardware/devicetree-bindings/dt-gpio/atmel-at91rm9200-gpio.md#dt-root>)</span>

<a id="dt-87d77d469c724739be85"></a>

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<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-08c3741aee8aef47098b"></a>
>
> ### Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)
>
> > **Value type (<code>type</code>):** <span id="dt-4ef52cd01f2da705470a"><code>&#34;object&#34;</code></span>
> >
> > <a id="dt-bc09004875e71c2185fa"></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-1110e86fb3a57f5926d7"></a>
> >
> > #### Properties and child nodes (<code>properties</code>)
> >
> > <a id="dt-e0c1f546a46cd2f42419"></a>
> >
> > **<code>atmel&#44;pins</code> — not listed as required here**
> >
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-efbb4e25e27db0b06055">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>
> >
> > <div id="dt-594a18710ee357a41256">
> > <pre><code>Each entry consists of 4 integers and represents the pins
> > mux and config setting.The format is
> > atmel,pins = &lt;PIN_BANK PIN_BANK_NUM PERIPH CONFIG&gt;.
> > Supported pin number and mux varies for different SoCs, and
> > are defined in &lt;include/dt-bindings/pinctrl/at91.h&gt;.
> > items:
> >   items:
> >     - description:
> >         Pin bank
> >     - description:
> >         Pin bank index
> >     - description:
> >         Peripheral function
> >     - description:
> >         Pad configuration</code></pre>
> > </div>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/clock/at91.h&gt;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/pinctrl/at91.h&gt;

pinctrl@fffff400 {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;
    compatible = "atmel,at91rm9200-pinctrl", "simple-mfd";
    ranges = &lt;0xfffff400 0xfffff400 0x600&gt;;

    atmel,mux-mask = &lt;
      /*    A         B     */
      0xffffffff 0xffc00c3b  /* pioA */
      0xffffffff 0x7fff3ccf  /* pioB */
      0xffffffff 0x007fffff  /* pioC */
      &gt;;

    dbgu {
        dbgu-0 {
            atmel,pins =
              &lt;AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
               AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE&gt;;
        };
    };

    gpio@fffff400 {
        compatible = "atmel,at91rm9200-gpio";
        reg = &lt;0xfffff400 0x200&gt;;
        interrupts = &lt;2 IRQ_TYPE_LEVEL_HIGH 1&gt;;
        #gpio-cells = &lt;2&gt;;
        gpio-controller;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
        clocks = &lt;&amp;pmc PMC_TYPE_PERIPHERAL 2&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-only OR BSD-2-Clause)</span></p>

</details>
