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