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