1Simple Framebuffer
2
3A simple frame-buffer describes a frame-buffer setup by firmware or
4the bootloader, with the assumption that the display hardware has already
5been set up to scan out from the memory pointed to by the reg property.
6
7Since simplefb nodes represent runtime information they must be sub-nodes of
8the chosen node (*). Simplefb nodes must be named "framebuffer@<address>".
9
10If the devicetree contains nodes for the display hardware used by a simplefb,
11then the simplefb node must contain a property called "display", which
12contains a phandle pointing to the primary display hw node, so that the OS
13knows which simplefb to disable when handing over control to a driver for the
14real hardware. The bindings for the hw nodes must specify which node is
15considered the primary node.
16
17It is advised to add display# aliases to help the OS determine how to number
18things. If display# aliases are used, then if the simplefb node contains a
19"display" property then the /aliases/display# path must point to the display
20hw node the "display" property points to, otherwise it must point directly
21to the simplefb node.
22
23If a simplefb node represents the preferred console for user interaction,
24then the chosen node's stdout-path property should point to it, or to the
25primary display hw node, as with display# aliases. If display aliases are
26used then it should be set to the alias instead.
27
28It is advised that devicetree files contain pre-filled, disabled framebuffer
29nodes, so that the firmware only needs to update the mode information and
30enable them. This way if e.g. later on support for more display clocks get
31added, the simplefb nodes will already contain this info and the firmware
32does not need to be updated.
33
34If pre-filled framebuffer nodes are used, the firmware may need extra
35information to find the right node. In that case an extra platform specific
36compatible and platform specific properties should be used and documented,
37see e.g. simple-framebuffer-sunxi.txt .
38
39Required properties:
40- compatible: "simple-framebuffer"
41- reg: Should contain the location and size of the framebuffer memory.
42- width: The width of the framebuffer in pixels.
43- height: The height of the framebuffer in pixels.
44- stride: The number of bytes in each line of the framebuffer.
45- format: The format of the framebuffer surface. Valid values are:
46  - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
47  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
48
49Optional properties:
50- clocks : List of clocks used by the framebuffer. Clocks listed here
51           are expected to already be configured correctly. The OS must
52           ensure these clocks are not modified or disabled while the
53           simple framebuffer remains active.
54- display : phandle pointing to the primary display hardware node
55
56Example:
57
58aliases {
59	display0 = &lcdc0;
60}
61
62chosen {
63	framebuffer0: framebuffer@1d385000 {
64		compatible = "simple-framebuffer";
65		reg = <0x1d385000 (1600 * 1200 * 2)>;
66		width = <1600>;
67		height = <1200>;
68		stride = <(1600 * 2)>;
69		format = "r5g6b5";
70		clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
71		display = <&lcdc0>;
72	};
73	stdout-path = "display0";
74};
75
76soc@01c00000 {
77	lcdc0: lcdc@1c0c000 {
78		compatible = "allwinner,sun4i-a10-lcdc";
79		...
80	};
81};
82
83
84*) Older devicetree files may have a compatible = "simple-framebuffer" node
85in a different place, operating systems must first enumerate any compatible
86nodes found under chosen and then check for other compatible nodes.
87