simple-framebuffer.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Simple Framebuffer
  2. A simple frame-buffer describes a frame-buffer setup by firmware or
  3. the bootloader, with the assumption that the display hardware has already
  4. been set up to scan out from the memory pointed to by the reg property.
  5. Since simplefb nodes represent runtime information they must be sub-nodes of
  6. the chosen node (*). Simplefb nodes must be named "framebuffer@<address>".
  7. If the devicetree contains nodes for the display hardware used by a simplefb,
  8. then the simplefb node must contain a property called "display", which
  9. contains a phandle pointing to the primary display hw node, so that the OS
  10. knows which simplefb to disable when handing over control to a driver for the
  11. real hardware. The bindings for the hw nodes must specify which node is
  12. considered the primary node.
  13. It is advised to add display# aliases to help the OS determine how to number
  14. things. If display# aliases are used, then if the simplefb node contains a
  15. "display" property then the /aliases/display# path must point to the display
  16. hw node the "display" property points to, otherwise it must point directly
  17. to the simplefb node.
  18. If a simplefb node represents the preferred console for user interaction,
  19. then the chosen node's stdout-path property should point to it, or to the
  20. primary display hw node, as with display# aliases. If display aliases are
  21. used then it should be set to the alias instead.
  22. It is advised that devicetree files contain pre-filled, disabled framebuffer
  23. nodes, so that the firmware only needs to update the mode information and
  24. enable them. This way if e.g. later on support for more display clocks get
  25. added, the simplefb nodes will already contain this info and the firmware
  26. does not need to be updated.
  27. If pre-filled framebuffer nodes are used, the firmware may need extra
  28. information to find the right node. In that case an extra platform specific
  29. compatible and platform specific properties should be used and documented,
  30. see e.g. simple-framebuffer-sunxi.txt .
  31. Required properties:
  32. - compatible: "simple-framebuffer"
  33. - reg: Should contain the location and size of the framebuffer memory.
  34. - width: The width of the framebuffer in pixels.
  35. - height: The height of the framebuffer in pixels.
  36. - stride: The number of bytes in each line of the framebuffer.
  37. - format: The format of the framebuffer surface. Valid values are:
  38. - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
  39. - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
  40. Optional properties:
  41. - clocks : List of clocks used by the framebuffer. Clocks listed here
  42. are expected to already be configured correctly. The OS must
  43. ensure these clocks are not modified or disabled while the
  44. simple framebuffer remains active.
  45. - display : phandle pointing to the primary display hardware node
  46. Example:
  47. aliases {
  48. display0 = &lcdc0;
  49. }
  50. chosen {
  51. framebuffer0: framebuffer@1d385000 {
  52. compatible = "simple-framebuffer";
  53. reg = <0x1d385000 (1600 * 1200 * 2)>;
  54. width = <1600>;
  55. height = <1200>;
  56. stride = <(1600 * 2)>;
  57. format = "r5g6b5";
  58. clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
  59. display = <&lcdc0>;
  60. };
  61. stdout-path = "display0";
  62. };
  63. soc@01c00000 {
  64. lcdc0: lcdc@1c0c000 {
  65. compatible = "allwinner,sun4i-a10-lcdc";
  66. ...
  67. };
  68. };
  69. *) Older devicetree files may have a compatible = "simple-framebuffer" node
  70. in a different place, operating systems must first enumerate any compatible
  71. nodes found under chosen and then check for other compatible nodes.