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