# Simple Framebuffer

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

> Device-tree binding reference for Simple Framebuffer.

<!-- SPDX-License-Identifier: GPL-2.0 -->


<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;display&#47;simple&#45;framebuffer&#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;Hans de Goede &#60;hdegoede&#64;redhat&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">A simple frame-buffer describes a frame-buffer setup by firmware or
the bootloader, with the assumption that the display hardware has
already been set up to scan out from the memory pointed to by the
reg property.</p>
<p style="white-space: pre-wrap">Since simplefb nodes represent runtime information they must be
sub-nodes of the chosen node (*). Simplefb nodes must be named
framebuffer@&lt;address&gt;.</p>
<p style="white-space: pre-wrap">If the devicetree contains nodes for the display hardware used by a
simplefb, then the simplefb node must contain a property called
display, which contains a phandle pointing to the primary display
hw node, so that the OS knows which simplefb to disable when handing
over control to a driver for the real hardware. The bindings for the
hw nodes must specify which node is considered the primary node.</p>
<p style="white-space: pre-wrap">If a panel node is given, then the driver uses this to configure the
physical width and height of the display. If no panel node is given,
then the driver uses the width and height properties of the simplefb
node to estimate it.</p>
<p style="white-space: pre-wrap">It is advised to add display# aliases to help the OS determine how
to number things. If display# aliases are used, then if the simplefb
node contains a display property then the /aliases/display# path
must point to the display hw node the display property points to,
otherwise it must point directly to the simplefb node.</p>
<p style="white-space: pre-wrap">If a simplefb node represents the preferred console for user
interaction, then the chosen node stdout-path property should point
to it, or to the primary display hw node, as with display#
aliases. If display aliases are used then it should be set to the
alias instead.</p>
<p style="white-space: pre-wrap">It is advised that devicetree files contain pre-filled, disabled
framebuffer nodes, so that the firmware only needs to update the
mode information and enable them. This way if e.g. later on support
for more display clocks get added, the simplefb nodes will already
contain this info and the firmware does not need to be updated.</p>
<p style="white-space: pre-wrap">If pre-filled framebuffer nodes are used, the firmware may need
extra information to find the right node. In that case an extra
platform specific compatible and platform specific properties should
be used and documented.</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-39566f01414e34c67b85"></a>

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

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

**Rule 1**

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-3b212051dcd0fc641cd8"></a> <span id="dt-bd6e6716d05ec45653db"><code>&#34;apple&#44;simple&#45;framebuffer&#34;</code></span>, <span id="dt-3e7fb897881b12f43f81"><code>&#34;allwinner&#44;simple&#45;framebuffer&#34;</code></span>, <span id="dt-b7d19de74fd35364d49f"><code>&#34;amlogic&#44;simple&#45;framebuffer&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;simple&#45;framebuffer&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> **Exact value (<code>const</code>):** <span id="dt-58a429cd4bf531951c0d"><code>&#34;simple&#45;framebuffer&#34;</code></span>

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

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

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">Location and size of the framebuffer memory</p>
</div>

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

### <code>memory&#45;region</code> — not listed as required here

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

<div id="dt-b794f979757a4fadd5eb">
<p style="white-space: pre-wrap">Phandle to a node describing the memory to be used for the framebuffer. If present, overrides the "reg" property (if one exists).</p>
</div>

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

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

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">List of clocks used by the framebuffer.</p>
</div>

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

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

<div id="dt-33c740e5969dba94b4e6">
<p style="white-space: pre-wrap">List of power domains used by the framebuffer.</p>
</div>

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

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

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

<div id="dt-2c21b62a51e5c319209f">
<p style="white-space: pre-wrap">Width of the framebuffer in pixels</p>
</div>

<a id="dt-0fd5747ba6b2623ed41e"></a>

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

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

<div id="dt-bdb2f05553602b5d63e8">
<p style="white-space: pre-wrap">Height of the framebuffer in pixels</p>
</div>

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

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

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

<div id="dt-b470b98e4e21d394608a">
<p style="white-space: pre-wrap">Number of bytes of a line in the framebuffer</p>
</div>

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

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

<div id="dt-9ed71d5ee61cab31e19a">
<pre><code>Format of the framebuffer:
  * `a1r5g5b5` - 16-bit pixels, d[15]=a, d[14:10]=r, d[9:5]=g, d[4:0]=b
  * `a2r10g10b10` - 32-bit pixels, d[31:30]=a, d[29:20]=r, d[19:10]=g, d[9:0]=b
  * `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r
  * `a8r8g8b8` - 32-bit pixels, d[31:24]=a, d[23:16]=r, d[15:8]=g, d[7:0]=b
  * `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b
  * `r5g5b5a1` - 16-bit pixels, d[15:11]=r, d[10:6]=g, d[5:1]=b d[1:0]=a
  * `r8g8b8` - 24-bit pixels, d[23:16]=r, d[15:8]=g, d[7:0]=b
  * `x1r5g5b5` - 16-bit pixels, d[14:10]=r, d[9:5]=g, d[4:0]=b
  * `x2r10g10b10` - 32-bit pixels, d[29:20]=r, d[19:10]=g, d[9:0]=b
  * `x8r8g8b8` - 32-bit pixels, d[23:16]=r, d[15:8]=g, d[7:0]=b
  * `x8b8g8r8` - 32-bit pixels, d[23:16]=b, d[15:8]=g, d[7:0]=r</code></pre>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-8e7b7ce76b067e5af060"></a> <span id="dt-fa3bebb96c251fbd753b"><code>&#34;a1r5g5b5&#34;</code></span>, <span id="dt-c14c3fe8044510b126a8"><code>&#34;a2r10g10b10&#34;</code></span>, <span id="dt-78348d36d9c27dad11e4"><code>&#34;a8b8g8r8&#34;</code></span>, <span id="dt-f28de527c5cb6f35340c"><code>&#34;a8r8g8b8&#34;</code></span>, <span id="dt-fdcce013ff13758665a0"><code>&#34;r5g6b5&#34;</code></span>, <span id="dt-d8c614833543ba1651b6"><code>&#34;r5g5b5a1&#34;</code></span>, <span id="dt-423ddf8f673b5d8af92f"><code>&#34;r8g8b8&#34;</code></span>, <span id="dt-2c0e57000c9234535174"><code>&#34;x1r5g5b5&#34;</code></span>, <span id="dt-1a62f61821b3f8f17445"><code>&#34;x2r10g10b10&#34;</code></span>, <span id="dt-82ba4a902ba523ca0e38"><code>&#34;x8r8g8b8&#34;</code></span>, <span id="dt-68a25fc4649727182b0c"><code>&#34;x8b8g8r8&#34;</code></span>

<a id="dt-983cf9077065ba3509d0"></a>

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

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

<div id="dt-caa4651e36562d38868c">
<p style="white-space: pre-wrap">Primary display hardware node</p>
</div>

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

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

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

<div id="dt-7228265b7f4e1172e6ca">
<p style="white-space: pre-wrap">Display panel node</p>
</div>

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

### <code>allwinner&#44;pipeline</code> — not listed as required here

<div id="dt-f8693ac9d8af498c7e8e">
<p style="white-space: pre-wrap">Pipeline used by the framebuffer on Allwinner SoCs</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-cf06faec991ba85f8c8f"></a> <span id="dt-03bd453c94aecc4715ba"><code>&#34;de&#95;be0&#45;lcd0&#34;</code></span>, <span id="dt-26734b006d941f9bb35a"><code>&#34;de&#95;be0&#45;lcd0&#45;hdmi&#34;</code></span>, <span id="dt-3f65b2abbc7fad7264dc"><code>&#34;de&#95;be0&#45;lcd0&#45;tve0&#34;</code></span>, <span id="dt-02ea9b85387d70dfa7bb"><code>&#34;de&#95;be1&#45;lcd0&#34;</code></span>, <span id="dt-8ba144ce931e9a00d586"><code>&#34;de&#95;be1&#45;lcd1&#45;hdmi&#34;</code></span>, <span id="dt-acc0a1118e8c21835aa7"><code>&#34;de&#95;fe0&#45;de&#95;be0&#45;lcd0&#34;</code></span>, <span id="dt-8841f836ca4c35f4ae54"><code>&#34;de&#95;fe0&#45;de&#95;be0&#45;lcd0&#45;hdmi&#34;</code></span>, <span id="dt-4b1d59ad9fd23c17b9d4"><code>&#34;de&#95;fe0&#45;de&#95;be0&#45;lcd0&#45;tve0&#34;</code></span>, <span id="dt-60c14766621dc88a2962"><code>&#34;mixer0&#45;lcd0&#34;</code></span>, <span id="dt-d03d4e112a47032053e4"><code>&#34;mixer0&#45;lcd0&#45;hdmi&#34;</code></span>, <span id="dt-adca0f2fb50f09438036"><code>&#34;mixer1&#45;lcd1&#45;hdmi&#34;</code></span>, <span id="dt-55712d0a14975d485f5e"><code>&#34;mixer1&#45;lcd1&#45;tve&#34;</code></span>

<a id="dt-03f686ee622af6397e8b"></a>

### <code>amlogic&#44;pipeline</code> — not listed as required here

<div id="dt-25eabaf409655602d08c">
<p style="white-space: pre-wrap">Pipeline used by the framebuffer on Amlogic SoCs</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-193ac569c265e3f68410"></a> <span id="dt-3f6ae01143d0d59dadf0"><code>&#34;vpu&#45;cvbs&#34;</code></span>, <span id="dt-8d8d1dcfd131aee14f82"><code>&#34;vpu&#45;hdmi&#34;</code></span>

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

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

<a id="dt-13804dd2858bf4901074"></a>

### <code>&#94;&#91;a&#45;zA&#45;Z0&#45;9&#45;&#93;&#43;&#45;supply&#36;</code> — name matches this regular expression

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

<div id="dt-4d203ce8a82148d907ff">
<p style="white-space: pre-wrap">Regulators used by the framebuffer. These should be named according to the names in the device design.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#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>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8997992e7087b5549d86"><code>&#34;allwinner&#44;simple&#45;framebuffer&#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;allwinner&#44;pipeline&#34;</code></span>

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

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-05d9c37a1275e72a170e"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-e9866824361c1aee7933"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-d1402748b5f4caf0b18a"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-9b74ad9882646c4a5116"><code>&#34;amlogic&#44;simple&#45;framebuffer&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-ee96a18d4bb2a9d39bd9"></a> <span id="dt-96ee7f71687cd234a9f8"><code>&#34;amlogic&#44;pipeline&#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">/ {
    compatible = "foo";
    model = "foo";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;

    chosen {
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;1&gt;;
        framebuffer0: framebuffer@1d385000 {
            compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
            allwinner,pipeline = "de_be0-lcd0";
            reg = &lt;0x1d385000 3840000&gt;;
            width = &lt;1600&gt;;
            height = &lt;1200&gt;;
            stride = &lt;3200&gt;;
            format = "r5g6b5";
            clocks = &lt;&amp;ahb_gates 36&gt;, &lt;&amp;ahb_gates 43&gt;, &lt;&amp;ahb_gates 44&gt;;
            lcd-supply = &lt;&amp;reg_dc1sw&gt;;
            display = &lt;&amp;lcdc0&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</span></p>

<p id="dt-comment-1"><strong>Line 159:</strong> <span> The binding requires also reg, width, height, stride and format,</span></p>

<p id="dt-comment-2"><strong>Line 160:</strong> <span> but usually they will be filled by the bootloader.</span></p>

</details>
