1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/media/mediatek-jpeg-encoder.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: MediaTek JPEG Encoder 8 9maintainers: 10 - Xia Jiang <xia.jiang@mediatek.com> 11 12description: |- 13 MediaTek JPEG Encoder is the JPEG encode hardware present in MediaTek SoCs 14 15properties: 16 compatible: 17 oneOf: 18 - enum: 19 - mediatek,mt8189-jpgenc 20 - items: 21 - enum: 22 - mediatek,mt2701-jpgenc 23 - mediatek,mt8183-jpgenc 24 - mediatek,mt8186-jpgenc 25 - mediatek,mt8188-jpgenc 26 - const: mediatek,mtk-jpgenc 27 28 reg: 29 maxItems: 1 30 31 interrupts: 32 maxItems: 1 33 34 clocks: 35 maxItems: 1 36 37 clock-names: 38 items: 39 - const: jpgenc 40 41 power-domains: 42 maxItems: 1 43 44 iommus: 45 minItems: 2 46 maxItems: 32 47 description: | 48 Points to the respective IOMMU block with master port as argument, see 49 Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. 50 Ports are according to the HW. 51 52 mediatek,larb: 53 $ref: /schemas/types.yaml#/definitions/phandle 54 description: | 55 A phandle to the local arbiter (SMI LARB) node. This explicitly 56 describes the hardware topology where the JPEG block is connected 57 to a dedicated SMI LARB for memory bandwidth arbitration. It is 58 required to accurately represent the hardware connection independently 59 of the IOMMU. 60 61required: 62 - compatible 63 - reg 64 - interrupts 65 - clocks 66 - clock-names 67 - power-domains 68 - iommus 69 70allOf: 71 - if: 72 properties: 73 compatible: 74 contains: 75 const: mediatek,mt8189-jpgenc 76 then: 77 required: 78 - mediatek,larb 79 else: 80 properties: 81 mediatek,larb: false 82 83additionalProperties: false 84 85examples: 86 - | 87 #include <dt-bindings/clock/mt2701-clk.h> 88 #include <dt-bindings/interrupt-controller/arm-gic.h> 89 #include <dt-bindings/memory/mt2701-larb-port.h> 90 #include <dt-bindings/power/mt2701-power.h> 91 jpegenc: jpegenc@1500a000 { 92 compatible = "mediatek,mt2701-jpgenc", 93 "mediatek,mtk-jpgenc"; 94 reg = <0x1500a000 0x1000>; 95 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_LOW>; 96 clocks = <&imgsys CLK_IMG_VENC>; 97 clock-names = "jpgenc"; 98 power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>; 99 iommus = <&iommu MT2701_M4U_PORT_JPGENC_RDMA>, 100 <&iommu MT2701_M4U_PORT_JPGENC_BSDMA>; 101 }; 102