# I3C bus

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

> Device-tree binding reference for I3C bus.

<!-- 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;i3c&#47;i3c&#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;Alexandre Belloni &#60;alexandre&#46;belloni&#64;bootlin&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Miquel Raynal &#60;miquel&#46;raynal&#64;bootlin&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">I3C busses can be described with a node for the primary I3C controller device
and a set of child nodes for each I2C or I3C slave on the bus. Each of them
may, during the life of the bus, request mastership.</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;i3c&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;&#34;</code></span>

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

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

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

<div id="dt-56d7bd958afc920979c6">
<p style="white-space: pre-wrap">Each I2C device connected to the bus should be described in a subnode.</p>
<p style="white-space: pre-wrap">All I3C devices are supposed to support DAA (Dynamic Address Assignment),
and are thus discoverable. So, by default, I3C devices do not have to be
described in the device tree. This being said, one might want to attach
extra resources to these devices, and those resources may have to be
described in the device tree, which in turn means we have to describe
I3C devices.</p>
<p style="white-space: pre-wrap">Another use case for describing an I3C device in the device tree is when
this I3C device has a static I2C address and we want to assign it a
specific I3C dynamic address before the DAA takes place (so that other
devices on the bus can't take this dynamic address).</p>
</div>

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

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

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

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

### <code>i3c&#45;scl&#45;hz</code> — not listed as required here

<div id="dt-0cffdb819e9d49505a09">
<p style="white-space: pre-wrap">Frequency of the SCL signal used for I3C transfers. When undefined, the
default value should be 12.5MHz.</p>
<p style="white-space: pre-wrap">May not be supported by all controllers.</p>
</div>

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

### <code>i2c&#45;scl&#45;hz</code> — not listed as required here

<div id="dt-e660993cf76271306f2c">
<p style="white-space: pre-wrap">Frequency of the SCL signal used for I2C transfers. When undefined, the
default should be to look at LVR (Legacy Virtual Register) values of
I2C devices described in the device tree to determine the maximum I2C
frequency.</p>
<p style="white-space: pre-wrap">May not be supported by all controllers.</p>
</div>

<a id="dt-857bcbb2f1c5b337382c"></a>

### <code>mctp&#45;controller</code> — not listed as required here

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

<div id="dt-2222a5e670411ba9541d">
<p style="white-space: pre-wrap">Indicates that the system is accessible via this bus as an endpoint for
MCTP over I3C transport.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;&#35;size&#45;cells&#34;</code></span>

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

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

<a id="dt-573587cdb3ff39c5b5e0"></a>

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

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

<div id="dt-71bf49275c7028f9ad24">
<p style="white-space: pre-wrap">I2C child, should be named: &lt;device-type&gt;@&lt;i2c-address&gt;</p>
<p style="white-space: pre-wrap">All properties described in dtschema schemas/i2c/i2c-controller.yaml
are valid here, except the reg property whose content is changed.</p>
</div>

<a id="dt-2086facb1246423cc914"></a>

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

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

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

<div id="dt-9f3a5830a32a75dce5ca">
<p style="white-space: pre-wrap">Compatible of the I2C device.</p>
</div>

<a id="dt-11d15fd5bdba07ab85a5"></a>

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

<a id="dt-77231ae4a1cc0849a3a3"></a>

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

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

**Item 1**

> <a id="dt-851221d74fe4626dea84"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-4c2752e849a94d4cefe4"></a>
>
> **Item 1**
>
> > <div id="dt-f85de75fea96a1b50bdd">
> > <p style="white-space: pre-wrap">I2C address. 10 bit addressing is not supported. Devices with
> > 10-bit address can't be properly passed through DEFSLVS
> > command.</p>
> > </div>
> >
> > **Minimum value (<code>minimum</code>):** <span id="dt-98bf42534df14283f915"><code>0</code></span>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-5e6b083c06a0a2f2b996"><code>127</code></span>
>
> <a id="dt-ad5bb61ef66fb6b92f8e"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-0fb27a394d02e32eb9b1"><code>0</code></span>
>
> <a id="dt-d347c9d0a6fd625ee331"></a>
>
> **Item 3**
>
> > <div id="dt-d33d6bcc5faa5241324b">
> > <pre><code>Shall encode the I3C LVR (Legacy Virtual Register):
> > See include/dt-bindings/i3c/i3c.h
> >   bit[31:8]: unused/ignored
> >   bit[7:5]: I2C device index. Possible values:
> >     * 0: I2C device has a 50 ns spike filter
> >     * 1: I2C device does not have a 50 ns spike filter but
> >          supports high frequency on SCL
> >     * 2: I2C device does not have a 50 ns spike filter and is
> >          not tolerant to high frequencies
> >     * 3-7: reserved
> >   bit[4]: tell whether the device operates in FM (Fast Mode)
> >           or FM+ mode:
> >     * 0: FM+ mode
> >     * 1: FM mode
> >   bit[3:0]: device type
> >     * 0-15: reserved</code></pre>
> > </div>

**Required in this object (<code>required</code>):** <a id="dt-135aee2a2b59e6c53533"></a> <span id="dt-edfb2b957765627279df"><code>&#34;compatible&#34;</code></span>, <span id="dt-aa7a9deaabe919edc37d"><code>&#34;reg&#34;</code></span>

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

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

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

<div id="dt-835a5afcd355a02f3b3e">
<p style="white-space: pre-wrap">I3C child, should be named: &lt;device-type&gt;@&lt;static-i2c-address&gt;,&lt;i3c-pid&gt;</p>
</div>

<a id="dt-82d0016fc031e7a9357e"></a>

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

<a id="dt-162f8813aa379092bbeb"></a>

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

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

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

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

**Item 1**

> <a id="dt-c9ada30830c3848dbd2f"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-d75eab6fe12c65a368bd"></a>
>
> **Item 1**
>
> > <div id="dt-9b0a4d56378263861ae7">
> > <p style="white-space: pre-wrap">Encodes the static I2C address. Should be 0 if the device does
> > not have one (0 is not a valid I2C address).</p>
> > </div>
> >
> > **Minimum value (<code>minimum</code>):** <span id="dt-2a3f33ed885f05648e43"><code>0</code></span>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-7e2f118972dd42e3881e"><code>127</code></span>
>
> <a id="dt-785e10a2d0a6e97d1288"></a>
>
> **Item 2**
>
> > <div id="dt-551ded53888252687206">
> > <p style="white-space: pre-wrap">First half of the Provisioned ID (following the PID
> > definition provided by the I3C specification).</p>
> > <p style="white-space: pre-wrap">Contains the manufacturer ID left-shifted by 1.</p>
> > </div>
>
> <a id="dt-2246a8cd86fd281ed32a"></a>
>
> **Item 3**
>
> > <div id="dt-22042e1af48bb0e32577">
> > <p style="white-space: pre-wrap">Second half of the Provisioned ID (following the PID
> > definition provided by the I3C specification).</p>
> > <p style="white-space: pre-wrap">Contains the ORing of the part ID left-shifted by 16,
> > the instance ID left-shifted by 12 and extra information.</p>
> > </div>

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

**<code>assigned&#45;address</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-91ca509d59ddec329747">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-08a0d57d29211bd0bd2a"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-86c45dfd11a9d1a47fcf"><code>255</code></span>

<div id="dt-51bac12305bd0c20e638">
<p style="white-space: pre-wrap">Dynamic address to be assigned to this device. In case static address is
present (first cell of the reg property != 0), this address is assigned
through SETDASA. If static address is not present, this address is assigned
through SETNEWDA after assigning a temporary address via ENTDAA.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-d2f88dd6d419871c0f9b"></a> <span id="dt-c57789e6710fa78b0e8d"><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>true</code>

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/i3c/i3c.h&gt;

i3c@d040000 {
    compatible = "cdns,i3c-master";
    clocks = &lt;&amp;coreclock&gt;, &lt;&amp;i3csysclock&gt;;
    clock-names = "pclk", "sysclk";
    interrupts = &lt;3 0&gt;;
    reg = &lt;0x0d040000 0x1000&gt;;
    #address-cells = &lt;3&gt;;
    #size-cells = &lt;0&gt;;
    i2c-scl-hz = &lt;100000&gt;;

    /* I2C device. */
    eeprom@57 {
        compatible = "atmel,24c01";
        reg = &lt;0x57 0x0 (I2C_FM | I2C_FILTER)&gt;;
        pagesize = &lt;0x8&gt;;
    };

    /* I3C device with a static I2C address and assigned address. */
    thermal_sensor: sensor@68,39200144004 {
        reg = &lt;0x68 0x392 0x144004&gt;;
        assigned-address = &lt;0xa&gt;;
    };

    /* I3C device with only assigned address. */
    pressure_sensor: sensor@0,39200124004 {
        reg = &lt;0x0 0x392 0x124000&gt;;
        assigned-address = &lt;0xc&gt;;
    };

    /*
     * I3C device without a static I2C address but requiring
     * resources described in the DT.
     */
    sensor@0,39200154004 {
        reg = &lt;0x0 0x392 0x154004&gt;;
        clocks = &lt;&amp;clock_provider 0&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>
