# Xilinx MIPI CSI-2 Receiver Subsystem

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

> Device-tree binding reference for Xilinx MIPI CSI-2 Receiver Subsystem.

<!-- 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;xilinx&#47;xlnx&#44;csi2rxss&#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;Vishal Sagar &#60;vishal&#46;sagar&#64;amd&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Xilinx MIPI CSI-2 Receiver Subsystem is used to capture MIPI CSI-2
traffic from compliant camera sensors and send the output as AXI4 Stream
video data for image processing.
The subsystem consists of a MIPI D-PHY in slave mode which captures the
data packets. This is passed along the MIPI CSI-2 Rx IP which extracts the
packet data. The optional Video Format Bridge (VFB) converts this data to
AXI4 Stream video data.
For more details, please refer to PG232 Xilinx MIPI CSI-2 Receiver Subsystem.
Please note that this bindings includes only the MIPI CSI-2 Rx controller
and Video Format Bridge and not D-PHY.</p>
</div>

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

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;xlnx&#44;mipi&#45;csi2&#45;rx&#45;subsystem&#45;5&#46;0&#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-c2de09e7f7fd211b679d"></a>

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

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

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

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

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">List of clock specifiers</p>
</div>

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">AXI Lite clock</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">Video clock</p>
> </div>

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

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

<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;lite&#95;aclk&#34;</code></span>

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

**Item 2**

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

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

### <code>xlnx&#44;csi&#45;pxl&#45;format</code> — not listed as required here

<div id="dt-5af961339f1907f6e420">
<p style="white-space: pre-wrap">This denotes the CSI Data type selected in hw design.
Packets other than this data type (except for RAW8 and
User defined data types) will be filtered out.
Possible values are as below -
0x1e - YUV4228B
0x1f - YUV42210B
0x20 - RGB444
0x21 - RGB555
0x22 - RGB565
0x23 - RGB666
0x24 - RGB888
0x28 - RAW6
0x29 - RAW7
0x2a - RAW8
0x2b - RAW10
0x2c - RAW12
0x2d - RAW14
0x2e - RAW16
0x2f - RAW20</p>
</div>

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

<a id="dt-38463ecb5dfd29b7c186"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

<a id="dt-74a96b017cb7b51472fa"></a>

**Rule 1**

> **Minimum value (<code>minimum</code>):** <span id="dt-3991e2f8c62b4ed3d3f1"><code>30</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-cc13223c00f91e88602c"><code>36</code></span>

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

**Rule 2**

> **Minimum value (<code>minimum</code>):** <span id="dt-20dec839adef3584b3d6"><code>40</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-ef5aca017133330ee0a2"><code>47</code></span>

<a id="dt-7a67d3b25969f69e1c84"></a>

### <code>xlnx&#44;vfb</code> — not listed as required here

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

<div id="dt-835174f1f7caa848af7c">
<p style="white-space: pre-wrap">Present when Video Format Bridge is enabled in IP configuration</p>
</div>

<a id="dt-94ac451b2318ae725d21"></a>

### <code>xlnx&#44;en&#45;csi&#45;v2&#45;0</code> — not listed as required here

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

<div id="dt-da7eeda3f6d23a5d1431">
<p style="white-space: pre-wrap">Present if CSI v2 is enabled in IP configuration.</p>
</div>

<a id="dt-38e07c010b54632c2a41"></a>

### <code>xlnx&#44;en&#45;vcx</code> — not listed as required here

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

<div id="dt-cdc5301b75516e96d4ec">
<p style="white-space: pre-wrap">When present, there are maximum 16 virtual channels, else only 4.</p>
</div>

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

### <code>xlnx&#44;en&#45;active&#45;lanes</code> — not listed as required here

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

<div id="dt-59339834fc40b0e9635c">
<p style="white-space: pre-wrap">Present if the number of active lanes can be re-configured at
runtime in the Protocol Configuration Register. Otherwise all lanes,
as set in IP configuration, are always active.</p>
</div>

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

### <code>video&#45;reset&#45;gpios</code> — not listed as required here

<div id="dt-2f51ee0f3478a3ba427a">
<p style="white-space: pre-wrap">Optional specifier for a GPIO that asserts video_aresetn.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-03f01851cbcfbb7ea4f0"><code>1</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> — not listed as 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>

<div id="dt-b1724f7738be96ef356e">
<p style="white-space: pre-wrap">Input / sink port node, single endpoint describing the
CSI-2 transmitter.</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>&#47;schemas&#47;media&#47;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.

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

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

<a id="dt-87303084204fb603a415"></a>

**<code>data&#45;lanes</code> — required here**

<div id="dt-7a73f34dcaf9791085fd">
<p style="white-space: pre-wrap">This is required only in the sink port 0 endpoint which
connects to MIPI CSI-2 source like sensor.
The possible values are -
1       - For 1 lane enabled in IP.
1 2     - For 2 lanes enabled in IP.
1 2 3   - For 3 lanes enabled in IP.
1 2 3 4 - For 4 lanes enabled in IP.</p>
</div>

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-8abc5992878e2f59751a"><code>1</code></span>

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

**Item 2**

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

<a id="dt-341f4f8db5ee45aef43b"></a>

**Item 3**

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

<a id="dt-6aa0937c92a80ca3d7d0"></a>

**Item 4**

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

**Required in this object (<code>required</code>):** <a id="dt-df1a9b6a20105637c196"></a> <span id="dt-43ad26cce419821606c0"><code>&#34;data&#45;lanes&#34;</code></span>

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

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

<code>false</code>

Not allowed by this rule.

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

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

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

<div id="dt-0fa4b11c6410ab72ea2f">
<p style="white-space: pre-wrap">Output / source port node, endpoint describing modules
connected the CSI-2 receiver.</p>
</div>

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

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

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

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-8562362a36ebdbb1ff2a"></a> <span id="dt-31d648f7705dc578c2d6"><code>&#34;xlnx&#44;vfb&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-b0b2f2243ff9a854f151"></a> <span id="dt-4e9ead0e861b67997dec"><code>&#34;xlnx&#44;csi&#45;pxl&#45;format&#34;</code></span>
>
> <a id="dt-f985d6aaa3f73a650205"></a>
>
> #### When the condition does not match (<code>else</code>)
>
> > <a id="dt-0b56c96a40292905ded0"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-25889da2989b8316725c"></a>
> >
> > **<code>xlnx&#44;csi&#45;pxl&#45;format</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-1f5272cb1d084137975e"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > **Required in this object (<code>required</code>):** <a id="dt-6d7596bdf54362b56296"></a> <span id="dt-04863704c832ad7c52e8"><code>&#34;xlnx&#44;en&#45;csi&#45;v2&#45;0&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-26d1c84fcc55a7d91dea"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9384469c19afc9916cb"></a>
> >
> > **<code>xlnx&#44;en&#45;vcx</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<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/gpio/gpio.h&gt;
xcsi2rxss_1: csi2rx@a0020000 {
    compatible = "xlnx,mipi-csi2-rx-subsystem-5.0";
    reg = &lt;0xa0020000 0x10000&gt;;
    interrupt-parent = &lt;&amp;gic&gt;;
    interrupts = &lt;0 95 4&gt;;
    xlnx,csi-pxl-format = &lt;0x2a&gt;;
    xlnx,vfb;
    xlnx,en-active-lanes;
    xlnx,en-csi-v2-0;
    xlnx,en-vcx;
    clock-names = "lite_aclk", "video_aclk";
    clocks = &lt;&amp;misc_clk_0&gt;, &lt;&amp;misc_clk_1&gt;;
    video-reset-gpios = &lt;&amp;gpio 86 GPIO_ACTIVE_LOW&gt;;

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

        port@0 {
            /* Sink port */
            reg = &lt;0&gt;;
            csiss_in: endpoint {
                data-lanes = &lt;1 2 3 4&gt;;
                /* MIPI CSI-2 Camera handle */
                remote-endpoint = &lt;&amp;camera_out&gt;;
            };
        };
        port@1 {
            /* Source port */
            reg = &lt;1&gt;;
            csiss_out: endpoint {
                remote-endpoint = &lt;&amp;vproc_in&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>
