1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/media/qcom,sdm845-venus-v2.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: Qualcomm Venus video encode and decode accelerators
9
10maintainers:
11  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
12
13description: |
14  The Venus IP is a video encode and decode accelerator present
15  on Qualcomm platforms
16
17properties:
18  compatible:
19    const: qcom,sdm845-venus-v2
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  power-domains:
28    minItems: 3
29    maxItems: 4
30
31  power-domain-names:
32    minItems: 3
33    items:
34      - const: venus
35      - const: vcodec0
36      - const: vcodec1
37      - const: cx
38
39  clocks:
40    maxItems: 7
41
42  clock-names:
43    items:
44      - const: core
45      - const: iface
46      - const: bus
47      - const: vcodec0_core
48      - const: vcodec0_bus
49      - const: vcodec1_core
50      - const: vcodec1_bus
51
52  iommus:
53    maxItems: 2
54
55  memory-region:
56    maxItems: 1
57
58  video-core0:
59    type: object
60
61    properties:
62      compatible:
63        const: venus-decoder
64
65    required:
66      - compatible
67
68    additionalProperties: false
69
70  video-core1:
71    type: object
72
73    properties:
74      compatible:
75        const: venus-encoder
76
77    required:
78      - compatible
79
80    additionalProperties: false
81
82  video-firmware:
83    type: object
84
85    description: |
86      Firmware subnode is needed when the platform does not
87      have TrustZone.
88
89    properties:
90      iommus:
91        maxItems: 1
92
93    required:
94      - iommus
95
96required:
97  - compatible
98  - reg
99  - interrupts
100  - power-domains
101  - power-domain-names
102  - clocks
103  - clock-names
104  - iommus
105  - memory-region
106  - video-core0
107  - video-core1
108
109additionalProperties: false
110
111examples:
112  - |
113        #include <dt-bindings/interrupt-controller/arm-gic.h>
114        #include <dt-bindings/clock/qcom,videocc-sdm845.h>
115
116        video-codec@aa00000 {
117                compatible = "qcom,sdm845-venus-v2";
118                reg = <0x0aa00000 0xff000>;
119                interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
120                clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
121                         <&videocc VIDEO_CC_VENUS_AHB_CLK>,
122                         <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
123                         <&videocc VIDEO_CC_VCODEC0_CORE_CLK>,
124                         <&videocc VIDEO_CC_VCODEC0_AXI_CLK>,
125                         <&videocc VIDEO_CC_VCODEC1_CORE_CLK>,
126                         <&videocc VIDEO_CC_VCODEC1_AXI_CLK>;
127                clock-names = "core", "iface", "bus",
128                              "vcodec0_core", "vcodec0_bus",
129                              "vcodec1_core", "vcodec1_bus";
130                power-domains = <&videocc VENUS_GDSC>,
131                                <&videocc VCODEC0_GDSC>,
132                                <&videocc VCODEC1_GDSC>;
133                power-domain-names = "venus", "vcodec0", "vcodec1";
134                iommus = <&apps_smmu 0x10a0 0x8>,
135                         <&apps_smmu 0x10b0 0x0>;
136                memory-region = <&venus_mem>;
137
138                video-core0 {
139                        compatible = "venus-decoder";
140                };
141
142                video-core1 {
143                        compatible = "venus-encoder";
144                };
145        };
146