# MediaTek MT8183 Pin Controller

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

> Device-tree binding reference for MediaTek MT8183 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;mt8183&#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;Sean Wang &#60;sean&#46;wang&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The MediaTek's MT8183 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;mt8183&#45;pinctrl&#34;</code></span>

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

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-4b3e7791b11b96c3db87"><code>10</code></span>

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

<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;iocfg1&#34;</code></span>

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

**Item 3**

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

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

**Item 4**

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

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

**Item 5**

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

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

**Item 6**

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

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

**Item 7**

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

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

**Item 8**

> **Exact value (<code>const</code>):** <span id="dt-6943b253f0cd5394e04f"><code>&#34;iocfg7&#34;</code></span>

<a id="dt-68019cac97b0d6193e16"></a>

**Item 9**

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

<a id="dt-0433484a91a529061b59"></a>

**Item 10**

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

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

<div id="dt-70b20397c3c73794f833">
<p style="white-space: pre-wrap">Number of cells in GPIO specifier. Since the generic GPIO binding is used, the amount of cells must be specified as 2. See the below mentioned gpio binding representation for description of particular cells.</p>
</div>

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

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-ce5d21371b6c666c1fd2"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-74b20707a956c3d42e77"><code>5</code></span>

<div id="dt-8d59235741ea739a3050">
<p style="white-space: pre-wrap">GPIO valid number range.</p>
</div>

<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-b98252f9c39642b1db8f"></a>

### <code>interrupt&#45;controller</code> — not listed as required here

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

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

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

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

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

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

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

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

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

<a id="dt-56a938def5a32920faef"></a>

### <code>&#45;pins&#40;&#45;&#91;a&#45;z&#93;&#43;&#41;&#63;&#36;</code> — name matches this regular expression

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

<a id="dt-2322b49146c92f74d12f"></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-953033f1b884d765b883"></a>

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

<a id="dt-15688f64d7b02a3a3e5a"></a>

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

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

<a id="dt-059a2b27810a89f892a6"></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-d2b10945293622857afd">
<p style="white-space: pre-wrap">A pinctrl node should contain at least one subnodes 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>

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

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

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

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

<div id="dt-03fa9a1d18757760ce45">
<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 &lt;soc&gt;-pinfunc.h directly.</p>
</div>

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

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

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

<a id="dt-f18167dc1a55700bfe5d"></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-c48751a5e4ad75003f30"></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-19b01933e83939ca73b1"></a>

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

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

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

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

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

<a id="dt-5867b74e953822ae8ca2"></a>

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

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

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

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

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

<a id="dt-2c2b0c97b511f0f432e1"></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-1b145b654809f6058db0"></a>

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

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

<a id="dt-08c19ec172b5d7d58880"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-095a09cea3348adc19b4"></a> <span id="dt-054c3e1efb5bbcc8516e"><code>2</code></span>, <span id="dt-785bbc93bd88fc6fd8d2"><code>4</code></span>, <span id="dt-9307de5b1eba5dfe0749"><code>6</code></span>, <span id="dt-903224def8c1c732ced4"><code>8</code></span>, <span id="dt-8f40538102de6e0d478c"><code>10</code></span>, <span id="dt-7065a552b85b3f3a2cb4"><code>12</code></span>, <span id="dt-1c28735136d07acd8ceb"><code>14</code></span>, <span id="dt-6b27de882af4f4ac3c41"><code>16</code></span>

<a id="dt-581231620ba795ceefbe"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-006c7452f5810b466fb0"></a> <span id="dt-b32ff8e805ea455651d8"><code>125</code></span>, <span id="dt-52ae1d6c1dde1603199e"><code>250</code></span>, <span id="dt-bbe6fd6deebfecb25767"><code>500</code></span>, <span id="dt-9a800cbd0aa9008e70bc"><code>1000</code></span>

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

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

**Deprecated (<code>deprecated</code>):** <span id="dt-9d2e2b4e2bba78bc25ec"><code>true</code></span>

<div id="dt-ef1ff75a01194312f130">
<p style="white-space: pre-wrap">DEPRECATED: Please use drive-strength-microamp instead.
Describe the specific driving setup property.
For I2C pins, the existing generic driving setup can only support
2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
driving setup, the existing generic setup will be disabled.
The specific driving setup is controlled by E1E0EN.
When E1=0/E0=0, the strength is 0.125mA.
When E1=0/E0=1, the strength is 0.25mA.
When E1=1/E0=0, the strength is 0.5mA.
When E1=1/E0=1, the strength is 1mA.
EN is used to enable or disable the specific driving setup.
Valid arguments are described as below:
0: (E1, E0, EN) = (0, 0, 0)
1: (E1, E0, EN) = (0, 0, 1)
2: (E1, E0, EN) = (0, 1, 0)
3: (E1, E0, EN) = (0, 1, 1)
4: (E1, E0, EN) = (1, 0, 0)
5: (E1, E0, EN) = (1, 0, 1)
6: (E1, E0, EN) = (1, 1, 0)
7: (E1, E0, EN) = (1, 1, 1)
So the valid arguments are from 0 to 7.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-27c7da4126d0dc47ed09">[<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-4ce81209e1e9e792f335"></a> <span id="dt-c8ca6a8591c4fe7f5039"><code>0</code></span>, <span id="dt-548aef6b7c18c60718a8"><code>1</code></span>, <span id="dt-04530833e423b2fe73b7"><code>2</code></span>, <span id="dt-5eeac162ddb87fb800c6"><code>3</code></span>, <span id="dt-602ffee1d1922b9f2bec"><code>4</code></span>, <span id="dt-00be667b202aacc8717b"><code>5</code></span>, <span id="dt-69564f442c499a68ef61"><code>6</code></span>, <span id="dt-18b09157bbf3ff85d7bc"><code>7</code></span>

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

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

<div id="dt-0e13342de16e8da5416f">
<p style="white-space: pre-wrap">Pull up settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0962ebef0043c5937985">[<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-056acba42c66154b4da8"></a> <span id="dt-cc974291e13d3ac5c546"><code>0</code></span>, <span id="dt-b22825e33e508a60cb60"><code>1</code></span>, <span id="dt-f99fe6c77001b4f4ae98"><code>2</code></span>, <span id="dt-758051765bd4f1747e89"><code>3</code></span>

<a id="dt-24d217ed54f019dbfec6"></a>

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

<div id="dt-1c936d481b175a80027f">
<p style="white-space: pre-wrap">Pull down settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-029aaeb1241b2aec6493">[<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-b8da07db0e86c2c6d45d"></a> <span id="dt-8459e27f21382cc08faa"><code>0</code></span>, <span id="dt-e50cef4b35a838997f7f"><code>1</code></span>, <span id="dt-fa327c2303b2dc78fa52"><code>2</code></span>, <span id="dt-fa3ae2ccb74cfc1e1d5d"><code>3</code></span>

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

**<code>mediatek&#44;tdsel</code> — not listed as required here**

<div id="dt-458fad43f2b260012b49">
<p style="white-space: pre-wrap">An integer describing the steps for output level shifter duty cycle when asserted (high pulse width adjustment). Valid arguments are from 0 to 15.</p>
</div>

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

<a id="dt-8969b8c18d118519f7f4"></a>

**<code>mediatek&#44;rdsel</code> — not listed as required here**

<div id="dt-61b39bb5ceb73e550aad">
<p style="white-space: pre-wrap">An integer describing the steps for input level shifter duty cycle when asserted (high pulse width adjustment). Valid arguments are from 0 to 63.</p>
</div>

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

**Required in this object (<code>required</code>):** <a id="dt-d2d5021451f91e316310"></a> <span id="dt-62da97dc240ad33a581f"><code>&#34;pinmux&#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/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/pinctrl/mt8183-pinfunc.h&gt;

soc {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    pio: pinctrl@10005000 {
        compatible = "mediatek,mt8183-pinctrl";
        reg = &lt;0 0x10005000 0 0x1000&gt;,
              &lt;0 0x11f20000 0 0x1000&gt;,
              &lt;0 0x11e80000 0 0x1000&gt;,
              &lt;0 0x11e70000 0 0x1000&gt;,
              &lt;0 0x11e90000 0 0x1000&gt;,
              &lt;0 0x11d30000 0 0x1000&gt;,
              &lt;0 0x11d20000 0 0x1000&gt;,
              &lt;0 0x11c50000 0 0x1000&gt;,
              &lt;0 0x11f30000 0 0x1000&gt;,
              &lt;0 0x1000b000 0 0x1000&gt;;
        reg-names = "iocfg0", "iocfg1", "iocfg2",
              "iocfg3", "iocfg4", "iocfg5",
              "iocfg6", "iocfg7", "iocfg8",
              "eint";
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        gpio-ranges = &lt;&amp;pio 0 0 192&gt;;
        interrupt-controller;
        interrupts = &lt;GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH&gt;;
        #interrupt-cells = &lt;2&gt;;

        i2c0_pins_a: i2c0-pins {
            pins1 {
              pinmux = &lt;PINMUX_GPIO48__FUNC_SCL5&gt;,
                       &lt;PINMUX_GPIO49__FUNC_SDA5&gt;;
                mediatek,pull-up-adv = &lt;3&gt;;
                drive-strength-microamp = &lt;1000&gt;;
            };
        };

        i2c1_pins_a: i2c1-pins {
            pins {
                pinmux = &lt;PINMUX_GPIO50__FUNC_SCL3&gt;,
                         &lt;PINMUX_GPIO51__FUNC_SDA3&gt;;
                mediatek,pull-down-adv = &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-only OR BSD-2-Clause)</span></p>

</details>
