19cdd70ceSYunfei Dong# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 29cdd70ceSYunfei Dong 39cdd70ceSYunfei Dong%YAML 1.2 49cdd70ceSYunfei Dong--- 59cdd70ceSYunfei Dong$id: http://devicetree.org/schemas/media/mediatek,vcodec-encoder.yaml# 69cdd70ceSYunfei Dong$schema: http://devicetree.org/meta-schemas/core.yaml# 79cdd70ceSYunfei Dong 89cdd70ceSYunfei Dongtitle: Mediatek Video Encode Accelerator 99cdd70ceSYunfei Dong 109cdd70ceSYunfei Dongmaintainers: 119cdd70ceSYunfei Dong - Yunfei Dong <yunfei.dong@mediatek.com> 129cdd70ceSYunfei Dong 139cdd70ceSYunfei Dongdescription: |+ 149cdd70ceSYunfei Dong Mediatek Video Encode is the video encode hardware present in Mediatek 159cdd70ceSYunfei Dong SoCs which supports high resolution encoding functionalities. 169cdd70ceSYunfei Dong 179cdd70ceSYunfei Dongproperties: 189cdd70ceSYunfei Dong compatible: 199cdd70ceSYunfei Dong enum: 209cdd70ceSYunfei Dong - mediatek,mt8173-vcodec-enc-vp8 219cdd70ceSYunfei Dong - mediatek,mt8173-vcodec-enc 229cdd70ceSYunfei Dong - mediatek,mt8183-vcodec-enc 23e9164d27SIrui Wang - mediatek,mt8188-vcodec-enc 249cdd70ceSYunfei Dong - mediatek,mt8192-vcodec-enc 259cdd70ceSYunfei Dong - mediatek,mt8195-vcodec-enc 269cdd70ceSYunfei Dong 279cdd70ceSYunfei Dong reg: 289cdd70ceSYunfei Dong maxItems: 1 299cdd70ceSYunfei Dong 309cdd70ceSYunfei Dong interrupts: 319cdd70ceSYunfei Dong maxItems: 1 329cdd70ceSYunfei Dong 339cdd70ceSYunfei Dong clocks: 349cdd70ceSYunfei Dong minItems: 1 359cdd70ceSYunfei Dong maxItems: 5 369cdd70ceSYunfei Dong 379cdd70ceSYunfei Dong clock-names: 389cdd70ceSYunfei Dong minItems: 1 399cdd70ceSYunfei Dong maxItems: 5 409cdd70ceSYunfei Dong 419cdd70ceSYunfei Dong assigned-clocks: true 429cdd70ceSYunfei Dong 439cdd70ceSYunfei Dong assigned-clock-parents: true 449cdd70ceSYunfei Dong 459cdd70ceSYunfei Dong iommus: 469cdd70ceSYunfei Dong minItems: 1 479cdd70ceSYunfei Dong maxItems: 32 489cdd70ceSYunfei Dong description: | 499cdd70ceSYunfei Dong List of the hardware port in respective IOMMU block for current Socs. 509cdd70ceSYunfei Dong Refer to bindings/iommu/mediatek,iommu.yaml. 519cdd70ceSYunfei Dong 529cdd70ceSYunfei Dong mediatek,vpu: 539cdd70ceSYunfei Dong $ref: /schemas/types.yaml#/definitions/phandle 549cdd70ceSYunfei Dong description: 559cdd70ceSYunfei Dong Describes point to vpu. 569cdd70ceSYunfei Dong 579cdd70ceSYunfei Dong mediatek,scp: 589cdd70ceSYunfei Dong $ref: /schemas/types.yaml#/definitions/phandle 599cdd70ceSYunfei Dong description: 609cdd70ceSYunfei Dong Describes point to scp. 619cdd70ceSYunfei Dong 62a5e9e202SNícolas F. R. A. Prado power-domains: 63a5e9e202SNícolas F. R. A. Prado maxItems: 1 64a5e9e202SNícolas F. R. A. Prado 65*26475355SIrui Wang "#address-cells": 66*26475355SIrui Wang const: 2 67*26475355SIrui Wang 68*26475355SIrui Wang "#size-cells": 69*26475355SIrui Wang const: 2 70*26475355SIrui Wang 719cdd70ceSYunfei Dongrequired: 729cdd70ceSYunfei Dong - compatible 739cdd70ceSYunfei Dong - reg 749cdd70ceSYunfei Dong - interrupts 759cdd70ceSYunfei Dong - clocks 769cdd70ceSYunfei Dong - clock-names 779cdd70ceSYunfei Dong - iommus 789cdd70ceSYunfei Dong - assigned-clocks 799cdd70ceSYunfei Dong - assigned-clock-parents 809cdd70ceSYunfei Dong 819cdd70ceSYunfei DongallOf: 829cdd70ceSYunfei Dong - if: 839cdd70ceSYunfei Dong properties: 849cdd70ceSYunfei Dong compatible: 859cdd70ceSYunfei Dong contains: 869cdd70ceSYunfei Dong enum: 879cdd70ceSYunfei Dong - mediatek,mt8183-vcodec-enc 88*26475355SIrui Wang - mediatek,mt8188-vcodec-enc 899cdd70ceSYunfei Dong - mediatek,mt8192-vcodec-enc 90*26475355SIrui Wang - mediatek,mt8195-vcodec-enc 919cdd70ceSYunfei Dong 929cdd70ceSYunfei Dong then: 939cdd70ceSYunfei Dong required: 949cdd70ceSYunfei Dong - mediatek,scp 959cdd70ceSYunfei Dong 969cdd70ceSYunfei Dong - if: 979cdd70ceSYunfei Dong properties: 989cdd70ceSYunfei Dong compatible: 999cdd70ceSYunfei Dong contains: 1009cdd70ceSYunfei Dong enum: 1019cdd70ceSYunfei Dong - mediatek,mt8173-vcodec-enc-vp8 1029cdd70ceSYunfei Dong - mediatek,mt8173-vcodec-enc 1039cdd70ceSYunfei Dong 1049cdd70ceSYunfei Dong then: 1059cdd70ceSYunfei Dong required: 1069cdd70ceSYunfei Dong - mediatek,vpu 1079cdd70ceSYunfei Dong 1089cdd70ceSYunfei Dong - if: 1099cdd70ceSYunfei Dong properties: 1109cdd70ceSYunfei Dong compatible: 1119cdd70ceSYunfei Dong enum: 1129cdd70ceSYunfei Dong - mediatek,mt8173-vcodec-enc 113*26475355SIrui Wang - mediatek,mt8188-vcodec-enc 1149cdd70ceSYunfei Dong - mediatek,mt8192-vcodec-enc 115*26475355SIrui Wang - mediatek,mt8195-vcodec-enc 1169cdd70ceSYunfei Dong 1179cdd70ceSYunfei Dong then: 1189cdd70ceSYunfei Dong properties: 1199cdd70ceSYunfei Dong clock: 1209cdd70ceSYunfei Dong items: 1219cdd70ceSYunfei Dong minItems: 1 1229cdd70ceSYunfei Dong maxItems: 1 1239cdd70ceSYunfei Dong clock-names: 1249cdd70ceSYunfei Dong items: 1259cdd70ceSYunfei Dong - const: venc_sel 126*26475355SIrui Wang else: # for vp8 hw encoder 1279cdd70ceSYunfei Dong properties: 1289cdd70ceSYunfei Dong clock: 1299cdd70ceSYunfei Dong items: 1309cdd70ceSYunfei Dong minItems: 1 1319cdd70ceSYunfei Dong maxItems: 1 1329cdd70ceSYunfei Dong clock-names: 1339cdd70ceSYunfei Dong items: 1349cdd70ceSYunfei Dong - const: venc_lt_sel 1359cdd70ceSYunfei Dong 1369cdd70ceSYunfei DongadditionalProperties: false 1379cdd70ceSYunfei Dong 1389cdd70ceSYunfei Dongexamples: 1399cdd70ceSYunfei Dong - | 1409cdd70ceSYunfei Dong #include <dt-bindings/interrupt-controller/arm-gic.h> 1419cdd70ceSYunfei Dong #include <dt-bindings/clock/mt8173-clk.h> 1429cdd70ceSYunfei Dong #include <dt-bindings/memory/mt8173-larb-port.h> 1439cdd70ceSYunfei Dong #include <dt-bindings/interrupt-controller/irq.h> 1449cdd70ceSYunfei Dong 1459cdd70ceSYunfei Dong vcodec_enc_avc: vcodec@18002000 { 1469cdd70ceSYunfei Dong compatible = "mediatek,mt8173-vcodec-enc"; 1479cdd70ceSYunfei Dong reg = <0x18002000 0x1000>; 1489cdd70ceSYunfei Dong interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>; 1499cdd70ceSYunfei Dong iommus = <&iommu M4U_PORT_VENC_RCPU>, 1509cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REC>, 1519cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_BSDMA>, 1529cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_SV_COMV>, 1539cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_RD_COMV>, 1549cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_CUR_LUMA>, 1559cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_CUR_CHROMA>, 1569cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REF_LUMA>, 1579cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REF_CHROMA>, 1589cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_NBM_RDMA>, 1599cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_NBM_WDMA>; 1609cdd70ceSYunfei Dong mediatek,vpu = <&vpu>; 1619cdd70ceSYunfei Dong clocks = <&topckgen CLK_TOP_VENC_SEL>; 1629cdd70ceSYunfei Dong clock-names = "venc_sel"; 1639cdd70ceSYunfei Dong assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>; 1649cdd70ceSYunfei Dong assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL>; 1659cdd70ceSYunfei Dong }; 1669cdd70ceSYunfei Dong 1679cdd70ceSYunfei Dong vcodec_enc_vp8: vcodec@19002000 { 1689cdd70ceSYunfei Dong compatible = "mediatek,mt8173-vcodec-enc-vp8"; 1699cdd70ceSYunfei Dong reg = <0x19002000 0x1000>; /* VENC_LT_SYS */ 1709cdd70ceSYunfei Dong interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>; 1719cdd70ceSYunfei Dong iommus = <&iommu M4U_PORT_VENC_RCPU_SET2>, 1729cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REC_FRM_SET2>, 1739cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_BSDMA_SET2>, 1749cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_SV_COMA_SET2>, 1759cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_RD_COMA_SET2>, 1769cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_CUR_LUMA_SET2>, 1779cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_CUR_CHROMA_SET2>, 1789cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REF_LUMA_SET2>, 1799cdd70ceSYunfei Dong <&iommu M4U_PORT_VENC_REC_CHROMA_SET2>; 1809cdd70ceSYunfei Dong mediatek,vpu = <&vpu>; 1819cdd70ceSYunfei Dong clocks = <&topckgen CLK_TOP_VENC_LT_SEL>; 1829cdd70ceSYunfei Dong clock-names = "venc_lt_sel"; 1839cdd70ceSYunfei Dong assigned-clocks = <&topckgen CLK_TOP_VENC_LT_SEL>; 1849cdd70ceSYunfei Dong assigned-clock-parents = <&topckgen CLK_TOP_VCODECPLL_370P5>; 1859cdd70ceSYunfei Dong }; 186