mediatek,vcodec-encoder.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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-encoder.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek Video Encode Accelerator
  7. maintainers:
  8. - Yunfei Dong <yunfei.dong@mediatek.com>
  9. description: |+
  10. Mediatek Video Encode is the video encode hardware present in Mediatek
  11. SoCs which supports high resolution encoding functionalities.
  12. properties:
  13. compatible:
  14. oneOf:
  15. - items:
  16. - enum:
  17. - mediatek,mt8173-vcodec-enc-vp8
  18. - mediatek,mt8173-vcodec-enc
  19. - mediatek,mt8183-vcodec-enc
  20. - mediatek,mt8188-vcodec-enc
  21. - mediatek,mt8192-vcodec-enc
  22. - mediatek,mt8195-vcodec-enc
  23. - items:
  24. - const: mediatek,mt8186-vcodec-enc
  25. - const: mediatek,mt8183-vcodec-enc
  26. reg:
  27. maxItems: 1
  28. interrupts:
  29. maxItems: 1
  30. clocks:
  31. minItems: 1
  32. maxItems: 5
  33. clock-names:
  34. minItems: 1
  35. maxItems: 5
  36. assigned-clocks: true
  37. assigned-clock-parents: true
  38. iommus:
  39. minItems: 1
  40. maxItems: 32
  41. description: |
  42. List of the hardware port in respective IOMMU block for current Socs.
  43. Refer to bindings/iommu/mediatek,iommu.yaml.
  44. mediatek,vpu:
  45. $ref: /schemas/types.yaml#/definitions/phandle
  46. description:
  47. Describes point to vpu.
  48. mediatek,scp:
  49. $ref: /schemas/types.yaml#/definitions/phandle
  50. description:
  51. Describes point to scp.
  52. power-domains:
  53. maxItems: 1
  54. "#address-cells":
  55. const: 2
  56. "#size-cells":
  57. const: 2
  58. required:
  59. - compatible
  60. - reg
  61. - interrupts
  62. - clocks
  63. - clock-names
  64. - iommus
  65. - assigned-clocks
  66. - assigned-clock-parents
  67. allOf:
  68. - if:
  69. properties:
  70. compatible:
  71. contains:
  72. enum:
  73. - mediatek,mt8183-vcodec-enc
  74. - mediatek,mt8188-vcodec-enc
  75. - mediatek,mt8192-vcodec-enc
  76. - mediatek,mt8195-vcodec-enc
  77. then:
  78. required:
  79. - mediatek,scp
  80. - if:
  81. properties:
  82. compatible:
  83. contains:
  84. enum:
  85. - mediatek,mt8173-vcodec-enc-vp8
  86. - mediatek,mt8173-vcodec-enc
  87. then:
  88. required:
  89. - mediatek,vpu
  90. - if:
  91. properties:
  92. compatible:
  93. enum:
  94. - mediatek,mt8173-vcodec-enc-vp8
  95. then:
  96. properties:
  97. clock:
  98. items:
  99. minItems: 1
  100. maxItems: 1
  101. clock-names:
  102. items:
  103. - const: venc_lt_sel
  104. else:
  105. properties:
  106. clock:
  107. items:
  108. minItems: 1
  109. maxItems: 1
  110. clock-names:
  111. items:
  112. - const: venc_sel
  113. additionalProperties: false
  114. examples:
  115. - |
  116. #include <dt-bindings/interrupt-controller/arm-gic.h>
  117. #include <dt-bindings/clock/mt8173-clk.h>
  118. #include <dt-bindings/memory/mt8173-larb-port.h>
  119. #include <dt-bindings/interrupt-controller/irq.h>
  120. vcodec_enc_avc: vcodec@18002000 {
  121. compatible = "mediatek,mt8173-vcodec-enc";
  122. reg = <0x18002000 0x1000>;
  123. interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
  124. iommus = <&iommu M4U_PORT_VENC_RCPU>,
  125. <&iommu M4U_PORT_VENC_REC>,
  126. <&iommu M4U_PORT_VENC_BSDMA>,
  127. <&iommu M4U_PORT_VENC_SV_COMV>,
  128. <&iommu M4U_PORT_VENC_RD_COMV>,
  129. <&iommu M4U_PORT_VENC_CUR_LUMA>,
  130. <&iommu M4U_PORT_VENC_CUR_CHROMA>,
  131. <&iommu M4U_PORT_VENC_REF_LUMA>,
  132. <&iommu M4U_PORT_VENC_REF_CHROMA>,
  133. <&iommu M4U_PORT_VENC_NBM_RDMA>,
  134. <&iommu M4U_PORT_VENC_NBM_WDMA>;
  135. mediatek,vpu = <&vpu>;
  136. clocks = <&topckgen CLK_TOP_VENC_SEL>;
  137. clock-names = "venc_sel";
  138. assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
  139. assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>;
  140. };
  141. vcodec_enc_vp8: vcodec@19002000 {
  142. compatible = "mediatek,mt8173-vcodec-enc-vp8";
  143. reg = <0x19002000 0x1000>; /* VENC_LT_SYS */
  144. interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
  145. iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>,
  146. <&iommu M4U_PORT_VENC_REC_FRM_SET2>,
  147. <&iommu M4U_PORT_VENC_BSDMA_SET2>,
  148. <&iommu M4U_PORT_VENC_SV_COMA_SET2>,
  149. <&iommu M4U_PORT_VENC_RD_COMA_SET2>,
  150. <&iommu M4U_PORT_VENC_CUR_LUMA_SET2>,
  151. <&iommu M4U_PORT_VENC_CUR_CHROMA_SET2>,
  152. <&iommu M4U_PORT_VENC_REF_LUMA_SET2>,
  153. <&iommu M4U_PORT_VENC_REC_CHROMA_SET2>;
  154. mediatek,vpu = <&vpu>;
  155. clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
  156. clock-names = "venc_lt_sel";
  157. assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>;
  158. assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>;
  159. };