# Freescale MXS GPIO controller

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

> Device-tree binding reference for Freescale MXS 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;gpio&#47;gpio&#45;mxs&#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;Shawn Guo &#60;shawnguo&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Freescale MXS GPIO controller is part of MXS PIN controller.
The GPIOs are organized in port/bank, each port consists of 32 GPIOs.
As the GPIO controller is embedded in the PIN controller and all the
GPIO ports share the same IO space with PIN controller, the GPIO node
will be represented as sub-nodes of MXS pinctrl node.</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-cc3709943397035582d2"></a>

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

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

**Item 1**

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;fsl&#44;imx23&#45;pinctrl&#34;</code></span>, <span id="dt-2d97ae0f34d14dd8e72b"><code>&#34;fsl&#44;imx28&#45;pinctrl&#34;</code></span>

<a id="dt-0891c69625632ea817fd"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-f1f862a3cfab3ac620c8"><code>&#34;simple&#45;bus&#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>0</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-e92215bd3c2f5373b164"></a>

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

<a id="dt-83994a925ba8ba64fb7e"></a>

### <code>&#94;&#40;&#63;&#33;gpio&#64;&#41;&#91;&#94;&#64;&#93;&#43;&#64;&#91;0&#45;9&#93;&#43;&#36;</code> — name matches this regular expression

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

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

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

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

**<code>fsl&#44;pinmux&#45;ids</code> — required here**

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

<div id="dt-7f429313809492904696">
<p style="white-space: pre-wrap">An integer array.  Each integer in the array specify a pin
with given mux function, with bank, pin and mux packed as below.</p>
<p style="white-space: pre-wrap">[15..12] : bank number
[11..4]  : pin number
[3..0]   : mux selection</p>
<p style="white-space: pre-wrap">This integer with mux selection packed is used as an entity by both group
and config nodes to identify a pin.  The mux selection in the integer takes
effects only on group node, and will get ignored by driver with config node,
since config node is only meant to set up pin configurations.</p>
<p style="white-space: pre-wrap">Valid values for these integers are listed below.</p>
</div>

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

**<code>reg</code> — not listed as required here**

<a id="dt-006057d0e56a420cdbf8"></a>

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

<a id="dt-183b5b31c06311e0cb18"></a>

**Item 1**

> <div id="dt-06240ab61a91951f262a">
> <p style="white-space: pre-wrap">pin group index. NOTE: it is supposed wrong use reg property
> here. But it is over 10 years devices. Just keep it as it.</p>
> </div>

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-1251019e8e77d6174a69">[<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-a44220edda986cd5d932"></a> <span id="dt-bab574d1f4f162c8b1dc"><code>0</code></span>, <span id="dt-640ff7b0ed92928a981b"><code>1</code></span>, <span id="dt-db62f57504e5ffa5d666"><code>2</code></span>, <span id="dt-e82731bf8ad5215d228e"><code>3</code></span>

<div id="dt-182adcffd098e4667240">
<p style="white-space: pre-wrap">0: MXS_DRIVE_4mA
1: MXS_DRIVE_8mA
2: MXS_DRIVE_12mA
3: MXS_DRIVE_16mA</p>
</div>

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

**<code>fsl&#44;voltage</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-159806558bb053a44c75">[<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-9360778947aae3c4a699"></a> <span id="dt-0febd5f841341cbb943f"><code>0</code></span>, <span id="dt-e911f5de6f289aedab62"><code>1</code></span>

<div id="dt-28655974ac458d4cb702">
<p style="white-space: pre-wrap">0: MXS_VOLTAGE_LOW  - 1.8 V
1: MXS_VOLTAGE_HIGH - 3.3 V</p>
</div>

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b4553086f7ed71940907">[<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-1e05d9622e77c82e3aac"></a> <span id="dt-7af4d69169bd78043c4f"><code>0</code></span>, <span id="dt-86c10d9ce3f5c268eb8d"><code>1</code></span>

<div id="dt-397f03f26bd622eda926">
<p style="white-space: pre-wrap">0: MXS_PULL_DISABLE - Disable the internal pull-up
1: MXS_PULL_ENABLE  - Enable the internal pull-up</p>
<p style="white-space: pre-wrap">Note that when enabling the pull-up, the internal pad keeper gets disabled.
Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up
will only disable the internal pad keeper.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-6af34c4296af9eb92f45"></a> <span id="dt-95d5dd9a521dc93bcb1a"><code>&#34;fsl&#44;pinmux&#45;ids&#34;</code></span>

<a id="dt-ce6329142ed3f23d19fb"></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-29d1f8ae118096eae5ea"></a>

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

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

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

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-9ce46df67525e7176643"></a> <span id="dt-702da81e3848565a211b"><code>&#34;fsl&#44;imx23&#45;gpio&#34;</code></span>, <span id="dt-622882f058f223aaade6"><code>&#34;fsl&#44;imx28&#45;gpio&#34;</code></span>

<a id="dt-010f86129f0042e38ee5"></a>

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

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

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

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

<div id="dt-3b038ac5f999b407e7f9">
<p style="white-space: pre-wrap">Should be the port interrupt shared by all 32 pins.</p>
</div>

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

<a id="dt-279c4b358b9b0571c68c"></a>

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

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

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

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

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

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

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

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

<a id="dt-015e4aaebc38a79db9d4"></a>

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

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

**Required in this object (<code>required</code>):** <a id="dt-4ee57f353965d8ac2f20"></a> <span id="dt-ef5448b8ef54313792eb"><code>&#34;compatible&#34;</code></span>, <span id="dt-5c7f8098e98bdf9c4c76"><code>&#34;reg&#34;</code></span>, <span id="dt-397a3aa6d6367bbbcd49"><code>&#34;interrupts&#34;</code></span>, <span id="dt-bb73d43d92203e1aa951"><code>&#34;interrupt&#45;controller&#34;</code></span>, <span id="dt-722645ee4bc94cb96cca"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-7c24bd9e658a1b5fa94b"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-08e7cb72eaadc9c24f86"><code>&#34;gpio&#45;controller&#34;</code></span>

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

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

<code>false</code>

Not allowed by this rule.

**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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;size&#45;cells&#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">pinctrl@80018000 {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    compatible = "fsl,imx28-pinctrl", "simple-bus";
    reg = &lt;0x80018000 0x2000&gt;;

    gpio@0 {
        compatible = "fsl,imx28-gpio";
        reg = &lt;0&gt;;
        interrupts = &lt;127&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
    };

    gpio@1 {
        compatible = "fsl,imx28-gpio";
        reg = &lt;1&gt;;
        interrupts = &lt;126&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
    };

    gpio@2 {
        compatible = "fsl,imx28-gpio";
        reg = &lt;2&gt;;
        interrupts = &lt;125&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
    };

    gpio@3 {
        compatible = "fsl,imx28-gpio";
        reg = &lt;3&gt;;
        interrupts = &lt;124&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
    };

    gpio@4 {
        compatible = "fsl,imx28-gpio";
        reg = &lt;4&gt;;
        interrupts = &lt;123&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
    };

    lcdif-apx4@5 {
        reg = &lt;5&gt;;
        fsl,pinmux-ids = &lt;0x1181 0x1191&gt;;
        fsl,drive-strength = &lt;0&gt;;
        fsl,voltage = &lt;0&gt;;
        fsl,pull-up = &lt;0&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 25:</strong> <span> Over 10 years old devices, driver use simple-bus to probe child gpio</span></p>

<p id="dt-comment-2"><strong>Line 26:</strong> <span> Devices. Keep it as it to be compatible existed dts files.</span></p>

</details>
