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