mediatek,ethdr.yaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/display/mediatek/mediatek,ethdr.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek Ethdr Device
  7. maintainers:
  8. - Chun-Kuang Hu <chunkuang.hu@kernel.org>
  9. - Philipp Zabel <p.zabel@pengutronix.de>
  10. description:
  11. ETHDR (ET High Dynamic Range) is a MediaTek internal HDR engine and is
  12. designed for HDR video and graphics conversion in the external display path.
  13. It handles multiple HDR input types and performs tone mapping, color
  14. space/color format conversion, and then combine different layers,
  15. output the required HDR or SDR signal to the subsequent display path.
  16. This engine is composed of two video frontends, two graphic frontends,
  17. one video backend and a mixer. ETHDR has two DMA function blocks, DS and ADL.
  18. These two function blocks read the pre-programmed registers from DRAM and
  19. set them to HW in the v-blanking period.
  20. properties:
  21. compatible:
  22. oneOf:
  23. - const: mediatek,mt8195-disp-ethdr
  24. - items:
  25. - const: mediatek,mt8188-disp-ethdr
  26. - const: mediatek,mt8195-disp-ethdr
  27. reg:
  28. maxItems: 7
  29. reg-names:
  30. items:
  31. - const: mixer
  32. - const: vdo_fe0
  33. - const: vdo_fe1
  34. - const: gfx_fe0
  35. - const: gfx_fe1
  36. - const: vdo_be
  37. - const: adl_ds
  38. interrupts:
  39. maxItems: 1
  40. iommus:
  41. minItems: 1
  42. maxItems: 2
  43. clocks:
  44. items:
  45. - description: mixer clock
  46. - description: video frontend 0 clock
  47. - description: video frontend 1 clock
  48. - description: graphic frontend 0 clock
  49. - description: graphic frontend 1 clock
  50. - description: video backend clock
  51. - description: autodownload and menuload clock
  52. - description: video frontend 0 async clock
  53. - description: video frontend 1 async clock
  54. - description: graphic frontend 0 async clock
  55. - description: graphic frontend 1 async clock
  56. - description: video backend async clock
  57. - description: ethdr top clock
  58. clock-names:
  59. items:
  60. - const: mixer
  61. - const: vdo_fe0
  62. - const: vdo_fe1
  63. - const: gfx_fe0
  64. - const: gfx_fe1
  65. - const: vdo_be
  66. - const: adl_ds
  67. - const: vdo_fe0_async
  68. - const: vdo_fe1_async
  69. - const: gfx_fe0_async
  70. - const: gfx_fe1_async
  71. - const: vdo_be_async
  72. - const: ethdr_top
  73. power-domains:
  74. maxItems: 1
  75. resets:
  76. items:
  77. - description: video frontend 0 async reset
  78. - description: video frontend 1 async reset
  79. - description: graphic frontend 0 async reset
  80. - description: graphic frontend 1 async reset
  81. - description: video backend async reset
  82. reset-names:
  83. items:
  84. - const: vdo_fe0_async
  85. - const: vdo_fe1_async
  86. - const: gfx_fe0_async
  87. - const: gfx_fe1_async
  88. - const: vdo_be_async
  89. mediatek,gce-client-reg:
  90. $ref: /schemas/types.yaml#/definitions/phandle-array
  91. minItems: 1
  92. maxItems: 7
  93. description: The register of display function block to be set by gce.
  94. There are 4 arguments in this property, gce node, subsys id, offset and
  95. register size. The subsys id is defined in the gce header of each chips
  96. include/dt-bindings/gce/<chip>-gce.h, mapping to the register of display
  97. function block.
  98. ports:
  99. $ref: /schemas/graph.yaml#/properties/ports
  100. description:
  101. Input and output ports can have multiple endpoints, each of those
  102. connects to either the primary, secondary, etc, display pipeline.
  103. properties:
  104. port@0:
  105. $ref: /schemas/graph.yaml#/properties/port
  106. description: ETHDR input, usually from one of the MERGE blocks.
  107. port@1:
  108. $ref: /schemas/graph.yaml#/properties/port
  109. description:
  110. ETHDR output to the input of the next desired component in the
  111. display pipeline, for example one of the available MERGE blocks,
  112. or others.
  113. required:
  114. - port@0
  115. - port@1
  116. required:
  117. - compatible
  118. - reg
  119. - clocks
  120. - clock-names
  121. - interrupts
  122. - power-domains
  123. - resets
  124. - mediatek,gce-client-reg
  125. additionalProperties: false
  126. examples:
  127. - |
  128. #include <dt-bindings/interrupt-controller/arm-gic.h>
  129. #include <dt-bindings/clock/mt8195-clk.h>
  130. #include <dt-bindings/gce/mt8195-gce.h>
  131. #include <dt-bindings/memory/mt8195-memory-port.h>
  132. #include <dt-bindings/power/mt8195-power.h>
  133. #include <dt-bindings/reset/mt8195-resets.h>
  134. soc {
  135. #address-cells = <2>;
  136. #size-cells = <2>;
  137. hdr-engine@1c114000 {
  138. compatible = "mediatek,mt8195-disp-ethdr";
  139. reg = <0 0x1c114000 0 0x1000>,
  140. <0 0x1c115000 0 0x1000>,
  141. <0 0x1c117000 0 0x1000>,
  142. <0 0x1c119000 0 0x1000>,
  143. <0 0x1c11a000 0 0x1000>,
  144. <0 0x1c11b000 0 0x1000>,
  145. <0 0x1c11c000 0 0x1000>;
  146. reg-names = "mixer", "vdo_fe0", "vdo_fe1", "gfx_fe0", "gfx_fe1",
  147. "vdo_be", "adl_ds";
  148. mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0x4000 0x1000>,
  149. <&gce0 SUBSYS_1c11XXXX 0x5000 0x1000>,
  150. <&gce0 SUBSYS_1c11XXXX 0x7000 0x1000>,
  151. <&gce0 SUBSYS_1c11XXXX 0x9000 0x1000>,
  152. <&gce0 SUBSYS_1c11XXXX 0xa000 0x1000>,
  153. <&gce0 SUBSYS_1c11XXXX 0xb000 0x1000>,
  154. <&gce0 SUBSYS_1c11XXXX 0xc000 0x1000>;
  155. clocks = <&vdosys1 CLK_VDO1_DISP_MIXER>,
  156. <&vdosys1 CLK_VDO1_HDR_VDO_FE0>,
  157. <&vdosys1 CLK_VDO1_HDR_VDO_FE1>,
  158. <&vdosys1 CLK_VDO1_HDR_GFX_FE0>,
  159. <&vdosys1 CLK_VDO1_HDR_GFX_FE1>,
  160. <&vdosys1 CLK_VDO1_HDR_VDO_BE>,
  161. <&vdosys1 CLK_VDO1_26M_SLOW>,
  162. <&vdosys1 CLK_VDO1_HDR_VDO_FE0_DL_ASYNC>,
  163. <&vdosys1 CLK_VDO1_HDR_VDO_FE1_DL_ASYNC>,
  164. <&vdosys1 CLK_VDO1_HDR_GFX_FE0_DL_ASYNC>,
  165. <&vdosys1 CLK_VDO1_HDR_GFX_FE1_DL_ASYNC>,
  166. <&vdosys1 CLK_VDO1_HDR_VDO_BE_DL_ASYNC>,
  167. <&topckgen CLK_TOP_ETHDR>;
  168. clock-names = "mixer", "vdo_fe0", "vdo_fe1", "gfx_fe0", "gfx_fe1",
  169. "vdo_be", "adl_ds", "vdo_fe0_async", "vdo_fe1_async",
  170. "gfx_fe0_async", "gfx_fe1_async","vdo_be_async",
  171. "ethdr_top";
  172. power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
  173. iommus = <&iommu_vpp M4U_PORT_L3_HDR_DS>,
  174. <&iommu_vpp M4U_PORT_L3_HDR_ADL>;
  175. interrupts = <GIC_SPI 517 IRQ_TYPE_LEVEL_HIGH 0>; /* disp mixer */
  176. resets = <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_FE0_DL_ASYNC>,
  177. <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_FE1_DL_ASYNC>,
  178. <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_GFX_FE0_DL_ASYNC>,
  179. <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_GFX_FE1_DL_ASYNC>,
  180. <&vdosys1 MT8195_VDOSYS1_SW1_RST_B_HDR_VDO_BE_DL_ASYNC>;
  181. reset-names = "vdo_fe0_async", "vdo_fe1_async", "gfx_fe0_async",
  182. "gfx_fe1_async", "vdo_be_async";
  183. };
  184. };
  185. ...