1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2*c66ec88fSEmmanuel Vadot%YAML 1.2 3*c66ec88fSEmmanuel Vadot--- 4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/display/simple-framebuffer.yaml# 5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadottitle: Simple Framebuffer Device Tree Bindings 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel Vadotmaintainers: 10*c66ec88fSEmmanuel Vadot - Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> 11*c66ec88fSEmmanuel Vadot - Hans de Goede <hdegoede@redhat.com> 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel Vadotdescription: |+ 14*c66ec88fSEmmanuel Vadot A simple frame-buffer describes a frame-buffer setup by firmware or 15*c66ec88fSEmmanuel Vadot the bootloader, with the assumption that the display hardware has 16*c66ec88fSEmmanuel Vadot already been set up to scan out from the memory pointed to by the 17*c66ec88fSEmmanuel Vadot reg property. 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel Vadot Since simplefb nodes represent runtime information they must be 20*c66ec88fSEmmanuel Vadot sub-nodes of the chosen node (*). Simplefb nodes must be named 21*c66ec88fSEmmanuel Vadot framebuffer@<address>. 22*c66ec88fSEmmanuel Vadot 23*c66ec88fSEmmanuel Vadot If the devicetree contains nodes for the display hardware used by a 24*c66ec88fSEmmanuel Vadot simplefb, then the simplefb node must contain a property called 25*c66ec88fSEmmanuel Vadot display, which contains a phandle pointing to the primary display 26*c66ec88fSEmmanuel Vadot hw node, so that the OS knows which simplefb to disable when handing 27*c66ec88fSEmmanuel Vadot over control to a driver for the real hardware. The bindings for the 28*c66ec88fSEmmanuel Vadot hw nodes must specify which node is considered the primary node. 29*c66ec88fSEmmanuel Vadot 30*c66ec88fSEmmanuel Vadot It is advised to add display# aliases to help the OS determine how 31*c66ec88fSEmmanuel Vadot to number things. If display# aliases are used, then if the simplefb 32*c66ec88fSEmmanuel Vadot node contains a display property then the /aliases/display# path 33*c66ec88fSEmmanuel Vadot must point to the display hw node the display property points to, 34*c66ec88fSEmmanuel Vadot otherwise it must point directly to the simplefb node. 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel Vadot If a simplefb node represents the preferred console for user 37*c66ec88fSEmmanuel Vadot interaction, then the chosen node stdout-path property should point 38*c66ec88fSEmmanuel Vadot to it, or to the primary display hw node, as with display# 39*c66ec88fSEmmanuel Vadot aliases. If display aliases are used then it should be set to the 40*c66ec88fSEmmanuel Vadot alias instead. 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot It is advised that devicetree files contain pre-filled, disabled 43*c66ec88fSEmmanuel Vadot framebuffer nodes, so that the firmware only needs to update the 44*c66ec88fSEmmanuel Vadot mode information and enable them. This way if e.g. later on support 45*c66ec88fSEmmanuel Vadot for more display clocks get added, the simplefb nodes will already 46*c66ec88fSEmmanuel Vadot contain this info and the firmware does not need to be updated. 47*c66ec88fSEmmanuel Vadot 48*c66ec88fSEmmanuel Vadot If pre-filled framebuffer nodes are used, the firmware may need 49*c66ec88fSEmmanuel Vadot extra information to find the right node. In that case an extra 50*c66ec88fSEmmanuel Vadot platform specific compatible and platform specific properties should 51*c66ec88fSEmmanuel Vadot be used and documented. 52*c66ec88fSEmmanuel Vadot 53*c66ec88fSEmmanuel Vadotproperties: 54*c66ec88fSEmmanuel Vadot compatible: 55*c66ec88fSEmmanuel Vadot items: 56*c66ec88fSEmmanuel Vadot - enum: 57*c66ec88fSEmmanuel Vadot - allwinner,simple-framebuffer 58*c66ec88fSEmmanuel Vadot - amlogic,simple-framebuffer 59*c66ec88fSEmmanuel Vadot - const: simple-framebuffer 60*c66ec88fSEmmanuel Vadot 61*c66ec88fSEmmanuel Vadot reg: 62*c66ec88fSEmmanuel Vadot description: Location and size of the framebuffer memory 63*c66ec88fSEmmanuel Vadot 64*c66ec88fSEmmanuel Vadot clocks: 65*c66ec88fSEmmanuel Vadot description: List of clocks used by the framebuffer. 66*c66ec88fSEmmanuel Vadot 67*c66ec88fSEmmanuel Vadot power-domains: 68*c66ec88fSEmmanuel Vadot description: List of power domains used by the framebuffer. 69*c66ec88fSEmmanuel Vadot 70*c66ec88fSEmmanuel Vadot width: 71*c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 72*c66ec88fSEmmanuel Vadot description: Width of the framebuffer in pixels 73*c66ec88fSEmmanuel Vadot 74*c66ec88fSEmmanuel Vadot height: 75*c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 76*c66ec88fSEmmanuel Vadot description: Height of the framebuffer in pixels 77*c66ec88fSEmmanuel Vadot 78*c66ec88fSEmmanuel Vadot stride: 79*c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 80*c66ec88fSEmmanuel Vadot description: Number of bytes of a line in the framebuffer 81*c66ec88fSEmmanuel Vadot 82*c66ec88fSEmmanuel Vadot format: 83*c66ec88fSEmmanuel Vadot description: > 84*c66ec88fSEmmanuel Vadot Format of the framebuffer: 85*c66ec88fSEmmanuel Vadot * `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r 86*c66ec88fSEmmanuel Vadot * `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b 87*c66ec88fSEmmanuel Vadot enum: 88*c66ec88fSEmmanuel Vadot - a8b8g8r8 89*c66ec88fSEmmanuel Vadot - r5g6b5 90*c66ec88fSEmmanuel Vadot 91*c66ec88fSEmmanuel Vadot display: 92*c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 93*c66ec88fSEmmanuel Vadot description: Primary display hardware node 94*c66ec88fSEmmanuel Vadot 95*c66ec88fSEmmanuel Vadot allwinner,pipeline: 96*c66ec88fSEmmanuel Vadot description: Pipeline used by the framebuffer on Allwinner SoCs 97*c66ec88fSEmmanuel Vadot enum: 98*c66ec88fSEmmanuel Vadot - de_be0-lcd0 99*c66ec88fSEmmanuel Vadot - de_be0-lcd0-hdmi 100*c66ec88fSEmmanuel Vadot - de_be0-lcd0-tve0 101*c66ec88fSEmmanuel Vadot - de_be1-lcd0 102*c66ec88fSEmmanuel Vadot - de_be1-lcd1-hdmi 103*c66ec88fSEmmanuel Vadot - de_fe0-de_be0-lcd0 104*c66ec88fSEmmanuel Vadot - de_fe0-de_be0-lcd0-hdmi 105*c66ec88fSEmmanuel Vadot - de_fe0-de_be0-lcd0-tve0 106*c66ec88fSEmmanuel Vadot - mixer0-lcd0 107*c66ec88fSEmmanuel Vadot - mixer0-lcd0-hdmi 108*c66ec88fSEmmanuel Vadot - mixer1-lcd1-hdmi 109*c66ec88fSEmmanuel Vadot - mixer1-lcd1-tve 110*c66ec88fSEmmanuel Vadot 111*c66ec88fSEmmanuel Vadot amlogic,pipeline: 112*c66ec88fSEmmanuel Vadot description: Pipeline used by the framebuffer on Amlogic SoCs 113*c66ec88fSEmmanuel Vadot enum: 114*c66ec88fSEmmanuel Vadot - vpu-cvbs 115*c66ec88fSEmmanuel Vadot - vpu-hdmi 116*c66ec88fSEmmanuel Vadot 117*c66ec88fSEmmanuel VadotpatternProperties: 118*c66ec88fSEmmanuel Vadot "^[a-zA-Z0-9-]+-supply$": 119*c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 120*c66ec88fSEmmanuel Vadot description: 121*c66ec88fSEmmanuel Vadot Regulators used by the framebuffer. These should be named 122*c66ec88fSEmmanuel Vadot according to the names in the device design. 123*c66ec88fSEmmanuel Vadot 124*c66ec88fSEmmanuel Vadotrequired: 125*c66ec88fSEmmanuel Vadot # The binding requires also reg, width, height, stride and format, 126*c66ec88fSEmmanuel Vadot # but usually they will be filled by the bootloader. 127*c66ec88fSEmmanuel Vadot - compatible 128*c66ec88fSEmmanuel Vadot 129*c66ec88fSEmmanuel VadotallOf: 130*c66ec88fSEmmanuel Vadot - if: 131*c66ec88fSEmmanuel Vadot properties: 132*c66ec88fSEmmanuel Vadot compatible: 133*c66ec88fSEmmanuel Vadot contains: 134*c66ec88fSEmmanuel Vadot const: allwinner,simple-framebuffer 135*c66ec88fSEmmanuel Vadot 136*c66ec88fSEmmanuel Vadot then: 137*c66ec88fSEmmanuel Vadot required: 138*c66ec88fSEmmanuel Vadot - allwinner,pipeline 139*c66ec88fSEmmanuel Vadot 140*c66ec88fSEmmanuel Vadot - if: 141*c66ec88fSEmmanuel Vadot properties: 142*c66ec88fSEmmanuel Vadot compatible: 143*c66ec88fSEmmanuel Vadot contains: 144*c66ec88fSEmmanuel Vadot const: amlogic,simple-framebuffer 145*c66ec88fSEmmanuel Vadot 146*c66ec88fSEmmanuel Vadot then: 147*c66ec88fSEmmanuel Vadot required: 148*c66ec88fSEmmanuel Vadot - amlogic,pipeline 149*c66ec88fSEmmanuel Vadot 150*c66ec88fSEmmanuel Vadot 151*c66ec88fSEmmanuel VadotadditionalProperties: false 152*c66ec88fSEmmanuel Vadot 153*c66ec88fSEmmanuel Vadotexamples: 154*c66ec88fSEmmanuel Vadot - | 155*c66ec88fSEmmanuel Vadot / { 156*c66ec88fSEmmanuel Vadot compatible = "foo"; 157*c66ec88fSEmmanuel Vadot model = "foo"; 158*c66ec88fSEmmanuel Vadot #address-cells = <1>; 159*c66ec88fSEmmanuel Vadot #size-cells = <1>; 160*c66ec88fSEmmanuel Vadot 161*c66ec88fSEmmanuel Vadot chosen { 162*c66ec88fSEmmanuel Vadot #address-cells = <1>; 163*c66ec88fSEmmanuel Vadot #size-cells = <1>; 164*c66ec88fSEmmanuel Vadot framebuffer0: framebuffer@1d385000 { 165*c66ec88fSEmmanuel Vadot compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; 166*c66ec88fSEmmanuel Vadot allwinner,pipeline = "de_be0-lcd0"; 167*c66ec88fSEmmanuel Vadot reg = <0x1d385000 3840000>; 168*c66ec88fSEmmanuel Vadot width = <1600>; 169*c66ec88fSEmmanuel Vadot height = <1200>; 170*c66ec88fSEmmanuel Vadot stride = <3200>; 171*c66ec88fSEmmanuel Vadot format = "r5g6b5"; 172*c66ec88fSEmmanuel Vadot clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>; 173*c66ec88fSEmmanuel Vadot lcd-supply = <®_dc1sw>; 174*c66ec88fSEmmanuel Vadot display = <&lcdc0>; 175*c66ec88fSEmmanuel Vadot }; 176*c66ec88fSEmmanuel Vadot }; 177*c66ec88fSEmmanuel Vadot }; 178*c66ec88fSEmmanuel Vadot 179*c66ec88fSEmmanuel Vadot... 180