# Broadcom BCM2835 GPIO (and pinmux) controller

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

> Device-tree binding reference for Broadcom BCM2835 GPIO (and 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;brcm&#44;bcm2835&#45;gpio&#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;Florian Fainelli &#60;f&#46;fainelli&#64;gmail&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt controller, and pinmux/control device.</p>
</div>

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

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;brcm&#44;bcm2835&#45;gpio&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;brcm&#44;bcm2711&#45;gpio&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;brcm&#44;bcm7211&#45;gpio&#34;</code></span>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">Interrupt outputs: one per bank, then the combined “all banks” line. BCM7211 may specify up to four per-bank wake-up lines and one combined wake-up interrupt.</p>
</div>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b7823fb65b2f27642d26"><code>10</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-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-738c4b4f9e483441138b"></a>

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

> <a id="dt-6e750d6f504ce484827a"></a>
>
> ### Exactly one of these rules must match (<code>oneOf</code>)
>
> <a id="dt-b46cf24d23f0b989f167"></a>
>
> #### Rule 1
>
> > **Value type (<code>type</code>):** <span id="dt-8106c1e957adc3425fff"><code>&#34;object&#34;</code></span>
> >
> > <a id="dt-cdc220874c62293fbe8f"></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-f1b3e9f5a1a2f6bea5c1"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-f5d48b8f46e4fb163eb8"></a>
> >
> > **<code>&#94;pins&#63;&#45;</code> — name matches this regular expression**
> >
> > **Value type (<code>type</code>):** <span id="dt-54f8a7ae3d68e75ec0e1"><code>&#34;object&#34;</code></span>
> >
> > <a id="dt-abd0f18f1496f2a0f339"></a>
> >
> > **All of these rules must match (<code>allOf</code>)**
> >
> > <a id="dt-c3f66192ab63ba5cbe75"></a>
> >
> > **Rule 1**
> >
> > > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8dbc4d1c452f8787084a">[<code>&#47;schemas&#47;pinctrl&#47;pincfg&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pincfg-node.md#dt-root>)</span>
> >
> > <a id="dt-7235474f7b64ef084118"></a>
> >
> > **Rule 2**
> >
> > > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-70e6cbc452f0012c832b">[<code>&#47;schemas&#47;pinctrl&#47;pinmux&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinmux-node.md#dt-root>)</span>
> >
> > <a id="dt-c53e136d94b1da953245"></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-ee0210c769e48a8913a8"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-c445da1fd79d0fb728b4"></a>
> >
> > **<code>pins</code> — required here**
> >
> > <code>true</code> — No constraints added by this property rule.
> >
> > <a id="dt-60fb1cadce5842fe748c"></a>
> >
> > **<code>function</code> — required here**
> >
> > <code>true</code> — No constraints added by this property rule.
> >
> > <a id="dt-3525cab17e7498fe525f"></a>
> >
> > **<code>bias&#45;disable</code> — not listed as required here**
> >
> > <code>true</code> — No constraints added by this property rule.
> >
> > <a id="dt-7badb8a8ac656cb78212"></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-3593a793bac8132b516b"></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-8c6e380a424d4e949410"></a>
> >
> > **<code>output&#45;high</code> — not listed as required here**
> >
> > <code>true</code> — No constraints added by this property rule.
> >
> > <a id="dt-bef4038d16b83ac572ee"></a>
> >
> > **<code>output&#45;low</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-8c1044ce8b59ee991fbf"></a> <span id="dt-9466c0ab2cd6228e0ba5"><code>&#34;pins&#34;</code></span>, <span id="dt-26e0302e85052a44423f"><code>&#34;function&#34;</code></span>
>
> <a id="dt-57d8d767c08964ac1b2d"></a>
>
> #### Rule 2
>
> > **Value type (<code>type</code>):** <span id="dt-bd07c2730c133f4b5eee"><code>&#34;object&#34;</code></span>
> >
> > <a id="dt-68bcb6c626b4828929c1"></a>
> >
> > **Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)**
> >
> > <code>false</code>
> >
> > Not allowed by this rule.
> >
> > **Deprecated (<code>deprecated</code>):** <span id="dt-66e1be6b8bba19cc7621"><code>true</code></span>
> >
> > <a id="dt-66535fedc1611aa183c9"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-ce499d27fea612be9e45"></a>
> >
> > **<code>brcm&#44;pins</code> — required here**
> >
> > <div id="dt-954fc569061d807afebe">
> > <p style="white-space: pre-wrap">GPIO pin numbers for legacy configuration.</p>
> > </div>
> >
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-60666c7292aecc97ba08">[<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>
> >
> > <a id="dt-156a3b8c6f27748bba47"></a>
> >
> > **<code>brcm&#44;function</code> — not listed as required here**
> >
> > <div id="dt-810be8fa5995dacafd85">
> > <p style="white-space: pre-wrap">Legacy mux function for the pins (0=input, 1=output, 2–7=alt functions).</p>
> > </div>
> >
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-55e00c182ba8d98caf71">[<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>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-459a7f1f30ee38eb459b"><code>7</code></span>
> >
> > <a id="dt-ca5b924e09a722b30544"></a>
> >
> > **<code>brcm&#44;pull</code> — not listed as required here**
> >
> > <div id="dt-dcabdb9bd70a26473141">
> > <p style="white-space: pre-wrap">Legacy pull setting for the pins (0=none, 1=pull-down, 2=pull-up).</p>
> > </div>
> >
> > **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b8aad276d7ea07d25f6c">[<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>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-4bca25b336638425cd37"><code>2</code></span>
> >
> > **Required in this object (<code>required</code>):** <a id="dt-a574094f961c39b33952"></a> <span id="dt-af4d1bb20f0371ee5b31"><code>&#34;brcm&#44;pins&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-b5c9dbe70762f9ad7bb5"></a> <span id="dt-d017b1b1b5a0bb01c549"><code>&#34;brcm&#44;bcm2835&#45;gpio&#34;</code></span>, <span id="dt-b1891799a94ae03bda89"><code>&#34;brcm&#44;bcm2711&#45;gpio&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-7787b28725c144fbfc92"></a>
> >
> > **<code>interrupts</code> — not listed as required here**
> >
> > **Maximum number of items (<code>maxItems</code>):** <span id="dt-f83fd3bbdeba05802410"><code>5</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">gpio@2200000 {
    compatible = "brcm,bcm2835-gpio";
    reg = &lt;0x2200000 0xb4&gt;;
    interrupts = &lt;2 17&gt;, &lt;2 19&gt;, &lt;2 18&gt;, &lt;2 20&gt;, &lt;2 21&gt;;
    #gpio-cells = &lt;2&gt;;
    gpio-controller;
    #interrupt-cells = &lt;2&gt;;
    interrupt-controller;
};
</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>
