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