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:
285b380f24SRajendra Nayak    minItems: 3
295b380f24SRajendra Nayak    maxItems: 4
30fde57f90SStanimir Varbanov
31fde57f90SStanimir Varbanov  power-domain-names:
325b380f24SRajendra Nayak    minItems: 3
335b380f24SRajendra Nayak    maxItems: 4
34fde57f90SStanimir Varbanov    items:
35fde57f90SStanimir Varbanov      - const: venus
36fde57f90SStanimir Varbanov      - const: vcodec0
37fde57f90SStanimir Varbanov      - const: vcodec1
385b380f24SRajendra Nayak      - const: cx
39fde57f90SStanimir Varbanov
40fde57f90SStanimir Varbanov  clocks:
41fde57f90SStanimir Varbanov    maxItems: 7
42fde57f90SStanimir Varbanov
43fde57f90SStanimir Varbanov  clock-names:
44fde57f90SStanimir Varbanov    items:
45fde57f90SStanimir Varbanov      - const: core
46fde57f90SStanimir Varbanov      - const: iface
47fde57f90SStanimir Varbanov      - const: bus
48fde57f90SStanimir Varbanov      - const: vcodec0_core
49fde57f90SStanimir Varbanov      - const: vcodec0_bus
50fde57f90SStanimir Varbanov      - const: vcodec1_core
51fde57f90SStanimir Varbanov      - const: vcodec1_bus
52fde57f90SStanimir Varbanov
53fde57f90SStanimir Varbanov  iommus:
54fde57f90SStanimir Varbanov    maxItems: 2
55fde57f90SStanimir Varbanov
56fde57f90SStanimir Varbanov  memory-region:
57fde57f90SStanimir Varbanov    maxItems: 1
58fde57f90SStanimir Varbanov
59fde57f90SStanimir Varbanov  video-core0:
60fde57f90SStanimir Varbanov    type: object
61fde57f90SStanimir Varbanov
62fde57f90SStanimir Varbanov    properties:
63fde57f90SStanimir Varbanov      compatible:
64fde57f90SStanimir Varbanov        const: venus-decoder
65fde57f90SStanimir Varbanov
66fde57f90SStanimir Varbanov    required:
67fde57f90SStanimir Varbanov      - compatible
68fde57f90SStanimir Varbanov
69fde57f90SStanimir Varbanov    additionalProperties: false
70fde57f90SStanimir Varbanov
71fde57f90SStanimir Varbanov  video-core1:
72fde57f90SStanimir Varbanov    type: object
73fde57f90SStanimir Varbanov
74fde57f90SStanimir Varbanov    properties:
75fde57f90SStanimir Varbanov      compatible:
76fde57f90SStanimir Varbanov        const: venus-encoder
77fde57f90SStanimir Varbanov
78fde57f90SStanimir Varbanov    required:
79fde57f90SStanimir Varbanov      - compatible
80fde57f90SStanimir Varbanov
81fde57f90SStanimir Varbanov    additionalProperties: false
82fde57f90SStanimir Varbanov
83fde57f90SStanimir Varbanov  video-firmware:
84fde57f90SStanimir Varbanov    type: object
85fde57f90SStanimir Varbanov
86fde57f90SStanimir Varbanov    description: |
87fde57f90SStanimir Varbanov      Firmware subnode is needed when the platform does not
88fde57f90SStanimir Varbanov      have TrustZone.
89fde57f90SStanimir Varbanov
90fde57f90SStanimir Varbanov    properties:
91fde57f90SStanimir Varbanov      iommus:
92fde57f90SStanimir Varbanov        maxItems: 1
93fde57f90SStanimir Varbanov
94fde57f90SStanimir Varbanov    required:
95fde57f90SStanimir Varbanov      - iommus
96fde57f90SStanimir Varbanov
97fde57f90SStanimir Varbanovrequired:
98fde57f90SStanimir Varbanov  - compatible
99fde57f90SStanimir Varbanov  - reg
100fde57f90SStanimir Varbanov  - interrupts
101fde57f90SStanimir Varbanov  - power-domains
102fde57f90SStanimir Varbanov  - power-domain-names
103fde57f90SStanimir Varbanov  - clocks
104fde57f90SStanimir Varbanov  - clock-names
105fde57f90SStanimir Varbanov  - iommus
106fde57f90SStanimir Varbanov  - memory-region
107fde57f90SStanimir Varbanov  - video-core0
108fde57f90SStanimir Varbanov  - video-core1
109fde57f90SStanimir Varbanov
110fde57f90SStanimir Varbanovexamples:
111fde57f90SStanimir Varbanov  - |
112fde57f90SStanimir Varbanov        #include <dt-bindings/interrupt-controller/arm-gic.h>
113fde57f90SStanimir Varbanov        #include <dt-bindings/clock/qcom,videocc-sdm845.h>
114fde57f90SStanimir Varbanov
115fde57f90SStanimir Varbanov        video-codec@aa00000 {
116fde57f90SStanimir Varbanov                compatible = "qcom,sdm845-venus-v2";
117fba56184SRob Herring                reg = <0x0aa00000 0xff000>;
118fde57f90SStanimir Varbanov                interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
119fde57f90SStanimir Varbanov                clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
120fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VENUS_AHB_CLK>,
121fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
122fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VCODEC0_CORE_CLK>,
123fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VCODEC0_AXI_CLK>,
124fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VCODEC1_CORE_CLK>,
125fde57f90SStanimir Varbanov                         <&videocc VIDEO_CC_VCODEC1_AXI_CLK>;
126fde57f90SStanimir Varbanov                clock-names = "core", "iface", "bus",
127fde57f90SStanimir Varbanov                              "vcodec0_core", "vcodec0_bus",
128fde57f90SStanimir Varbanov                              "vcodec1_core", "vcodec1_bus";
129fde57f90SStanimir Varbanov                power-domains = <&videocc VENUS_GDSC>,
130fde57f90SStanimir Varbanov                                <&videocc VCODEC0_GDSC>,
131fde57f90SStanimir Varbanov                                <&videocc VCODEC1_GDSC>;
132fde57f90SStanimir Varbanov                power-domain-names = "venus", "vcodec0", "vcodec1";
133fde57f90SStanimir Varbanov                iommus = <&apps_smmu 0x10a0 0x8>,
134fde57f90SStanimir Varbanov                         <&apps_smmu 0x10b0 0x0>;
135fde57f90SStanimir Varbanov                memory-region = <&venus_mem>;
136fde57f90SStanimir Varbanov
137fde57f90SStanimir Varbanov                video-core0 {
138fde57f90SStanimir Varbanov                        compatible = "venus-decoder";
139fde57f90SStanimir Varbanov                };
140fde57f90SStanimir Varbanov
141fde57f90SStanimir Varbanov                video-core1 {
142fde57f90SStanimir Varbanov                        compatible = "venus-encoder";
143fde57f90SStanimir Varbanov                };
144fde57f90SStanimir Varbanov        };
145