# Common i2c bus multiplexer/switch properties.

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

> Device-tree binding reference for Common i2c bus multiplexer/switch properties..

<!-- SPDX-License-Identifier: GPL-2.0 -->


<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;i2c&#47;i2c&#45;mux&#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;Peter Rosin &#60;peda&#64;axentia&#46;se&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">An i2c bus multiplexer/switch will have several child busses that are numbered
uniquely in a device dependent manner.  The nodes for an i2c bus
multiplexer/switch will have one child node for each child bus.</p>
<p style="white-space: pre-wrap">For i2c multiplexers/switches that have child nodes that are a mixture of both
i2c child busses and other child nodes, the 'i2c-mux' subnode can be used for
populating the i2c child busses.  If an 'i2c-mux' subnode is present, only
subnodes of this will be considered as i2c child busses.</p>
</div>

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

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

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**String pattern (<code>pattern</code>):** <span id="dt-0b2111a24a010949ece7"><code>&#34;&#94;&#40;i2c&#45;&#63;&#41;&#63;mux&#34;</code></span>

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

### <code>&#35;address&#45;cells</code> — not listed as 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> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>0</code></span>

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

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

<a id="dt-3652c4d788e2b20288f3"></a>

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

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

<a id="dt-956f4b40894a88fb3478"></a>

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-508c3891570a235c1ce1"></a>

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

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

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

<div id="dt-4f712dcea0ff3681021d">
<p style="white-space: pre-wrap">The mux selector sub-bus number for the child I2C bus.</p>
</div>

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

<a id="dt-738c4b4f9e483441138b"></a>

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

<code>true</code>

Allowed by this rule.

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">/*
 * An NXP pca9548 8 channel I2C multiplexer at address 0x70
 * with two NXP pca8574 GPIO expanders attached, one each to
 * ports 3 and 4.
 */
i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    i2c-mux@70 {
        compatible = "nxp,pca9548";
        reg = &lt;0x70&gt;;
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;

        i2c@3 {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;
            reg = &lt;3&gt;;

            gpio@20 {
                compatible = "nxp,pca9555";
                gpio-controller;
                #gpio-cells = &lt;2&gt;;
                reg = &lt;0x20&gt;;
            };
        };
        i2c@4 {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;
            reg = &lt;4&gt;;

            gpio@20 {
                compatible = "nxp,pca9555";
                gpio-controller;
                #gpio-cells = &lt;2&gt;;
                reg = &lt;0x20&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</span></p>

</details>
