# Broadcom BCM283x Camera Interface (Unicam)

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

> Device-tree binding reference for Broadcom BCM283x Camera Interface (Unicam).

<!-- 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;brcm&#44;bcm2835&#45;unicam&#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;Raspberry Pi Kernel Maintenance &#60;kernel&#45;list&#64;raspberrypi&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Unicam block on BCM283x SoCs is the receiver for either
CSI-2 or CCP2 data from image sensors or similar devices.</p>
<p style="white-space: pre-wrap">The main platform using this SoC is the Raspberry Pi family of boards.  On
the Pi the VideoCore firmware can also control this hardware block, and
driving it from two different processors will cause issues.  To avoid this,
the firmware checks the device tree configuration during boot. If it finds
device tree nodes whose name starts with 'csi' then it will stop the firmware
accessing the block, and it can then safely be used via the device tree
binding.</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;brcm&#44;bcm2835&#45;unicam&#34;</code></span>

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

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">Unicam block.</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">Clock Manager Image (CMI) block.</p>
> </div>

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

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

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;unicam&#34;</code></span>

<a id="dt-12013039402717d72b48"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-8472c6e17fb2491b6ba3"><code>&#34;cmi&#34;</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

<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">Clock to drive the LP state machine of Unicam.</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">Clock for the VPU (core 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;lp&#34;</code></span>

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

**Item 2**

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

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — required here

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

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

<a id="dt-10baa21b898841abd200"></a>

**Item 1**

> <div id="dt-07872a169d45c45fb722">
> <p style="white-space: pre-wrap">Unicam power domain</p>
> </div>

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

### <code>brcm&#44;num&#45;data&#45;lanes</code> — required here

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

**Allowed values (<code>enum</code>):** <a id="dt-513f0b8bfdfa3212dda7"></a> <span id="dt-7bf8ef53907b905e5268"><code>2</code></span>, <span id="dt-f1b9c09c565e09a3eff1"><code>4</code></span>

<div id="dt-cf3283664285ac6b3250">
<p style="white-space: pre-wrap">Number of CSI-2 data lanes supported by this Unicam instance. The number
of data lanes actively used is specified with the data-lanes endpoint
property.</p>
</div>

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

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

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

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

<code>false</code>

Not allowed by this rule.

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

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

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

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4d56cb4bb8332929f9b4">[<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-79e84db9dffbeb97ed1f"></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-379ad4ba4c48ef74875c"></a>

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

<a id="dt-8329bde425fe3f5dddf5"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-14d879b8fe3974389c51"></a> <span id="dt-ad24d07271e2babfab2b"><code>3</code></span>, <span id="dt-c31b183ccb9a8701b9bd"><code>4</code></span>

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

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

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

<a id="dt-14a6a7c162ee9110be94"></a>

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

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

<a id="dt-924e0f790c77809eed84"></a>

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

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

**Required in this object (<code>required</code>):** <a id="dt-12e7739ba85a6fad8ee6"></a> <span id="dt-449e4df1e2797fc2ae88"><code>&#34;bus&#45;type&#34;</code></span>, <span id="dt-329e1ac26f9aeebf4487"><code>&#34;data&#45;lanes&#34;</code></span>, <span id="dt-b2edfcfafd7881e8d255"><code>&#34;remote&#45;endpoint&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-32fe5277340124c240c4"></a> <span id="dt-265c904b49e271293bbd"><code>&#34;endpoint&#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;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;reg&#45;names&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;interrupts&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;clocks&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-a5d07fc4223c155670a0"><code>&#34;power&#45;domains&#34;</code></span>, <span id="dt-4503833a9b225761c43a"><code>&#34;brcm&#44;num&#45;data&#45;lanes&#34;</code></span>, <span id="dt-727c9b818c335e022c0e"><code>&#34;port&#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.

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/clock/bcm2835.h&gt;
#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
#include &lt;dt-bindings/media/video-interfaces.h&gt;
#include &lt;dt-bindings/power/raspberrypi-power.h&gt;

csi1: csi@7e801000 {
    compatible = "brcm,bcm2835-unicam";
    reg = &lt;0x7e801000 0x800&gt;,
          &lt;0x7e802004 0x4&gt;;
    reg-names = "unicam", "cmi";
    interrupts = &lt;GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH&gt;;
    clocks = &lt;&amp;clocks BCM2835_CLOCK_CAM1&gt;,
             &lt;&amp;firmware_clocks 4&gt;;
    clock-names = "lp", "vpu";
    power-domains = &lt;&amp;power RPI_POWER_DOMAIN_UNICAM1&gt;;
    brcm,num-data-lanes = &lt;2&gt;;
    port {
            csi1_ep: endpoint {
                    remote-endpoint = &lt;&amp;imx219_0&gt;;
                    bus-type = &lt;MEDIA_BUS_TYPE_CSI2_DPHY&gt;;
                    data-lanes = &lt;1 2&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>
