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,sc7180-venus.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,sc7180-venus
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  power-domains:
28    maxItems: 2
29
30  power-domain-names:
31    items:
32      - const: venus
33      - const: vcodec0
34
35  clocks:
36    maxItems: 5
37
38  clock-names:
39    items:
40      - const: core
41      - const: iface
42      - const: bus
43      - const: vcodec0_core
44      - const: vcodec0_bus
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: video-mem
58      - const: cpu-cfg
59
60  video-decoder:
61    type: object
62
63    properties:
64      compatible:
65        const: venus-decoder
66
67    required:
68      - compatible
69
70    additionalProperties: false
71
72  video-encoder:
73    type: object
74
75    properties:
76      compatible:
77        const: venus-encoder
78
79    required:
80      - compatible
81
82    additionalProperties: false
83
84  video-firmware:
85    type: object
86
87    description: |
88      Firmware subnode is needed when the platform does not
89      have TrustZone.
90
91    properties:
92      iommus:
93        maxItems: 1
94
95    required:
96      - iommus
97
98required:
99  - compatible
100  - reg
101  - interrupts
102  - power-domains
103  - power-domain-names
104  - clocks
105  - clock-names
106  - iommus
107  - memory-region
108  - video-decoder
109  - video-encoder
110
111examples:
112  - |
113        #include <dt-bindings/interrupt-controller/arm-gic.h>
114        #include <dt-bindings/clock/qcom,videocc-sc7180.h>
115
116        venus: video-codec@aa00000 {
117                compatible = "qcom,sc7180-venus";
118                reg = <0 0x0aa00000 0 0xff000>;
119                interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
120                power-domains = <&videocc VENUS_GDSC>,
121                                <&videocc VCODEC0_GDSC>;
122                power-domain-names = "venus", "vcodec0";
123                clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
124                         <&videocc VIDEO_CC_VENUS_AHB_CLK>,
125                         <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
126                         <&videocc VIDEO_CC_VCODEC0_CORE_CLK>,
127                         <&videocc VIDEO_CC_VCODEC0_AXI_CLK>;
128                clock-names = "core", "iface", "bus",
129                              "vcodec0_core", "vcodec0_bus";
130                iommus = <&apps_smmu 0x0c00 0x60>;
131                memory-region = <&venus_mem>;
132
133                video-decoder {
134                        compatible = "venus-decoder";
135                };
136
137                video-encoder {
138                        compatible = "venus-encoder";
139                };
140        };
141