# Sophgo SG2042 Pin Controller

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

> Device-tree binding reference for Sophgo SG2042 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;sophgo&#44;sg2042&#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;Inochi Amaoto &#60;inochiama&#64;outlook&#46;com&#62;&#34;</code></span>

<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;sophgo&#44;sg2042&#45;pinctrl&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;sophgo&#44;sg2044&#45;pinctrl&#34;</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-e96074e5607917ad142d"></a>

### <code>&#45;cfg&#36;</code> — name matches this regular expression

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

<div id="dt-29a5791beee62cf474d8">
<p style="white-space: pre-wrap">A pinctrl node should contain at least one subnode representing the pinctrl groups available on the machine.</p>
</div>

<a id="dt-c585109ab96ce3634f06"></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-6587e986a22eb0742cc2"></a>

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

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

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

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

<div id="dt-d320c2d25f0cffc852f1">
<p style="white-space: pre-wrap">Each subnode will list the pins it needs, and how they should
be configured, with regard to muxer configuration, bias input
enable/disable, input schmitt trigger enable, drive strength
output enable/disable state. For configuration detail,
refer to https://github.com/sophgo/sophgo-doc/.</p>
</div>

<a id="dt-1286ce356c1102015efe"></a>

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

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

**Rule 1**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-204bc31f2f6e922bd413">[<code>pincfg&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pincfg-node.md#dt-root>)</span>

<a id="dt-3a990f31973ac3809bbe"></a>

**Rule 2**

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b762d5f9d69adab8ca0b">[<code>pinmux&#45;node&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pinctrl/pinmux-node.md#dt-root>)</span>

<a id="dt-48f77668f0630213cff6"></a>

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

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

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

<div id="dt-2e926b7c0fc7e4566c72">
<p style="white-space: pre-wrap">The list of GPIOs and their mux settings that properties in the
node apply to. This should be set using the PINMUX macro.</p>
</div>

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

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

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

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

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

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

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

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

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

<a id="dt-740ebb1c4a660c418efd"></a>

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

<div id="dt-4a04eaeb1dd6de27c2c2">
<p style="white-space: pre-wrap">typical current when output low level.</p>
</div>

<a id="dt-f205f6c969095e89868d"></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-1cbd389d62f19b32ee78"></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-8d36acb7228596d67090"></a> <span id="dt-0cd052ddcc306f968e18"><code>&#34;pinmux&#34;</code></span>

<a id="dt-ca121e5914c0df29a6f8"></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>

<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>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8997992e7087b5549d86"><code>&#34;sophgo&#44;sg2042&#45;pinctrl&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-6a22a8f69a54bcbb7d12"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-7ebe757269208342d904"></a>
> >
> > **<code>&#45;cfg&#36;</code> — name matches this regular expression**
> >
> > <a id="dt-97c250cdb935d4d5ecc5"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-e4b1f05bde4ee004b46c"></a>
> >
> > **<code>&#45;pins&#36;</code> — name matches this regular expression**
> >
> > <a id="dt-fd86e5bc92e746622697"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-cce21edf6bae7f2ff1c7"></a>
> >
> > **<code>drive&#45;strength&#45;microamp</code> — not listed as required here**
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-5ab27a2a72775ec9a78c"></a> <span id="dt-2e73aa20cfa6a283c3c8"><code>5400</code></span>, <span id="dt-e234e5ad4c3ad33b6712"><code>8100</code></span>, <span id="dt-86dcc2b4cec41247ce9b"><code>10700</code></span>, <span id="dt-dad3bbc0c77d5c3f256c"><code>13400</code></span>, <span id="dt-4f339aca559f1b497d5a"><code>16100</code></span>, <span id="dt-f8fa5982c25446e6ce2e"><code>18800</code></span>, <span id="dt-1a2600dfcf03aa82fc8d"><code>21400</code></span>, <span id="dt-b22972257d4186762646"><code>24100</code></span>, <span id="dt-a05316e2dc1b2e851a30"><code>26800</code></span>, <span id="dt-932a895c7b5534d2d747"><code>29400</code></span>, <span id="dt-e66cdf408a50c03283c7"><code>32100</code></span>, <span id="dt-f2408729b0b78e6ca9e6"><code>34800</code></span>, <span id="dt-d29cbc59050999beb635"><code>37400</code></span>, <span id="dt-74994a1a91396915e689"><code>40100</code></span>, <span id="dt-cff47fd43eacdb9959bd"><code>42800</code></span>, <span id="dt-7e8e4cf1c65a52c3a97e"><code>45400</code></span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-d1402748b5f4caf0b18a"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-9b74ad9882646c4a5116"><code>&#34;sophgo&#44;sg2044&#45;pinctrl&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-8b91e530d80f7cc46df3"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-2fa52612575fa449341e"></a>
> >
> > **<code>&#45;cfg&#36;</code> — name matches this regular expression**
> >
> > <a id="dt-248c43de4b5419f2541a"></a>
> >
> > **Properties matching a name pattern (<code>patternProperties</code>)**
> >
> > <a id="dt-53da4726f5958a7c02bc"></a>
> >
> > **<code>&#45;pins&#36;</code> — name matches this regular expression**
> >
> > <a id="dt-53f5c8c83c3b9e8e155c"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-fb004a78b5ceb3ba0c39"></a>
> >
> > **<code>drive&#45;strength&#45;microamp</code> — not listed as required here**
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-ac30792ba931a535e8bc"></a> <span id="dt-4225de6d6199833a390d"><code>3200</code></span>, <span id="dt-f6f8c755f56db89272e0"><code>6400</code></span>, <span id="dt-df482baac5cc105773bd"><code>9600</code></span>, <span id="dt-04c3c1ef8398f8b32096"><code>12700</code></span>, <span id="dt-b594dbf8c5ee09b79e60"><code>15900</code></span>, <span id="dt-3f0436671c6db6488198"><code>19100</code></span>, <span id="dt-b3ad35e8d547e46af62b"><code>22200</code></span>, <span id="dt-c9bb43c0cbe1b18f14ae"><code>25300</code></span>, <span id="dt-21a676cef88163ce3776"><code>29500</code></span>, <span id="dt-50a0594b50106fdb4417"><code>32700</code></span>, <span id="dt-b0ccb3f9ee03b0d560e7"><code>35900</code></span>, <span id="dt-af369b1acb9717c88c79"><code>39000</code></span>, <span id="dt-7b99ef10853f7fbae03d"><code>42000</code></span>, <span id="dt-6f4485f5dafbd7d65cf7"><code>45200</code></span>, <span id="dt-e866414c762dd8e9736b"><code>48300</code></span>, <span id="dt-df7580c9a027a3deed35"><code>51400</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/pinctrl-sg2042.h&gt;

pinctrl@30011000 {
    compatible = "sophgo,sg2042-pinctrl";
    reg = &lt;30011000 0x1000&gt;;

    uart0_cfg: uart0-cfg {
        uart0-pins {
            pinmux = &lt;PINMUX(PIN_UART0_TX, 0)&gt;,
                     &lt;PINMUX(PIN_UART0_RX, 0)&gt;;
            bias-pull-up;
            drive-strength-microamp = &lt;13400&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>
