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