# CP2112 HID USB to SMBus/I2C Bridge

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

> Device-tree binding reference for CP2112 HID USB to SMBus/I2C Bridge.

<!-- 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;i2c&#47;silabs&#44;cp2112&#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;Danny Kaehn &#60;danny&#46;kaehn&#64;plexus&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The CP2112 is a USB HID device which includes an integrated I2C controller and 8 GPIO pins. Its GPIO pins can each be configured as inputs, open-drain outputs, or push-pull outputs.</p>
</div>

<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;usb10c4&#44;ea90&#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>

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">The USB port number</p>
</div>

<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-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-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-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-14035f3a8826cdac18bd"></a>

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-a63b03dba047b6fd45f0"><code>1</code></span>

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

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

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

<div id="dt-1c6f26fb3e4be07ad757">
<p style="white-space: pre-wrap">The SMBus/I2C controller node for the CP2112</p>
</div>

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

<a id="dt-368304f0d33adef14e1b"></a>

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

<code>false</code>

Not allowed by this rule.

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

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

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

**<code>clock&#45;frequency</code> — not listed as required here**

**Minimum value (<code>minimum</code>):** <span id="dt-6bdee70dd6cb953e3d36"><code>10000</code></span>

**Default value (<code>default</code>):** <span id="dt-9f9e5f37e54cac16beb5"><code>100000</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-2c19fa69b0585c8a1afc"><code>400000</code></span>

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

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

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

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

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

**Required in this object (<code>required</code>):** <a id="dt-a92c0f727772988db0f5"></a> <span id="dt-c6df4cd0db27b8ac7f8b"><code>&#34;gpio&#45;hog&#34;</code></span>

**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-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/interrupt-controller/irq.h&gt;
#include &lt;dt-bindings/gpio/gpio.h&gt;

usb {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cp2112: device@1 {
        compatible = "usb10c4,ea90";
        reg = &lt;1&gt;;

        gpio-controller;
        interrupt-controller;
        #interrupt-cells = &lt;2&gt;;
        #gpio-cells = &lt;2&gt;;
        gpio-line-names = "CP2112_SDA", "CP2112_SCL", "TEST2",
                          "TEST3","TEST4", "TEST5", "TEST6";

        fan-rst-hog {
            gpio-hog;
            gpios = &lt;7 GPIO_ACTIVE_HIGH&gt;;
            output-high;
            line-name = "FAN_RST";
        };

        i2c {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;
            sda-gpios = &lt;&amp;cp2112 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)&gt;;
            scl-gpios = &lt;&amp;cp2112 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)&gt;;

            temp@48 {
                compatible = "national,lm75";
                reg = &lt;0x48&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>
