# Rockchip Pinmux Controller

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

> Device-tree binding reference for Rockchip Pinmux Controller.

<!-- SPDX-License-Identifier: GPL-2.0 -->


<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;rockchip&#44;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;Heiko Stuebner &#60;heiko&#64;sntech&#46;de&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Rockchip 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 several muxing
options with option 0 being used as a GPIO.</p>
<p style="white-space: pre-wrap">Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".</p>
<p style="white-space: pre-wrap">The Rockchip pin configuration node is a node of a group of pins which can be
used for a specific device or function. This node represents both mux and
config of the pins in that group. The 'pins' selects the function mode
(also named pin mode) this pin can work on and the 'config' configures
various pad settings such as pull-up, etc.</p>
<p style="white-space: pre-wrap">The pins are grouped into up to 9 individual pin banks which need to be
defined as gpio sub-nodes of the pinmux controller.</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;rockchip&#44;px30&#45;pinctrl&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;rockchip&#44;rk2928&#45;pinctrl&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;rockchip&#44;rk3036&#45;pinctrl&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;rockchip&#44;rk3066a&#45;pinctrl&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;rockchip&#44;rk3066b&#45;pinctrl&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;rockchip&#44;rk3128&#45;pinctrl&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;rockchip&#44;rk3188&#45;pinctrl&#34;</code></span>, <span id="dt-3edbd20dc5b59e47edf5"><code>&#34;rockchip&#44;rk3228&#45;pinctrl&#34;</code></span>, <span id="dt-07feb33463d5c114ab05"><code>&#34;rockchip&#44;rk3288&#45;pinctrl&#34;</code></span>, <span id="dt-1e634b71c3167df349bb"><code>&#34;rockchip&#44;rk3308&#45;pinctrl&#34;</code></span>, <span id="dt-70e866729f00cfce3510"><code>&#34;rockchip&#44;rk3328&#45;pinctrl&#34;</code></span>, <span id="dt-81f973819a6dd2302321"><code>&#34;rockchip&#44;rk3368&#45;pinctrl&#34;</code></span>, <span id="dt-e5cbf931a6c5d40231a9"><code>&#34;rockchip&#44;rk3399&#45;pinctrl&#34;</code></span>, <span id="dt-5235cdfd9421f63db578"><code>&#34;rockchip&#44;rk3506&#45;pinctrl&#34;</code></span>, <span id="dt-d43d2d7f137c2a014614"><code>&#34;rockchip&#44;rk3528&#45;pinctrl&#34;</code></span>, <span id="dt-550b25c2a121e87d781f"><code>&#34;rockchip&#44;rk3562&#45;pinctrl&#34;</code></span>, <span id="dt-da56dd3331033aff7561"><code>&#34;rockchip&#44;rk3568&#45;pinctrl&#34;</code></span>, <span id="dt-d9315c8e8ee3234b7e87"><code>&#34;rockchip&#44;rk3576&#45;pinctrl&#34;</code></span>, <span id="dt-e73fb8e64585dbf152bb"><code>&#34;rockchip&#44;rk3588&#45;pinctrl&#34;</code></span>, <span id="dt-c04eda18e53cea683785"><code>&#34;rockchip&#44;rv1108&#45;pinctrl&#34;</code></span>, <span id="dt-3ffabe0580c6de50e5cc"><code>&#34;rockchip&#44;rv1126&#45;pinctrl&#34;</code></span>

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

### <code>rockchip&#44;grf</code> — required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-27c3eab1df2a1e51a08e">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-2533fa46618221e83225>)</span>

<div id="dt-85bb741738dc0c8676e5">
<p style="white-space: pre-wrap">The phandle of the syscon node for the GRF registers.</p>
</div>

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

### <code>rockchip&#44;pmu</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-5edc36ffb51b346e4288">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-2533fa46618221e83225>)</span>

<div id="dt-31c73135215fb3c42bcc">
<p style="white-space: pre-wrap">The phandle of the syscon node for the PMU registers, as some SoCs carry parts of the iomux controller registers there. Required for at least rk3188 and rk3288. On the rk3368 this should point to the PMUGRF syscon.</p>
</div>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-01d9ce7fc56f712455be"></a> <span id="dt-94d3735d14e27e2d7df1"><code>1</code></span>, <span id="dt-0dda607ef98de398e3f7"><code>2</code></span>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-11f8fcdf7ed0ce5274ad"></a> <span id="dt-1df5884131042d9f2b35"><code>1</code></span>, <span id="dt-0d778c9f0ef0966b501c"><code>2</code></span>

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

### <code>ranges</code> — not listed as required here

<code>true</code> — No constraints added by this property 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;rockchip&#44;grf&#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

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

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

**Deprecated (<code>deprecated</code>):** <span id="dt-407f62e603608fa57457"><code>true</code></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-d35a5903e8cca8e0e9c4"></a>

### <code>pcfg&#45;&#91;a&#45;z0&#45;9&#45;&#93;&#43;&#36;</code> — name matches this regular expression

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

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

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

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

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

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

<a id="dt-863df37d45b2d3c9c69a"></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-fc802a6d23505c9f3a7f"></a>

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

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

<a id="dt-a9f19eb7a723d1dac1f7"></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-0ffb4f9de93305bd6c33"></a>

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-13a8d94a22aaea051c81"><code>20</code></span>

<a id="dt-869945976a3369f8f9b5"></a>

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

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

<a id="dt-792defb5f281bc9bff37"></a>

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

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

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

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

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

<a id="dt-54850a851513aca55c02"></a>

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

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

<a id="dt-4fed5f5119ef4fdfd210"></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-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-59cee131e1742d7f5e91"></a>
> >
> > **<code>rockchip&#44;pins</code> — not listed as required here**
> >
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0d8364907ed6549db19a">[<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>
> >
> > **Minimum number of items (<code>minItems</code>):** <span id="dt-ff133f118f234a8e5da8"><code>1</code></span>
> >
> > <a id="dt-e36e446ff95539a8dac4"></a>
> >
> > **Array item rules (<code>items</code>)**
> >
> > > <a id="dt-0ad02b3981ecf799a006"></a>
> > >
> > > **Array item rules (<code>items</code>)**
> > >
> > > <a id="dt-1f6da16557cc6145e8b7"></a>
> > >
> > > **Item 1**
> > >
> > > > **Minimum value (<code>minimum</code>):** <span id="dt-4095b32fb8af39aeb3a3"><code>0</code></span>
> > > >
> > > > **Maximum value (<code>maximum</code>):** <span id="dt-7e46e456b23f9749d330"><code>8</code></span>
> > > >
> > > > <div id="dt-e44d715494e65ed592ff">
> > > > <p style="white-space: pre-wrap">Pin bank.</p>
> > > > </div>
> > >
> > > <a id="dt-cd921a91f2451c84a5e8"></a>
> > >
> > > **Item 2**
> > >
> > > > **Minimum value (<code>minimum</code>):** <span id="dt-5e59e5d161da985f5071"><code>0</code></span>
> > > >
> > > > **Maximum value (<code>maximum</code>):** <span id="dt-81cbc053394250ba02fc"><code>31</code></span>
> > > >
> > > > <div id="dt-d99136dc7b2e59f2bac9">
> > > > <p style="white-space: pre-wrap">Pin bank index.</p>
> > > > </div>
> > >
> > > <a id="dt-e462a74f4b46849a43f5"></a>
> > >
> > > **Item 3**
> > >
> > > > **Minimum value (<code>minimum</code>):** <span id="dt-2911e2417a095ca76e74"><code>0</code></span>
> > > >
> > > > **Maximum value (<code>maximum</code>):** <span id="dt-2118e607e6485eb60c99"><code>14</code></span>
> > > >
> > > > <div id="dt-e255a28bb6acdddfe24a">
> > > > <p style="white-space: pre-wrap">Mux 0 means GPIO and mux 1 to N means the specific device function.</p>
> > > > </div>
> > >
> > > <a id="dt-3d0224d54da2778c2f8d"></a>
> > >
> > > **Item 4**
> > >
> > > > <div id="dt-b53589e71fca5e03ca65">
> > > > <p style="white-space: pre-wrap">The phandle of a node contains the generic pinconfig options to use as described in pinctrl-bindings.txt.</p>
> > > > </div>

<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;
#include &lt;dt-bindings/pinctrl/rockchip.h&gt;

pinctrl: pinctrl {
  compatible = "rockchip,rk3066a-pinctrl";
  rockchip,grf = &lt;&amp;grf&gt;;

  #address-cells = &lt;1&gt;;
  #size-cells = &lt;1&gt;;
  ranges;

  gpio0: gpio@20034000 {
    compatible = "rockchip,gpio-bank";
    reg = &lt;0x20034000 0x100&gt;;
    interrupts = &lt;GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH&gt;;
    clocks = &lt;&amp;clk_gates8 9&gt;;

    gpio-controller;
    #gpio-cells = &lt;2&gt;;

    interrupt-controller;
    #interrupt-cells = &lt;2&gt;;
  };

  pcfg_pull_default: pcfg-pull-default {
    bias-pull-pin-default;
  };

  uart2 {
    uart2_xfer: uart2-xfer {
      rockchip,pins = &lt;1 RK_PB0 1 &amp;pcfg_pull_default&gt;,
                      &lt;1 RK_PB1 1 &amp;pcfg_pull_default&gt;;
    };
  };
};

uart2: serial@20064000 {
  compatible = "snps,dw-apb-uart";
  reg = &lt;0x20064000 0x400&gt;;
  interrupts = &lt;GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH&gt;;
  clocks = &lt;&amp;mux_uart2&gt;;
  pinctrl-0 = &lt;&amp;uart2_xfer&gt;;
  pinctrl-names = "default";
  reg-io-width = &lt;1&gt;;
  reg-shift = &lt;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</span></p>

</details>
