# MCTP I2C transport

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

> Device-tree binding reference for MCTP I2C transport.

<!-- 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;net&#47;mctp&#45;i2c&#45;controller&#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;Matt Johnston &#60;matt&#64;codeconstruct&#46;com&#46;au&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">An mctp-i2c-controller defines a local MCTP endpoint on an I2C controller.
MCTP I2C is specified by DMTF DSP0237.</p>
<p style="white-space: pre-wrap">An mctp-i2c-controller must be attached to an I2C adapter which supports
slave functionality. I2C busses (either directly or as subordinate mux
busses) are attached to the mctp-i2c-controller with a 'mctp-controller'
property on each used bus. Each mctp-controller I2C bus will be presented
to the host system as a separate MCTP I2C instance.</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;mctp&#45;i2c&#45;controller&#34;</code></span>

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

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

**Minimum value (<code>minimum</code>):** <span id="dt-7c3cf5bd8a25760e50cd"><code>1073741824</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-3f0a45b6ec86a13e631b"><code>1073741951</code></span>

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">7 bit I2C address of the local endpoint.
I2C_OWN_SLAVE_ADDRESS (1&lt;&lt;30) flag must be set.</p>
</div>

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

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">// Basic case of a single I2C bus
#include &lt;dt-bindings/i2c/i2c.h&gt;

i2c {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  mctp-controller;

  mctp@30 {
    compatible = "mctp-i2c-controller";
    reg = &lt;(0x30 | I2C_OWN_SLAVE_ADDRESS)&gt;;
  };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">// Mux topology with multiple MCTP-handling busses under
// a single mctp-i2c-controller.
// i2c1 and i2c6 can have MCTP devices, i2c5 does not.
#include &lt;dt-bindings/i2c/i2c.h&gt;

i2c1: i2c {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  mctp-controller;

  mctp@50 {
    compatible = "mctp-i2c-controller";
    reg = &lt;(0x50 | I2C_OWN_SLAVE_ADDRESS)&gt;;
  };
};

i2c-mux {
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;0&gt;;
  i2c-parent = &lt;&amp;i2c1&gt;;

  i2c5: i2c@0 {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    reg = &lt;0&gt;;
    eeprom@33 {
      reg = &lt;0x33&gt;;
    };
  };

  i2c6: i2c@1 {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    reg = &lt;1&gt;;
    mctp-controller;
  };
};
</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>
