summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml
blob: 0f5c397ea7632a9a15efe308dc92b4976af02cea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/mediatek-jpeg-decoder.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek JPEG Decoder

maintainers:
  - Xia Jiang <xia.jiang@mediatek.com>

description: |-
  Mediatek JPEG Decoder is the JPEG decode hardware present in Mediatek SoCs

properties:
  compatible:
    oneOf:
      - enum:
          - mediatek,mt2701-jpgdec
          - mediatek,mt8173-jpgdec
          - mediatek,mt8189-jpgdec
      - items:
          - enum:
              - mediatek,mt7623-jpgdec
              - mediatek,mt8188-jpgdec
          - const: mediatek,mt2701-jpgdec

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1
    maxItems: 2

  clock-names:
    oneOf:
      - items:
          - const: jpgdec
      - items:
          - const: jpgdec-smi
          - const: jpgdec

  power-domains:
    maxItems: 1

  iommus:
    minItems: 2
    maxItems: 32
    description: |
      Points to the respective IOMMU block with master port as argument, see
      Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
      Ports are according to the HW.

  mediatek,larb:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: |
      A phandle to the local arbiter (SMI LARB) node. This explicitly
      describes the hardware topology where the JPEG block is connected
      to a dedicated SMI LARB for memory bandwidth arbitration. It is
      required to accurately represent the hardware connection independently
      of the IOMMU.

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - power-domains
  - iommus

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: mediatek,mt8189-jpgdec
    then:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          maxItems: 1
      required:
        - mediatek,larb
    else:
      properties:
        clocks:
          minItems: 2
        clock-names:
          minItems: 2
        mediatek,larb: false

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/mt2701-clk.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/memory/mt2701-larb-port.h>
    #include <dt-bindings/power/mt2701-power.h>
    jpegdec: jpegdec@15004000 {
      compatible = "mediatek,mt2701-jpgdec";
      reg = <0x15004000 0x1000>;
      interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
      clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
               <&imgsys CLK_IMG_JPGDEC>;
      clock-names = "jpgdec-smi",
                    "jpgdec";
      power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
      iommus = <&iommu MT2701_M4U_PORT_JPGDEC_WDMA>,
               <&iommu MT2701_M4U_PORT_JPGDEC_BSDMA>;
    };