summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
blob: 4b7a12523dcff521a1a0d17b890dc4f3aca8cb3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

%YAML 1.2
---
$id: "http://devicetree.org/schemas/media/qcom,sm8250-venus.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm Venus video encode and decode accelerators

maintainers:
  - Stanimir Varbanov <stanimir.varbanov@linaro.org>

description: |
  The Venus IP is a video encode and decode accelerator present
  on Qualcomm platforms

properties:
  compatible:
    const: qcom,sm8250-venus

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  power-domains:
    minItems: 2
    maxItems: 3

  power-domain-names:
    minItems: 2
    items:
      - const: venus
      - const: vcodec0
      - const: mx

  clocks:
    maxItems: 3

  clock-names:
    items:
      - const: iface
      - const: core
      - const: vcodec0_core

  iommus:
    maxItems: 1

  memory-region:
    maxItems: 1

  interconnects:
    maxItems: 2

  interconnect-names:
    items:
      - const: cpu-cfg
      - const: video-mem

  resets:
    maxItems: 2

  reset-names:
    items:
      - const: bus
      - const: core

  video-decoder:
    type: object

    properties:
      compatible:
        const: venus-decoder

    required:
      - compatible

    additionalProperties: false

  video-encoder:
    type: object

    properties:
      compatible:
        const: venus-encoder

    required:
      - compatible

    additionalProperties: false

  video-firmware:
    type: object
    additionalProperties: false

    description: |
      Firmware subnode is needed when the platform does not
      have TrustZone.

    properties:
      iommus:
        maxItems: 1

    required:
      - iommus

required:
  - compatible
  - reg
  - interrupts
  - power-domains
  - power-domain-names
  - clocks
  - clock-names
  - interconnects
  - interconnect-names
  - iommus
  - memory-region
  - resets
  - reset-names
  - video-decoder
  - video-encoder

additionalProperties: false

examples:
  - |
        #include <dt-bindings/interrupt-controller/arm-gic.h>
        #include <dt-bindings/clock/qcom,videocc-sm8250.h>
        #include <dt-bindings/interconnect/qcom,sm8250.h>
        #include <dt-bindings/clock/qcom,gcc-sm8250.h>
        #include <dt-bindings/power/qcom-rpmpd.h>

        venus: video-codec@aa00000 {
            compatible = "qcom,sm8250-venus";
            reg = <0x0aa00000 0xff000>;
            interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
            power-domains = <&videocc MVS0C_GDSC>,
                            <&videocc MVS0_GDSC>,
                            <&rpmhpd SM8250_MX>;
            power-domain-names = "venus", "vcodec0", "mx";

            clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
                     <&videocc VIDEO_CC_MVS0C_CLK>,
                     <&videocc VIDEO_CC_MVS0_CLK>;
            clock-names = "iface", "core", "vcodec0_core";

            interconnects = <&gem_noc MASTER_AMPSS_M0 &config_noc SLAVE_VENUS_CFG>,
                            <&mmss_noc MASTER_VIDEO_P0 &mc_virt SLAVE_EBI_CH0>;
            interconnect-names = "cpu-cfg", "video-mem";

            iommus = <&apps_smmu 0x2100 0x0400>;
            memory-region = <&video_mem>;

            resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>,
                     <&videocc VIDEO_CC_MVS0C_CLK_ARES>;
            reset-names = "bus", "core";

            video-decoder {
                compatible = "venus-decoder";
            };

            video-encoder {
                compatible = "venus-encoder";
            };
        };