1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/qcom,sc7280-venus.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm SC7280 Venus video encode and decode accelerators
8
9maintainers:
10  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
11
12description: |
13  The Venus Iris2 IP is a video encode and decode accelerator present
14  on Qualcomm platforms
15
16properties:
17  compatible:
18    const: qcom,sc7280-venus
19
20  reg:
21    maxItems: 1
22
23  interrupts:
24    maxItems: 1
25
26  power-domains:
27    minItems: 2
28    maxItems: 3
29
30  power-domain-names:
31    minItems: 2
32    items:
33      - const: venus
34      - const: vcodec0
35      - const: cx
36
37  clocks:
38    maxItems: 5
39
40  clock-names:
41    items:
42      - const: core
43      - const: bus
44      - const: iface
45      - const: vcodec_core
46      - const: vcodec_bus
47
48  iommus:
49    maxItems: 2
50
51  memory-region:
52    maxItems: 1
53
54  interconnects:
55    maxItems: 2
56
57  interconnect-names:
58    items:
59      - const: cpu-cfg
60      - const: video-mem
61
62  video-decoder:
63    type: object
64
65    properties:
66      compatible:
67        const: venus-decoder
68
69    required:
70      - compatible
71
72    additionalProperties: false
73
74  video-encoder:
75    type: object
76
77    properties:
78      compatible:
79        const: venus-encoder
80
81    required:
82      - compatible
83
84    additionalProperties: false
85
86  video-firmware:
87    type: object
88    additionalProperties: false
89
90    description: |
91      Firmware subnode is needed when the platform does not
92      have TrustZone.
93
94    properties:
95      iommus:
96        maxItems: 1
97
98    required:
99      - iommus
100
101required:
102  - compatible
103  - reg
104  - interrupts
105  - power-domains
106  - power-domain-names
107  - clocks
108  - clock-names
109  - iommus
110  - memory-region
111  - video-decoder
112  - video-encoder
113
114additionalProperties: false
115
116examples:
117  - |
118    #include <dt-bindings/interrupt-controller/arm-gic.h>
119    #include <dt-bindings/clock/qcom,videocc-sc7280.h>
120    #include <dt-bindings/interconnect/qcom,sc7280.h>
121    #include <dt-bindings/power/qcom-rpmpd.h>
122
123    venus: video-codec@aa00000 {
124        compatible = "qcom,sc7280-venus";
125        reg = <0x0aa00000 0xd0600>;
126        interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
127
128        clocks = <&videocc VIDEO_CC_MVSC_CORE_CLK>,
129                 <&videocc VIDEO_CC_MVSC_CTL_AXI_CLK>,
130                 <&videocc VIDEO_CC_VENUS_AHB_CLK>,
131                 <&videocc VIDEO_CC_MVS0_CORE_CLK>,
132                 <&videocc VIDEO_CC_MVS0_AXI_CLK>;
133        clock-names = "core", "bus", "iface",
134                      "vcodec_core", "vcodec_bus";
135
136        power-domains = <&videocc MVSC_GDSC>,
137                        <&videocc MVS0_GDSC>,
138                        <&rpmhpd SC7280_CX>;
139        power-domain-names = "venus", "vcodec0", "cx";
140
141        interconnects = <&gem_noc MASTER_APPSS_PROC 0 &cnoc2 SLAVE_VENUS_CFG 0>,
142                        <&mmss_noc MASTER_VIDEO_P0 0 &mc_virt SLAVE_EBI1 0>;
143        interconnect-names = "cpu-cfg", "video-mem";
144
145        iommus = <&apps_smmu 0x2180 0x20>,
146                 <&apps_smmu 0x2184 0x20>;
147
148        memory-region = <&video_mem>;
149
150        video-decoder {
151            compatible = "venus-decoder";
152        };
153
154        video-encoder {
155            compatible = "venus-encoder";
156        };
157
158        video-firmware {
159            iommus = <&apps_smmu 0x21a2 0x0>;
160        };
161    };
162