mediatek,vcodec-decoder.yaml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/media/mediatek,vcodec-decoder.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek Video Decode Accelerator
  7. maintainers:
  8. - Yunfei Dong <yunfei.dong@mediatek.com>
  9. description: |+
  10. Mediatek Video Decode is the video decode hardware present in Mediatek
  11. SoCs which supports high resolution decoding functionalities.
  12. properties:
  13. compatible:
  14. enum:
  15. - mediatek,mt8173-vcodec-dec
  16. - mediatek,mt8183-vcodec-dec
  17. reg:
  18. minItems: 11
  19. maxItems: 11
  20. reg-names:
  21. items:
  22. - const: misc
  23. - const: ld
  24. - const: top
  25. - const: cm
  26. - const: ad
  27. - const: av
  28. - const: pp
  29. - const: hwd
  30. - const: hwq
  31. - const: hwb
  32. - const: hwg
  33. interrupts:
  34. maxItems: 1
  35. clocks:
  36. minItems: 1
  37. maxItems: 8
  38. clock-names:
  39. minItems: 1
  40. maxItems: 8
  41. assigned-clocks: true
  42. assigned-clock-parents: true
  43. assigned-clock-rates: true
  44. power-domains:
  45. maxItems: 1
  46. iommus:
  47. minItems: 1
  48. maxItems: 32
  49. description: |
  50. List of the hardware port in respective IOMMU block for current Socs.
  51. Refer to bindings/iommu/mediatek,iommu.yaml.
  52. mediatek,vpu:
  53. $ref: /schemas/types.yaml#/definitions/phandle
  54. description:
  55. Describes point to vpu.
  56. mediatek,scp:
  57. $ref: /schemas/types.yaml#/definitions/phandle
  58. description:
  59. Describes point to scp.
  60. mediatek,vdecsys:
  61. $ref: /schemas/types.yaml#/definitions/phandle
  62. description: Phandle to the vdecsys syscon node.
  63. required:
  64. - compatible
  65. - reg
  66. - interrupts
  67. - clocks
  68. - clock-names
  69. - iommus
  70. - mediatek,vdecsys
  71. allOf:
  72. - if:
  73. properties:
  74. compatible:
  75. contains:
  76. enum:
  77. - mediatek,mt8183-vcodec-dec
  78. then:
  79. required:
  80. - mediatek,scp
  81. properties:
  82. clocks:
  83. minItems: 1
  84. maxItems: 1
  85. clock-names:
  86. items:
  87. - const: vdec
  88. - if:
  89. properties:
  90. compatible:
  91. contains:
  92. enum:
  93. - mediatek,mt8173-vcodec-dec
  94. then:
  95. required:
  96. - mediatek,vpu
  97. properties:
  98. clocks:
  99. minItems: 8
  100. maxItems: 8
  101. clock-names:
  102. items:
  103. - const: vcodecpll
  104. - const: univpll_d2
  105. - const: clk_cci400_sel
  106. - const: vdec_sel
  107. - const: vdecpll
  108. - const: vencpll
  109. - const: venc_lt_sel
  110. - const: vdec_bus_clk_src
  111. additionalProperties: false
  112. examples:
  113. - |
  114. #include <dt-bindings/interrupt-controller/arm-gic.h>
  115. #include <dt-bindings/clock/mt8173-clk.h>
  116. #include <dt-bindings/memory/mt8173-larb-port.h>
  117. #include <dt-bindings/interrupt-controller/irq.h>
  118. #include <dt-bindings/power/mt8173-power.h>
  119. vcodec_dec: vcodec@16020000 {
  120. compatible = "mediatek,mt8173-vcodec-dec";
  121. reg = <0x16020000 0x1000>, /*VDEC_MISC*/
  122. <0x16021000 0x800>, /*VDEC_LD*/
  123. <0x16021800 0x800>, /*VDEC_TOP*/
  124. <0x16022000 0x1000>, /*VDEC_CM*/
  125. <0x16023000 0x1000>, /*VDEC_AD*/
  126. <0x16024000 0x1000>, /*VDEC_AV*/
  127. <0x16025000 0x1000>, /*VDEC_PP*/
  128. <0x16026800 0x800>, /*VP8_VD*/
  129. <0x16027000 0x800>, /*VP6_VD*/
  130. <0x16027800 0x800>, /*VP8_VL*/
  131. <0x16028400 0x400>; /*VP9_VD*/
  132. interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
  133. iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
  134. <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
  135. <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
  136. <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
  137. <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
  138. <&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
  139. <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
  140. <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
  141. mediatek,vpu = <&vpu>;
  142. mediatek,vdecsys = <&vdecsys>;
  143. power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
  144. clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
  145. <&topckgen CLK_TOP_UNIVPLL_D2>,
  146. <&topckgen CLK_TOP_CCI400_SEL>,
  147. <&topckgen CLK_TOP_VDEC_SEL>,
  148. <&topckgen CLK_TOP_VCODECPLL>,
  149. <&apmixedsys CLK_APMIXED_VENCPLL>,
  150. <&topckgen CLK_TOP_VENC_LT_SEL>,
  151. <&topckgen CLK_TOP_VCODECPLL_370P5>;
  152. clock-names = "vcodecpll",
  153. "univpll_d2",
  154. "clk_cci400_sel",
  155. "vdec_sel",
  156. "vdecpll",
  157. "vencpll",
  158. "venc_lt_sel",
  159. "vdec_bus_clk_src";
  160. assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>,
  161. <&topckgen CLK_TOP_CCI400_SEL>,
  162. <&topckgen CLK_TOP_VDEC_SEL>,
  163. <&apmixedsys CLK_APMIXED_VCODECPLL>,
  164. <&apmixedsys CLK_APMIXED_VENCPLL>;
  165. assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>,
  166. <&topckgen CLK_TOP_UNIVPLL_D2>,
  167. <&topckgen CLK_TOP_VCODECPLL>;
  168. assigned-clock-rates = <0>, <0>, <0>, <1482000000>, <800000000>;
  169. };