xref: /freebsd/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml (revision b197d4b893974c9eb4d7b38704c6d5c486235d6f)
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
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