aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-11-14 07:26:51 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-14 08:28:52 -0500
commit9bb5b20f5d983e98d9a1cc7b7af5877b0f1c791b (patch)
tree5c40291d7d2869516459dbc874d9a95916a48ff6
parentfc219bfd5b2e488e3c246990869cfde5ca235c89 (diff)
dt-bindings: simplefb: Specify node location and handoff related properties
Since simplefb nodes do not relate directly to hw typically they have been placed in the root of the devicetree. As the represent runtime information having them as sub-nodes of /chosen is more logical, specify this. Also specify when to set the chosen stdout-path property to a simplefb node. For reliable handover to a hardware specific driver, that driver needs to know which simplefb to unregister when taking over, specify how the hw driver can find the matching simplefb node. Last add some advice on how to fill and use simplefb nodes from a firmware pov. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--Documentation/devicetree/bindings/video/simple-framebuffer.txt58
1 files changed, 57 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
index 8f35718f4f5b..f8fb7e6e5609 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
@@ -4,6 +4,40 @@ A simple frame-buffer describes a frame-buffer setup by firmware or
4the bootloader, with the assumption that the display hardware has already 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. 5been set up to scan out from the memory pointed to by the reg property.
6 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, they should be named
35"framebuffer#-<output>", e.g. "framebuffer0-hdmi". The output should be
36included in the name since different outputs typically require different
37clocks and the clocks are part of the pre-populated nodes. The firmware must
38rename the nodes to the standard "framebuffer@<address>" name using the
39runtime chosen address when enabling the nodes.
40
7Required properties: 41Required properties:
8- compatible: "simple-framebuffer" 42- compatible: "simple-framebuffer"
9- reg: Should contain the location and size of the framebuffer memory. 43- reg: Should contain the location and size of the framebuffer memory.
@@ -19,14 +53,36 @@ Optional properties:
19 are expected to already be configured correctly. The OS must 53 are expected to already be configured correctly. The OS must
20 ensure these clocks are not modified or disabled while the 54 ensure these clocks are not modified or disabled while the
21 simple framebuffer remains active. 55 simple framebuffer remains active.
56- display : phandle pointing to the primary display hardware node
22 57
23Example: 58Example:
24 59
25 framebuffer { 60aliases {
61 display0 = &lcdc0;
62}
63
64chosen {
65 framebuffer0: framebuffer@1d385000 {
26 compatible = "simple-framebuffer"; 66 compatible = "simple-framebuffer";
27 reg = <0x1d385000 (1600 * 1200 * 2)>; 67 reg = <0x1d385000 (1600 * 1200 * 2)>;
28 width = <1600>; 68 width = <1600>;
29 height = <1200>; 69 height = <1200>;
30 stride = <(1600 * 2)>; 70 stride = <(1600 * 2)>;
31 format = "r5g6b5"; 71 format = "r5g6b5";
72 clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
73 display = <&lcdc0>;
74 };
75 stdout-path = "display0";
76};
77
78soc@01c00000 {
79 lcdc0: lcdc@1c0c000 {
80 compatible = "allwinner,sun4i-a10-lcdc";
81 ...
32 }; 82 };
83};
84
85
86*) Older devicetree files may have a compatible = "simple-framebuffer" node
87in a different place, operating systems must first enumerate any compatible
88nodes found under chosen and then check for other compatible nodes.