# STMicroelectonics Multi-Function eXpander (STMFX)

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

> Device-tree binding reference for STMicroelectonics Multi-Function eXpander (STMFX).

<!-- 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;mfd&#47;st&#44;stmfx&#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>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">ST Multi-Function eXpander (STMFX) is a slave controller using I2C for communication with the main MCU. Its main features are GPIO expansion, main MCU IDD measurement (IDD is the amount of current that flows through VDD) and resistive touchscreen controller.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Amelie Delaunay &#60;amelie&#46;delaunay&#64;foss&#46;st&#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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;st&#44;stmfx&#45;0300&#34;</code></span>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-917ea1ad16cfd55f8ef7"></a> <span id="dt-808e90b1016f267b83cf"><code>66</code></span>, <span id="dt-3f3177878e4e0b370619"><code>67</code></span>

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

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

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

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

### <code>drive&#45;open&#45;drain</code> — not listed as required here

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

<a id="dt-236855bde9eebcc9d904"></a>

### <code>vdd&#45;supply</code> — not listed as required here

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

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

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

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

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-72b4315013aca6d27909"><code>&#34;st&#44;stmfx&#45;0300&#45;pinctrl&#34;</code></span>

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

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

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

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

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

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

<a id="dt-0a33a4758e8d12b58646"></a>

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

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

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

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

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

<a id="dt-370429381bc0c8e9970b"></a>

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

<div id="dt-739abad94ceff5215cc6">
<p style="white-space: pre-wrap">if all STMFX pins[24:0] are available (no other STMFX function in use), you should use gpio-ranges = &lt;&amp;stmfx_pinctrl 0 0 24&gt;; if agpio[3:0] are not available (STMFX Touchscreen function in use), you should use gpio-ranges = &lt;&amp;stmfx_pinctrl 0 0 16&gt;, &lt;&amp;stmfx_pinctrl 20 20 4&gt;; if agpio[7:4] are not available (STMFX IDD function in use), you should use gpio-ranges = &lt;&amp;stmfx_pinctrl 0 0 20&gt;;</p>
</div>

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

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

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

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

**<code>&#94;&#91;a&#45;zA&#45;Z&#93;&#42;&#45;pins&#36;</code> — name matches this regular expression**

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

<a id="dt-5c142424f526421ba486"></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-4de0c7e88c4344f9e691"></a>

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

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

**Rule 1**

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

<a id="dt-58da160fe87fe9f7c2a7"></a>

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

<a id="dt-4bd988e7ffcbe3666be4"></a>

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

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

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

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

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

<a id="dt-3f0ebc888744c9030ccc"></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-ecc2e8e75dad90f3c968"></a>

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

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

<a id="dt-1623084dc0a97d7689f3"></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-a1d16d103d694a3cf4b7"></a>

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

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

<a id="dt-0b11d1b5c51ba7432446"></a>

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

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

<a id="dt-0a3d47175fb5f08e937b"></a>

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

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

<a id="dt-88b1c599db43b9d38615"></a>

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

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

<a id="dt-b2d5bb8f7da956a0f3d8"></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-a85e656aad53c404e285"></a> <span id="dt-9fb92936ae65cd256f94"><code>&#34;compatible&#34;</code></span>, <span id="dt-28801e365fedd5d2385e"><code>&#34;&#35;gpio&#45;cells&#34;</code></span>, <span id="dt-203da144f67e7b76983c"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-4f1366eb07e20afb5c0d"><code>&#34;gpio&#45;controller&#34;</code></span>, <span id="dt-16ec9b30822965963398"><code>&#34;interrupt&#45;controller&#34;</code></span>, <span id="dt-86f4aa42099c682d311a"><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.

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

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
i2c {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  stmfx@42 {
    compatible = "st,stmfx-0300";
    reg = &lt;0x42&gt;;
    interrupts = &lt;8 IRQ_TYPE_EDGE_RISING&gt;;
    interrupt-parent = &lt;&amp;gpioi&gt;;
    vdd-supply = &lt;&amp;v3v3&gt;;

    stmfx_pinctrl: pinctrl {
      compatible = "st,stmfx-0300-pinctrl";
      #gpio-cells = &lt;2&gt;;
      #interrupt-cells = &lt;2&gt;;
      gpio-controller;
      interrupt-controller;
      gpio-ranges = &lt;&amp;stmfx_pinctrl 0 0 24&gt;;

      joystick_pins: joystick-pins {
        pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
        drive-push-pull;
        bias-pull-up;
      };
    };
  };
};
</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>
