xref: /freebsd/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
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,sm8250-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,sm8250-venus
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  power-domains:
28    minItems: 2
29    maxItems: 3
30
31  power-domain-names:
32    minItems: 2
33    items:
34      - const: venus
35      - const: vcodec0
36      - const: mx
37
38  clocks:
39    maxItems: 3
40
41  clock-names:
42    items:
43      - const: iface
44      - const: core
45      - const: vcodec0_core
46
47  iommus:
48    maxItems: 1
49
50  memory-region:
51    maxItems: 1
52
53  interconnects:
54    maxItems: 2
55
56  interconnect-names:
57    items:
58      - const: cpu-cfg
59      - const: video-mem
60
61  resets:
62    maxItems: 2
63
64  reset-names:
65    items:
66      - const: bus
67      - const: core
68
69  video-decoder:
70    type: object
71
72    properties:
73      compatible:
74        const: venus-decoder
75
76    required:
77      - compatible
78
79    additionalProperties: false
80
81  video-encoder:
82    type: object
83
84    properties:
85      compatible:
86        const: venus-encoder
87
88    required:
89      - compatible
90
91    additionalProperties: false
92
93  video-firmware:
94    type: object
95    additionalProperties: false
96
97    description: |
98      Firmware subnode is needed when the platform does not
99      have TrustZone.
100
101    properties:
102      iommus:
103        maxItems: 1
104
105    required:
106      - iommus
107
108required:
109  - compatible
110  - reg
111  - interrupts
112  - power-domains
113  - power-domain-names
114  - clocks
115  - clock-names
116  - interconnects
117  - interconnect-names
118  - iommus
119  - memory-region
120  - resets
121  - reset-names
122  - video-decoder
123  - video-encoder
124
125additionalProperties: false
126
127examples:
128  - |
129        #include <dt-bindings/interrupt-controller/arm-gic.h>
130        #include <dt-bindings/clock/qcom,videocc-sm8250.h>
131        #include <dt-bindings/interconnect/qcom,sm8250.h>
132        #include <dt-bindings/clock/qcom,gcc-sm8250.h>
133        #include <dt-bindings/power/qcom-rpmpd.h>
134
135        venus: video-codec@aa00000 {
136            compatible = "qcom,sm8250-venus";
137            reg = <0x0aa00000 0xff000>;
138            interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
139            power-domains = <&videocc MVS0C_GDSC>,
140                            <&videocc MVS0_GDSC>,
141                            <&rpmhpd SM8250_MX>;
142            power-domain-names = "venus", "vcodec0", "mx";
143
144            clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
145                     <&videocc VIDEO_CC_MVS0C_CLK>,
146                     <&videocc VIDEO_CC_MVS0_CLK>;
147            clock-names = "iface", "core", "vcodec0_core";
148
149            interconnects = <&gem_noc MASTER_AMPSS_M0 &config_noc SLAVE_VENUS_CFG>,
150                            <&mmss_noc MASTER_VIDEO_P0 &mc_virt SLAVE_EBI_CH0>;
151            interconnect-names = "cpu-cfg", "video-mem";
152
153            iommus = <&apps_smmu 0x2100 0x0400>;
154            memory-region = <&video_mem>;
155
156            resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>,
157                     <&videocc VIDEO_CC_MVS0C_CLK_ARES>;
158            reset-names = "bus", "core";
159
160            video-decoder {
161                compatible = "venus-decoder";
162            };
163
164            video-encoder {
165                compatible = "venus-encoder";
166            };
167        };
168