# MediaTek MT8188 Pin Controller

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

> Device-tree binding reference for MediaTek MT8188 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;mediatek&#44;mt8188&#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;Hui Liu &#60;hui&#46;liu&#64;mediatek&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The MediaTek's MT8188 Pin controller is used to control SoC pins.</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;mediatek&#44;mt8188&#45;pinctrl&#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-cfb238e0b7cdb276d83f"></a>

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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">Number of cells in GPIO specifier, should be two. The first cell is the pin number, the second cell is used to specify optional parameters which are defined in &lt;dt-bindings/gpio/gpio.h&gt;.</p>
</div>

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

<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-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-9c1635fdb65d87e33d77"></a>

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">gpio registers base address</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">rm group io configuration registers base address</p>
> </div>

<a id="dt-80d36cb915ffeff5364a"></a>

**Item 3**

> <div id="dt-5151e97c331b693ee0dd">
> <p style="white-space: pre-wrap">lt group io configuration registers base address</p>
> </div>

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

**Item 4**

> <div id="dt-e7b71b4619e949c538b1">
> <p style="white-space: pre-wrap">lm group io configuration registers base address</p>
> </div>

<a id="dt-55b482bd3ef74ad8e49c"></a>

**Item 5**

> <div id="dt-9034b08616e8a84a1200">
> <p style="white-space: pre-wrap">rt group io configuration registers base address</p>
> </div>

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

**Item 6**

> <div id="dt-3ae17db5a7c599245517">
> <p style="white-space: pre-wrap">eint registers base address</p>
> </div>

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

### <code>reg&#45;names</code> — not listed as required here

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;iocfg0&#34;</code></span>

<a id="dt-12013039402717d72b48"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-8472c6e17fb2491b6ba3"><code>&#34;iocfg&#95;rm&#34;</code></span>

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

**Item 3**

> **Exact value (<code>const</code>):** <span id="dt-bd78c6ffbdc5ce20feb0"><code>&#34;iocfg&#95;lt&#34;</code></span>

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

**Item 4**

> **Exact value (<code>const</code>):** <span id="dt-98e4b3caabf49b98c17d"><code>&#34;iocfg&#95;lm&#34;</code></span>

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

**Item 5**

> **Exact value (<code>const</code>):** <span id="dt-f5b0caab3d0e3bc730aa"><code>&#34;iocfg&#95;rt&#34;</code></span>

<a id="dt-6163748256066003777f"></a>

**Item 6**

> **Exact value (<code>const</code>):** <span id="dt-81567d5e5cafc8c025ce"><code>&#34;eint&#34;</code></span>

<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-8586fac2d9a71adf4795"></a>

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

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

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

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">The interrupt outputs to sysirq.</p>
</div>

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

<a id="dt-3274f0be1360b2e9b216"></a>

### <code>mediatek&#44;rsel&#45;resistance&#45;in&#45;si&#45;unit</code> — not listed as required here

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

<div id="dt-db85de3391ad8b3e35f3">
<p style="white-space: pre-wrap">We provide two methods to select the resistance for I2C when pull up or pull down. The first is by RSEL definition value, another one is by resistance value(ohm). This flag is used to identify if the method is resistance(si unit) value.</p>
</div>

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

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

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

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

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

**<code>&#94;pins</code> — name matches this regular expression**

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

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-ed3b8ae15f582c16bade">
<p style="white-space: pre-wrap">A pinctrl node should contain at least one subnode representing the pinctrl groups available on the machine. Each subnode will list the pins it needs, and how they should be configured, with regard to muxer configuration, pullups, drive strength, input enable/disable and input schmitt.</p>
</div>

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

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

<a id="dt-67073f53bed0d8e82647"></a>

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

<div id="dt-ff4e168d8f88a63bcc08">
<p style="white-space: pre-wrap">Integer array, represents gpio pin number and mux setting. Supported pin number and mux varies for different SoCs, and are defined as macros in dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h directly, for this SoC.</p>
</div>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-483ab98af90ba706007d"></a> <span id="dt-2232e1cc9a0d96214a71"><code>2</code></span>, <span id="dt-dd59dd32373cbb7b47c7"><code>4</code></span>, <span id="dt-787239bc2b16ca601a1f"><code>6</code></span>, <span id="dt-52229c7db110d017df08"><code>8</code></span>, <span id="dt-e6f9a66198df66b3210f"><code>10</code></span>, <span id="dt-0f82df2b1d4017d166bf"><code>12</code></span>, <span id="dt-0b846ac4fb96cc242ba4"><code>14</code></span>, <span id="dt-6395557d6fb867086654"><code>16</code></span>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-9cd030e58c273dbab486"></a> <span id="dt-6774b545fdb2bf02c728"><code>125</code></span>, <span id="dt-1d461efd9baa2f556fef"><code>250</code></span>, <span id="dt-e8b080bad44efdeb026c"><code>500</code></span>, <span id="dt-711917aef6a9d03c1479"><code>1000</code></span>

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

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

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

**Exactly one of these rules must match (<code>oneOf</code>)**

<a id="dt-33c53d2a28696557af5a"></a>

**Rule 1**

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

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

**Rule 2**

> **Allowed values (<code>enum</code>):** <a id="dt-388f5b944c5ba4ea9511"></a> <span id="dt-756d600acb4e712f2f92"><code>100</code></span>, <span id="dt-28535ad063d1cffddac8"><code>101</code></span>, <span id="dt-a427283a13cab704fa4d"><code>102</code></span>, <span id="dt-18722818513f1e8200b0"><code>103</code></span>
>
> <div id="dt-0774e505979afcea726e">
> <p style="white-space: pre-wrap">mt8188 pull down PUPD/R0/R1 type define value.</p>
> </div>

<a id="dt-54fe5560c71a0f42e17c"></a>

**Rule 3**

> **Allowed values (<code>enum</code>):** <a id="dt-33b11c9369b789e8a7fa"></a> <span id="dt-89932de86aea8ccf9bfc"><code>200</code></span>, <span id="dt-2e554f6296b1f2d4830e"><code>201</code></span>, <span id="dt-fc74789ee652aef0ef9d"><code>202</code></span>, <span id="dt-f56383148cd8451740ca"><code>203</code></span>, <span id="dt-ed46eb86825ea0abbf28"><code>204</code></span>, <span id="dt-2648159b9dfcf6c61696"><code>205</code></span>, <span id="dt-d1a4ca50f803eccdbfc5"><code>206</code></span>, <span id="dt-696f7263b42ce7da3c67"><code>207</code></span>
>
> <div id="dt-62652fd9f0ac0533ef45">
> <p style="white-space: pre-wrap">mt8188 pull down RSEL type define value.</p>
> </div>

<a id="dt-9d67fc8e8af3db241dd8"></a>

**Rule 4**

> **Allowed values (<code>enum</code>):** <a id="dt-7f1f116200b78af39f0b"></a> <span id="dt-3a593e115e3dc01132fe"><code>75000</code></span>, <span id="dt-244d536db4a7b8cc0906"><code>5000</code></span>
>
> <div id="dt-3e52ff6c16b5a32237eb">
> <p style="white-space: pre-wrap">mt8188 pull down RSEL type si unit value(ohm).</p>
> </div>

<div id="dt-1e06c4254c5ea733eaf5">
<p style="white-space: pre-wrap">For pull down type is normal, it doesn't need add RSEL &amp; R1R0
define and resistance value.
For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &amp;
"MTK_PUPD_SET_R1R0_01" &amp; "MTK_PUPD_SET_R1R0_10" &amp;
"MTK_PUPD_SET_R1R0_11" define in mt8188.
For pull down type is RSEL, it can add RSEL define &amp; resistance
value(ohm) to set different resistance by identifying property
"mediatek,rsel-resistance-in-si-unit". It can support
"MTK_PULL_SET_RSEL_000" &amp; "MTK_PULL_SET_RSEL_001" &amp;
"MTK_PULL_SET_RSEL_010" &amp; "MTK_PULL_SET_RSEL_011" &amp;
"MTK_PULL_SET_RSEL_100" &amp; "MTK_PULL_SET_RSEL_101" &amp;
"MTK_PULL_SET_RSEL_110" &amp; "MTK_PULL_SET_RSEL_111" define in
mt8188. It can also support resistance value(ohm) "75000" &amp; "5000"
in mt8188.</p>
</div>

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

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

<a id="dt-9bcfe57a34c2e459462a"></a>

**Exactly one of these rules must match (<code>oneOf</code>)**

<a id="dt-587ba6f7eec4b7782767"></a>

**Rule 1**

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

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

**Rule 2**

> **Allowed values (<code>enum</code>):** <a id="dt-d7fba414703e7043eda2"></a> <span id="dt-7741ee9721efdabe216c"><code>100</code></span>, <span id="dt-cebada6df6386290590f"><code>101</code></span>, <span id="dt-ae5788e44984ea1ae538"><code>102</code></span>, <span id="dt-bf6bff9270a2aa895097"><code>103</code></span>
>
> <div id="dt-9a575d8ee317d4469edd">
> <p style="white-space: pre-wrap">mt8188 pull up PUPD/R0/R1 type define value.</p>
> </div>

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

**Rule 3**

> **Allowed values (<code>enum</code>):** <a id="dt-c3817a46740448dd0aad"></a> <span id="dt-7016a236c2ad4e7dc3b4"><code>200</code></span>, <span id="dt-00f157dbfcd869c25d25"><code>201</code></span>, <span id="dt-d0b9989ad5547d525875"><code>202</code></span>, <span id="dt-db450215503376ef38c8"><code>203</code></span>, <span id="dt-8ad0812d45dd2f17ba70"><code>204</code></span>, <span id="dt-8136c7bf54e14cb1c2f0"><code>205</code></span>, <span id="dt-74ddf1feacad4cfeb5ea"><code>206</code></span>, <span id="dt-2f53d25c74b2f8ee5c45"><code>207</code></span>
>
> <div id="dt-360081c36630376e5484">
> <p style="white-space: pre-wrap">mt8188 pull up RSEL type define value.</p>
> </div>

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

**Rule 4**

> **Allowed values (<code>enum</code>):** <a id="dt-a506b3864fdfd76bec0d"></a> <span id="dt-1929de056097d9c76f95"><code>1000</code></span>, <span id="dt-d6a4e23849ad60257735"><code>1500</code></span>, <span id="dt-581acf6b2739740757ba"><code>2000</code></span>, <span id="dt-84971f8c265e1697f37f"><code>3000</code></span>, <span id="dt-365cfbbcca779136fc3e"><code>4000</code></span>, <span id="dt-54d9452241067eebc5ea"><code>5000</code></span>, <span id="dt-6717d2abf10d5ba9b2cb"><code>10000</code></span>, <span id="dt-21ab85558d5330df464e"><code>75000</code></span>
>
> <div id="dt-bed872e517bf74b506a7">
> <p style="white-space: pre-wrap">mt8188 pull up RSEL type si unit value(ohm).</p>
> </div>

<div id="dt-c8b432187c40e8e3acc3">
<p style="white-space: pre-wrap">For pull up type is normal, it don't need add RSEL &amp; R1R0 define
and resistance value.
For pull up type is PUPD/R0/R1 type, it can add R1R0 define to set
different resistance. It can support "MTK_PUPD_SET_R1R0_00" &amp;
"MTK_PUPD_SET_R1R0_01" &amp; "MTK_PUPD_SET_R1R0_10" &amp;
"MTK_PUPD_SET_R1R0_11" define in mt8188.
For pull up type is RSEL, it can add RSEL define &amp; resistance
value(ohm) to set different resistance by identifying property
"mediatek,rsel-resistance-in-si-unit". It can support
"MTK_PULL_SET_RSEL_000" &amp; "MTK_PULL_SET_RSEL_001" &amp;
"MTK_PULL_SET_RSEL_010" &amp; "MTK_PULL_SET_RSEL_011" &amp;
"MTK_PULL_SET_RSEL_100" &amp; "MTK_PULL_SET_RSEL_101" &amp;
"MTK_PULL_SET_RSEL_110" &amp; "MTK_PULL_SET_RSEL_111" define in
mt8188. It can also support resistance value(ohm) "1000" &amp; "1500"
&amp; "2000" &amp; "3000" &amp; "4000" &amp; "5000" &amp; "10000" &amp; "75000" in mt8188.</p>
</div>

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

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

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

<a id="dt-5795df2710e9492035b2"></a>

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

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

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

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

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

<a id="dt-6522d11a5264106641d3"></a>

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

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

<a id="dt-6bea3bf9809fa4565602"></a>

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

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

<a id="dt-3d197f683c9714f434eb"></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-46253972727736741aeb"></a>

**<code>input&#45;schmitt&#45;disable</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-d1256680c84a4ecaf8e2"></a> <span id="dt-82187ea027649736d273"><code>&#34;pinmux&#34;</code></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;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;interrupt&#45;controller&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;gpio&#45;controller&#34;</code></span>, <span id="dt-a5d07fc4223c155670a0"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-4503833a9b225761c43a"><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/pinctrl/mediatek,mt8188-pinfunc.h&gt;
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

pio: pinctrl@10005000 {
    compatible = "mediatek,mt8188-pinctrl";
    reg = &lt;0x10005000 0x1000&gt;,
          &lt;0x11c00000 0x1000&gt;,
          &lt;0x11e10000 0x1000&gt;,
          &lt;0x11e20000 0x1000&gt;,
          &lt;0x11ea0000 0x1000&gt;,
          &lt;0x1000b000 0x1000&gt;;
    reg-names = "iocfg0", "iocfg_rm",
                "iocfg_lt", "iocfg_lm", "iocfg_rt",
                "eint";
    gpio-controller;
    #gpio-cells = &lt;2&gt;;
    gpio-ranges = &lt;&amp;pio 0 0 176&gt;;
    interrupt-controller;
    interrupts = &lt;GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0&gt;;
    #interrupt-cells = &lt;2&gt;;

    pio-pins {
        pins {
            pinmux = &lt;PINMUX_GPIO0__FUNC_B_GPIO0&gt;;
            output-low;
        };
    };

    spi0-pins {
        pins-spi {
            pinmux = &lt;PINMUX_GPIO75__FUNC_O_SPIM1_CSB&gt;,
                     &lt;PINMUX_GPIO76__FUNC_O_SPIM1_CLK&gt;,
                     &lt;PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI&gt;;
            drive-strength = &lt;6&gt;;
        };
        pins-spi-mi {
            pinmux = &lt;PINMUX_GPIO78__FUNC_B0_SPIM1_MISO&gt;;
            bias-pull-down = &lt;MTK_PUPD_SET_R1R0_10&gt;;
        };
    };

    i2c0-pins {
        pins {
            pinmux = &lt;PINMUX_GPIO55__FUNC_B1_SCL0&gt;,
                     &lt;PINMUX_GPIO56__FUNC_B1_SDA0&gt;;
            bias-disable;
            drive-strength-microamp = &lt;1000&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>

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

</details>
