Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/display/simple-framebuffer.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Simple Framebuffer Device Tree Bindings
0008 
0009 maintainers:
0010   - Hans de Goede <hdegoede@redhat.com>
0011 
0012 description: |+
0013   A simple frame-buffer describes a frame-buffer setup by firmware or
0014   the bootloader, with the assumption that the display hardware has
0015   already been set up to scan out from the memory pointed to by the
0016   reg property.
0017 
0018   Since simplefb nodes represent runtime information they must be
0019   sub-nodes of the chosen node (*). Simplefb nodes must be named
0020   framebuffer@<address>.
0021 
0022   If the devicetree contains nodes for the display hardware used by a
0023   simplefb, then the simplefb node must contain a property called
0024   display, which contains a phandle pointing to the primary display
0025   hw node, so that the OS knows which simplefb to disable when handing
0026   over control to a driver for the real hardware. The bindings for the
0027   hw nodes must specify which node is considered the primary node.
0028 
0029   It is advised to add display# aliases to help the OS determine how
0030   to number things. If display# aliases are used, then if the simplefb
0031   node contains a display property then the /aliases/display# path
0032   must point to the display hw node the display property points to,
0033   otherwise it must point directly to the simplefb node.
0034 
0035   If a simplefb node represents the preferred console for user
0036   interaction, then the chosen node stdout-path property should point
0037   to it, or to the primary display hw node, as with display#
0038   aliases. If display aliases are used then it should be set to the
0039   alias instead.
0040 
0041   It is advised that devicetree files contain pre-filled, disabled
0042   framebuffer nodes, so that the firmware only needs to update the
0043   mode information and enable them. This way if e.g. later on support
0044   for more display clocks get added, the simplefb nodes will already
0045   contain this info and the firmware does not need to be updated.
0046 
0047   If pre-filled framebuffer nodes are used, the firmware may need
0048   extra information to find the right node. In that case an extra
0049   platform specific compatible and platform specific properties should
0050   be used and documented.
0051 
0052 properties:
0053   compatible:
0054     oneOf:
0055       - items:
0056           - enum:
0057               - apple,simple-framebuffer
0058               - allwinner,simple-framebuffer
0059               - amlogic,simple-framebuffer
0060           - const: simple-framebuffer
0061       - const: simple-framebuffer
0062 
0063   reg:
0064     description: Location and size of the framebuffer memory
0065 
0066   clocks:
0067     description: List of clocks used by the framebuffer.
0068 
0069   power-domains:
0070     description: List of power domains used by the framebuffer.
0071 
0072   width:
0073     $ref: /schemas/types.yaml#/definitions/uint32
0074     description: Width of the framebuffer in pixels
0075 
0076   height:
0077     $ref: /schemas/types.yaml#/definitions/uint32
0078     description: Height of the framebuffer in pixels
0079 
0080   stride:
0081     $ref: /schemas/types.yaml#/definitions/uint32
0082     description: Number of bytes of a line in the framebuffer
0083 
0084   format:
0085     description: >
0086       Format of the framebuffer:
0087         * `a1r5g5b5` - 16-bit pixels, d[15]=a, d[14:10]=r, d[9:5]=g, d[4:0]=b
0088         * `a2r10g10b10` - 32-bit pixels, d[31:30]=a, d[29:20]=r, d[19:10]=g, d[9:0]=b
0089         * `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r
0090         * `a8r8g8b8` - 32-bit pixels, d[31:24]=a, d[23:16]=r, d[15:8]=g, d[7:0]=b
0091         * `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b
0092         * `r5g5b5a1` - 16-bit pixels, d[15:11]=r, d[10:6]=g, d[5:1]=b d[1:0]=a
0093         * `r8g8b8` - 24-bit pixels, d[23:16]=r, d[15:8]=g, d[7:0]=b
0094         * `x1r5g5b5` - 16-bit pixels, d[14:10]=r, d[9:5]=g, d[4:0]=b
0095         * `x2r10g10b10` - 32-bit pixels, d[29:20]=r, d[19:10]=g, d[9:0]=b
0096         * `x8r8g8b8` - 32-bit pixels, d[23:16]=r, d[15:8]=g, d[7:0]=b
0097     enum:
0098       - a1r5g5b5
0099       - a2r10g10b10
0100       - a8b8g8r8
0101       - a8r8g8b8
0102       - r5g6b5
0103       - r5g5b5a1
0104       - r8g8b8
0105       - x1r5g5b5
0106       - x2r10g10b10
0107       - x8r8g8b8
0108 
0109   display:
0110     $ref: /schemas/types.yaml#/definitions/phandle
0111     description: Primary display hardware node
0112 
0113   allwinner,pipeline:
0114     description: Pipeline used by the framebuffer on Allwinner SoCs
0115     enum:
0116       - de_be0-lcd0
0117       - de_be0-lcd0-hdmi
0118       - de_be0-lcd0-tve0
0119       - de_be1-lcd0
0120       - de_be1-lcd1-hdmi
0121       - de_fe0-de_be0-lcd0
0122       - de_fe0-de_be0-lcd0-hdmi
0123       - de_fe0-de_be0-lcd0-tve0
0124       - mixer0-lcd0
0125       - mixer0-lcd0-hdmi
0126       - mixer1-lcd1-hdmi
0127       - mixer1-lcd1-tve
0128 
0129   amlogic,pipeline:
0130     description: Pipeline used by the framebuffer on Amlogic SoCs
0131     enum:
0132       - vpu-cvbs
0133       - vpu-hdmi
0134 
0135 patternProperties:
0136   "^[a-zA-Z0-9-]+-supply$":
0137     $ref: /schemas/types.yaml#/definitions/phandle
0138     description:
0139       Regulators used by the framebuffer. These should be named
0140       according to the names in the device design.
0141 
0142 required:
0143   # The binding requires also reg, width, height, stride and format,
0144   # but usually they will be filled by the bootloader.
0145   - compatible
0146 
0147 allOf:
0148   - if:
0149       properties:
0150         compatible:
0151           contains:
0152             const: allwinner,simple-framebuffer
0153 
0154     then:
0155       required:
0156         - allwinner,pipeline
0157 
0158   - if:
0159       properties:
0160         compatible:
0161           contains:
0162             const: amlogic,simple-framebuffer
0163 
0164     then:
0165       required:
0166         - amlogic,pipeline
0167 
0168 
0169 additionalProperties: false
0170 
0171 examples:
0172   - |
0173     / {
0174         compatible = "foo";
0175         model = "foo";
0176         #address-cells = <1>;
0177         #size-cells = <1>;
0178 
0179         chosen {
0180             #address-cells = <1>;
0181             #size-cells = <1>;
0182             framebuffer0: framebuffer@1d385000 {
0183                 compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
0184                 allwinner,pipeline = "de_be0-lcd0";
0185                 reg = <0x1d385000 3840000>;
0186                 width = <1600>;
0187                 height = <1200>;
0188                 stride = <3200>;
0189                 format = "r5g6b5";
0190                 clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
0191                 lcd-supply = <&reg_dc1sw>;
0192                 display = <&lcdc0>;
0193             };
0194         };
0195     };
0196 
0197 ...