# GPIO bitbanged I2C

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

> Device-tree binding reference for GPIO bitbanged I2C.

<!-- 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;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;Wolfram Sang &#60;wsa&#64;kernel&#46;org&#62;&#34;</code></span>

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

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

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

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<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-e1f655ed0ff4d595dadc"></a>

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

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

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

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

#### Array item rules (<code>items</code>)

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-aaadfb6b044cada8472e"><code>&#34;i2c&#45;gpio&#34;</code></span>

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

### <code>sda&#45;gpios</code> — required here

<div id="dt-5d89f3877cf5b7ec40ea">
<p style="white-space: pre-wrap">gpio used for the sda signal, this should be flagged as active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) from &lt;dt-bindings/gpio/gpio.h&gt; since the signal is by definition open drain.</p>
</div>

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

<a id="dt-8613faf4e22687cd03b4"></a>

### <code>scl&#45;gpios</code> — required here

<div id="dt-c462f43ad0f1705d55d3">
<p style="white-space: pre-wrap">gpio used for the scl signal, this should be flagged as active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) from &lt;dt-bindings/gpio/gpio.h&gt; since the signal is by definition open drain.</p>
</div>

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

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

### <code>i2c&#45;gpio&#44;sda&#45;output&#45;only</code> — not listed as required here

<div id="dt-cad0f59eabc38c032bd0">
<p style="white-space: pre-wrap">sda as output only</p>
</div>

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

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

### <code>i2c&#45;gpio&#44;scl&#45;output&#45;only</code> — not listed as required here

<div id="dt-30c62b36a67a421ce5ab">
<p style="white-space: pre-wrap">scl as output only</p>
</div>

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

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

### <code>i2c&#45;gpio&#44;delay&#45;us</code> — not listed as required here

<div id="dt-465521ffcaebe643b5d6">
<p style="white-space: pre-wrap">delay between GPIO operations (may depend on each platform)</p>
</div>

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

### <code>i2c&#45;gpio&#44;timeout&#45;ms</code> — not listed as required here

<div id="dt-6d0a78976a07145f1af1">
<p style="white-space: pre-wrap">timeout to get data</p>
</div>

<a id="dt-6423357510c4f559d9df"></a>

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

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

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

<div id="dt-e9a56736b9784e1b506e">
<p style="white-space: pre-wrap">sda and scl gpio, alternative for {sda,scl}-gpios</p>
</div>

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

### <code>i2c&#45;gpio&#44;sda&#45;open&#45;drain</code> — not listed as required here

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

**Deprecated (<code>deprecated</code>):** <span id="dt-b37057fcf92c70d37bd4"><code>true</code></span>

<div id="dt-3f60c438f3df1b88d0bd">
<p style="white-space: pre-wrap">this means that something outside of our control has put the GPIO line used for SDA into open drain mode, and that something is not the GPIO chip. It is essentially an inconsistency flag.</p>
</div>

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

### <code>i2c&#45;gpio&#44;scl&#45;open&#45;drain</code> — not listed as required here

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

**Deprecated (<code>deprecated</code>):** <span id="dt-c18fcbddacb74f11d2c2"><code>true</code></span>

<div id="dt-1069018ecd32d503e70d">
<p style="white-space: pre-wrap">this means that something outside of our control has put the GPIO line used for SCL into open drain mode, and that something is not the GPIO chip. It is essentially an inconsistency flag.</p>
</div>

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

### <code>i2c&#45;gpio&#44;sda&#45;has&#45;no&#45;pullup</code> — not listed as required here

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

<div id="dt-5f91c5650a2bcd5a2993">
<p style="white-space: pre-wrap">sda is used in a non-compliant way and has no pull-up. Therefore disable open-drain. This property is mutually-exclusive with i2c-gpio,sda-open-drain.</p>
</div>

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

### <code>i2c&#45;gpio&#44;scl&#45;has&#45;no&#45;pullup</code> — not listed as required here

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

<div id="dt-cc8df58618d1f0776cef">
<p style="white-space: pre-wrap">scl is used in a non-compliant way and has no pull-up. Therefore disable open-drain. This property is mutually-exclusive with i2c-gpio,scl-open-drain.</p>
</div>

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

## Property dependencies (<code>dependencies</code>)

<a id="dt-43b2e85cbcb10b0e12ab"></a>

### <code>i2c&#45;gpio&#44;sda&#45;has&#45;no&#45;pullup</code> — applies when this property is present

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

#### This rule must not match (<code>not</code>)

> **Required in this object (<code>required</code>):** <a id="dt-c1a2d624930556e65da7"></a> <span id="dt-372326443858a2508e25"><code>&#34;i2c&#45;gpio&#44;sda&#45;open&#45;drain&#34;</code></span>

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

### <code>i2c&#45;gpio&#44;scl&#45;has&#45;no&#45;pullup</code> — applies when this property is present

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

#### This rule must not match (<code>not</code>)

> **Required in this object (<code>required</code>):** <a id="dt-7dd18eeb5f1794757d3b"></a> <span id="dt-6e7caa85a961e248f1ec"><code>&#34;i2c&#45;gpio&#44;scl&#45;open&#45;drain&#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;sda&#45;gpios&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;scl&#45;gpios&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

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

<code>false</code>

Not allowed by this rule.

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

<p id="dt-comment-1"><strong>Line 50:</strong> <span> Deprecated properties, do not use in new device tree sources:</span></p>

</details>
