# Microchip CSI2 Demux Controller (CSI2DC)

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

> Device-tree binding reference for Microchip CSI2 Demux Controller (CSI2DC).

<!-- 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;media&#47;microchip&#44;csi2dc&#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;Eugen Hristev &#60;eugen&#46;hristev&#64;microchip&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">CSI2DC - Camera Serial Interface 2 Demux Controller
CSI2DC is a hardware block that receives incoming data from either from an IDI interface or from a parallel bus interface. It filters IDI packets based on their data type and virtual channel identifier, then converts the byte stream to a pixel stream into a cross clock domain towards a parallel interface that can be read by a sensor controller. IDI interface is Synopsys proprietary. CSI2DC can act a simple bypass bridge if the incoming data is coming from a parallel interface.
CSI2DC provides two pipes, one video pipe and one data pipe. Video pipe is connected at the output to a sensor controller and the data pipe is accessible as a DMA slave port to a DMA controller.
CSI2DC supports a single 'port' node as a sink port with either Synopsys 32-bit IDI interface or a parallel interface.
CSI2DC supports one 'port' node as source port with parallel interface. This is called video pipe. This port has an 'endpoint' that can be connected to a sink port of another controller (next in pipeline).
CSI2DC also supports direct access to the data through AHB, via DMA channel, called data pipe. For data pipe to be available, a dma controller and a dma channel must be referenced.</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;microchip&#44;sama7g5&#45;csi2dc&#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>

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

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

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

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

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — required here

<div id="dt-d153c20aa0faf1618c41">
<p style="white-space: pre-wrap">CSI2DC must have two clocks to function correctly. One clock is the peripheral clock for the inside functionality of the hardware block. This is named 'pclk'. The second clock must be the cross domain clock, in which CSI2DC will perform clock crossing. This clock must be fed by the next controller in pipeline, which usually is a sensor controller. Normally this clock should be given by this sensor controller who is also a clock source. This clock is named 'scck', sensor controller clock.</p>
</div>

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;pclk&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-0298e5f353a64a09a8a6"><code>&#34;scck&#34;</code></span>

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

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-05981720df4cd7d43d3c"><code>&#34;rx&#34;</code></span>

<a id="dt-638717a7c9bbf1878b7e"></a>

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-253551a11be145495212">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;ports</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-638717a7c9bbf1878b7e>)</span>

<a id="dt-076265030fa616d9c245"></a>

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

<a id="dt-16a3f454af238f04e210"></a>

**<code>port&#64;0</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4bf3c29e51dd1dcdbf80">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;&#36;defs&#47;port&#45;base</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-61dbefbf4cdd7cc4556a>)</span>

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-b1724f7738be96ef356e">
<p style="white-space: pre-wrap">Input port node, single endpoint describing the input port.</p>
</div>

<a id="dt-97a7e289fd1dc27f715a"></a>

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

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-f80c0d0094e64d1811a9">[<code>video&#45;interfaces&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-media/video-interfaces.md#dt-root>)</span>

<a id="dt-69d97269bb790a34386a"></a>

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

<code>false</code>

Not allowed by this rule.

<div id="dt-f55bb7f2e3581e773aad">
<p style="white-space: pre-wrap">Endpoint connected to input device</p>
</div>

<a id="dt-54fb05b9994e8e117d7d"></a>

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

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

**<code>bus&#45;type</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-8460a2613419aa44ab8f"></a> <span id="dt-489eea150d2525a0bcb4"><code>4</code></span>, <span id="dt-c427aeab7d9bcd63758e"><code>5</code></span>, <span id="dt-36a865fba99fe7c8d441"><code>6</code></span>

**Default value (<code>default</code>):** <span id="dt-1aa5e1650be5cfdb1ba2"><code>4</code></span>

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

**<code>bus&#45;width</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-f4900ddc65de4ec6010c"></a> <span id="dt-0ce8c96763fe4e18d7e1"><code>8</code></span>, <span id="dt-f77562d9e7165df0caae"><code>9</code></span>, <span id="dt-9d4bd653787e72a328b9"><code>10</code></span>, <span id="dt-bdc2065e0b0745b07231"><code>11</code></span>, <span id="dt-41ef6592bfde6e51d738"><code>12</code></span>, <span id="dt-08c95194bd2ce0398f4f"><code>13</code></span>, <span id="dt-31fbae2815430d321995"><code>14</code></span>

**Default value (<code>default</code>):** <span id="dt-ec3ced919697b7e8a4da"><code>14</code></span>

<a id="dt-770827c245b79a595ac1"></a>

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

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

<div id="dt-3f0940d0e5154f638eed">
<p style="white-space: pre-wrap">Presence of this boolean property decides whether clock is continuous or noncontinuous.</p>
</div>

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

**<code>remote&#45;endpoint</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

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

**<code>port&#64;1</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-9faa1456d91cf714ff9d">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;&#36;defs&#47;port&#45;base</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-61dbefbf4cdd7cc4556a>)</span>

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

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

<code>false</code>

Not allowed by this rule.

<div id="dt-0fa4b11c6410ab72ea2f">
<p style="white-space: pre-wrap">Output port node, single endpoint describing the output port.</p>
</div>

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

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

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

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

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

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

<code>false</code>

Not allowed by this rule.

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b05be6f25c006a034e08">[<code>video&#45;interfaces&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-media/video-interfaces.md#dt-root>)</span>

<div id="dt-6d40e0d769a59e85029f">
<p style="white-space: pre-wrap">Endpoint connected to output device</p>
</div>

<a id="dt-73975f999989e2b986c4"></a>

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

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

**<code>bus&#45;type</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-40dbeb2f0d6266d976e4"></a> <span id="dt-783ba192b54d96fad6a4"><code>5</code></span>, <span id="dt-c18fcb52670e7f3b7eb6"><code>6</code></span>

**Default value (<code>default</code>):** <span id="dt-c1e6a57320904397e352"><code>5</code></span>

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

**<code>bus&#45;width</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-a91619d6ee8b3d732c67"></a> <span id="dt-c94220101166e6591625"><code>8</code></span>, <span id="dt-33e505b249ed88de0223"><code>9</code></span>, <span id="dt-2e9cd920171d4044789c"><code>10</code></span>, <span id="dt-138d38eeee6830977802"><code>11</code></span>, <span id="dt-2a45b514609b867d85d4"><code>12</code></span>, <span id="dt-2b1ed1d49122db2752e7"><code>13</code></span>, <span id="dt-d602c8fb8dd803b4adb4"><code>14</code></span>

**Default value (<code>default</code>):** <span id="dt-f1d1fdda01c4cefccdc2"><code>14</code></span>

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

**<code>remote&#45;endpoint</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

**Required in this object (<code>required</code>):** <a id="dt-2491871393415320c88c"></a> <span id="dt-95e4854181be8c873eb8"><code>&#34;port&#64;0&#34;</code></span>, <span id="dt-0b051ff21225a3bba241"><code>&#34;port&#64;1&#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.

**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>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;ports&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">csi2dc@e1404000 {
    compatible = "microchip,sama7g5-csi2dc";
    reg = &lt;0xe1404000 0x500&gt;;
    clocks = &lt;&amp;pclk&gt;, &lt;&amp;scck&gt;;
    clock-names = "pclk", "scck";

    ports {
           #address-cells = &lt;1&gt;;
           #size-cells = &lt;0&gt;;
           port@0 {
                   reg = &lt;0&gt;; /* must be 0, first child port */
                   csi2dc_in: endpoint { /* input from IDI interface */
                           bus-type = &lt;4&gt;; /* MIPI CSI2 D-PHY */
                           remote-endpoint = &lt;&amp;csi2host_out&gt;;
                   };
           };

           port@1 {
                   reg = &lt;1&gt;; /* must be 1, second child port */
                   csi2dc_out: endpoint {
                           remote-endpoint = &lt;&amp;xisc_in&gt;; /* output to sensor controller */
                   };
           };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">#include &lt;dt-bindings/dma/at91.h&gt;
csi2dc@e1404000 {
    compatible = "microchip,sama7g5-csi2dc";
    reg = &lt;0xe1404000 0x500&gt;;
    clocks = &lt;&amp;pclk&gt;, &lt;&amp;scck&gt;;
    clock-names = "pclk", "scck";
    dmas = &lt;&amp;dma0 AT91_XDMAC_DT_PERID(34)&gt;;
    dma-names = "rx";

    ports {
           #address-cells = &lt;1&gt;;
           #size-cells = &lt;0&gt;;
           port@0 {
                   reg = &lt;0&gt;; /* must be 0, first child port */
                   csi2dc_input: endpoint { /* input from IDI interface */
                           remote-endpoint = &lt;&amp;csi2host_out&gt;;
                   };
           };

           port@1 {
                   reg = &lt;1&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>

<p id="dt-comment-1"><strong>Line 142:</strong> <span> Example for connecting to a parallel sensor controller block (video pipe)</span></p>

<p id="dt-comment-2"><strong>Line 143:</strong> <span> and the input is received from Synopsys IDI interface</span></p>

<p id="dt-comment-3"><strong>Line 171:</strong> <span> Example for connecting to a DMA master as an AHB slave</span></p>

<p id="dt-comment-4"><strong>Line 172:</strong> <span> and the input is received from Synopsys IDI interface</span></p>

</details>
