xref: /freebsd/sys/contrib/device-tree/Bindings/media/mediatek-jpeg-decoder.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/media/mediatek-jpeg-decoder.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: MediaTek JPEG Decoder
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Xia Jiang <xia.jiang@mediatek.com>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotdescription: |-
13c9ccf3a3SEmmanuel Vadot  Mediatek JPEG Decoder is the JPEG decode hardware present in Mediatek SoCs
14c9ccf3a3SEmmanuel Vadot
15c9ccf3a3SEmmanuel Vadotproperties:
16c9ccf3a3SEmmanuel Vadot  compatible:
17c9ccf3a3SEmmanuel Vadot    oneOf:
18c9ccf3a3SEmmanuel Vadot      - items:
19c9ccf3a3SEmmanuel Vadot          - enum:
20c9ccf3a3SEmmanuel Vadot              - mediatek,mt8173-jpgdec
21c9ccf3a3SEmmanuel Vadot              - mediatek,mt2701-jpgdec
22c9ccf3a3SEmmanuel Vadot      - items:
23c9ccf3a3SEmmanuel Vadot          - enum:
24c9ccf3a3SEmmanuel Vadot              - mediatek,mt7623-jpgdec
25*8bab661aSEmmanuel Vadot              - mediatek,mt8188-jpgdec
26c9ccf3a3SEmmanuel Vadot          - const: mediatek,mt2701-jpgdec
27c9ccf3a3SEmmanuel Vadot
28c9ccf3a3SEmmanuel Vadot  reg:
29c9ccf3a3SEmmanuel Vadot    maxItems: 1
30c9ccf3a3SEmmanuel Vadot
31c9ccf3a3SEmmanuel Vadot  interrupts:
32c9ccf3a3SEmmanuel Vadot    maxItems: 1
33c9ccf3a3SEmmanuel Vadot
34c9ccf3a3SEmmanuel Vadot  clocks:
35c9ccf3a3SEmmanuel Vadot    maxItems: 2
36c9ccf3a3SEmmanuel Vadot    minItems: 2
37c9ccf3a3SEmmanuel Vadot
38c9ccf3a3SEmmanuel Vadot  clock-names:
39c9ccf3a3SEmmanuel Vadot    items:
40c9ccf3a3SEmmanuel Vadot      - const: jpgdec-smi
41c9ccf3a3SEmmanuel Vadot      - const: jpgdec
42c9ccf3a3SEmmanuel Vadot
43c9ccf3a3SEmmanuel Vadot  power-domains:
44c9ccf3a3SEmmanuel Vadot    maxItems: 1
45c9ccf3a3SEmmanuel Vadot
46c9ccf3a3SEmmanuel Vadot  iommus:
47c9ccf3a3SEmmanuel Vadot    maxItems: 2
48c9ccf3a3SEmmanuel Vadot    description: |
49c9ccf3a3SEmmanuel Vadot      Points to the respective IOMMU block with master port as argument, see
50c9ccf3a3SEmmanuel Vadot      Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
51c9ccf3a3SEmmanuel Vadot      Ports are according to the HW.
52c9ccf3a3SEmmanuel Vadot
53c9ccf3a3SEmmanuel Vadotrequired:
54c9ccf3a3SEmmanuel Vadot  - compatible
55c9ccf3a3SEmmanuel Vadot  - reg
56c9ccf3a3SEmmanuel Vadot  - interrupts
57c9ccf3a3SEmmanuel Vadot  - clocks
58c9ccf3a3SEmmanuel Vadot  - clock-names
59c9ccf3a3SEmmanuel Vadot  - power-domains
60c9ccf3a3SEmmanuel Vadot  - iommus
61c9ccf3a3SEmmanuel Vadot
62c9ccf3a3SEmmanuel VadotadditionalProperties: false
63c9ccf3a3SEmmanuel Vadot
64c9ccf3a3SEmmanuel Vadotexamples:
65c9ccf3a3SEmmanuel Vadot  - |
66c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/mt2701-clk.h>
67c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
68c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/memory/mt2701-larb-port.h>
69c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/power/mt2701-power.h>
70c9ccf3a3SEmmanuel Vadot    jpegdec: jpegdec@15004000 {
71c9ccf3a3SEmmanuel Vadot      compatible = "mediatek,mt2701-jpgdec";
72c9ccf3a3SEmmanuel Vadot      reg = <0x15004000 0x1000>;
73c9ccf3a3SEmmanuel Vadot      interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
74c9ccf3a3SEmmanuel Vadot      clocks =  <&imgsys CLK_IMG_JPGDEC_SMI>,
75c9ccf3a3SEmmanuel Vadot                <&imgsys CLK_IMG_JPGDEC>;
76c9ccf3a3SEmmanuel Vadot      clock-names = "jpgdec-smi",
77c9ccf3a3SEmmanuel Vadot                    "jpgdec";
78c9ccf3a3SEmmanuel Vadot      power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
79c9ccf3a3SEmmanuel Vadot      iommus = <&iommu MT2701_M4U_PORT_JPGDEC_WDMA>,
80c9ccf3a3SEmmanuel Vadot               <&iommu MT2701_M4U_PORT_JPGDEC_BSDMA>;
81c9ccf3a3SEmmanuel Vadot    };
82