xref: /linux/Documentation/devicetree/bindings/display/msm/dp-controller.yaml (revision 65b09bfa8aa7ebe087093b591525385efb2d58b0)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/msm/dp-controller.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: MSM Display Port Controller
8
9maintainers:
10  - Kuogee Hsieh <quic_khsieh@quicinc.com>
11  - Abhinav Kumar <quic_abhinavk@quicinc.com>
12
13description: |
14  Device tree bindings for DisplayPort host controller for MSM targets
15  that are compatible with VESA DisplayPort interface specification.
16
17properties:
18  compatible:
19    oneOf:
20      - enum:
21          - qcom,glymur-dp
22          - qcom,sa8775p-dp
23          - qcom,sc7180-dp
24          - qcom,sc7280-dp
25          - qcom,sc7280-edp
26          - qcom,sc8180x-dp
27          - qcom,sc8180x-edp
28          - qcom,sc8280xp-dp
29          - qcom,sc8280xp-edp
30          - qcom,sdm845-dp
31          - qcom,sm8350-dp
32          - qcom,sm8650-dp
33          - qcom,x1e80100-dp
34
35      - items:
36          - enum:
37              - qcom,qcs8300-dp
38          - const: qcom,sa8775p-dp
39
40      - items:
41          - enum:
42              - qcom,sm6350-dp
43          - const: qcom,sc7180-dp
44
45      # deprecated entry for compatibility with old DT
46      - items:
47          - enum:
48              - qcom,sm6350-dp
49          - const: qcom,sm8350-dp
50        deprecated: true
51
52      - items:
53          - enum:
54              - qcom,sar2130p-dp
55              - qcom,sm7150-dp
56              - qcom,sm8150-dp
57              - qcom,sm8250-dp
58              - qcom,sm8450-dp
59              - qcom,sm8550-dp
60          - const: qcom,sm8350-dp
61
62      - items:
63          - enum:
64              - qcom,sm6150-dp
65          - const: qcom,sm8150-dp
66          - const: qcom,sm8350-dp
67
68      - items:
69          - enum:
70              - qcom,eliza-dp
71              - qcom,sm8750-dp
72          - const: qcom,sm8650-dp
73
74  reg:
75    minItems: 4
76    items:
77      - description: ahb register block
78      - description: aux register block
79      - description: link register block
80      - description: p0 register block
81      - description: p1 register block
82      - description: p2 register block
83      - description: p3 register block
84      - description: mst2link register block
85      - description: mst3link register block
86
87  interrupts:
88    maxItems: 1
89
90  clocks:
91    minItems: 5
92    items:
93      - description: AHB clock to enable register access
94      - description: Display Port AUX clock
95      - description: Display Port Link clock
96      - description: Link interface clock between DP and PHY
97      - description: Display Port stream 0 Pixel clock
98      - description: Display Port stream 1 Pixel clock
99      - description: Display Port stream 2 Pixel clock
100      - description: Display Port stream 3 Pixel clock
101
102  clock-names:
103    minItems: 5
104    items:
105      - const: core_iface
106      - const: core_aux
107      - const: ctrl_link
108      - const: ctrl_link_iface
109      - const: stream_pixel
110      - const: stream_1_pixel
111      - const: stream_2_pixel
112      - const: stream_3_pixel
113
114  phys:
115    maxItems: 1
116
117  phy-names:
118    items:
119      - const: dp
120
121  operating-points-v2: true
122
123  opp-table:
124    type: object
125
126  power-domains:
127    maxItems: 1
128
129  aux-bus:
130    $ref: /schemas/display/dp-aux-bus.yaml#
131
132  data-lanes:
133    $ref: /schemas/types.yaml#/definitions/uint32-array
134    deprecated: true
135    minItems: 1
136    maxItems: 4
137    items:
138      maximum: 3
139
140  "#sound-dai-cells":
141    const: 0
142
143  vdda-0p9-supply:
144    deprecated: true
145  vdda-1p2-supply:
146    deprecated: true
147
148  ports:
149    $ref: /schemas/graph.yaml#/properties/ports
150    properties:
151      port@0:
152        $ref: /schemas/graph.yaml#/properties/port
153        description: Input endpoint of the controller
154
155      port@1:
156        $ref: /schemas/graph.yaml#/$defs/port-base
157        unevaluatedProperties: false
158        description: Output endpoint of the controller
159        properties:
160          endpoint:
161            $ref: /schemas/media/video-interfaces.yaml#
162            unevaluatedProperties: false
163            properties:
164              data-lanes:
165                minItems: 1
166                maxItems: 4
167                items:
168                  enum: [ 0, 1, 2, 3 ]
169
170              link-frequencies:
171                minItems: 1
172                maxItems: 4
173                items:
174                  enum: [ 1620000000, 2700000000, 5400000000, 8100000000 ]
175
176    required:
177      - port@0
178      - port@1
179
180required:
181  - compatible
182  - reg
183  - interrupts
184  - clocks
185  - clock-names
186  - phys
187  - phy-names
188  - power-domains
189  - ports
190
191allOf:
192  # AUX BUS does not exist on DP controllers
193  # Audio output also is present only on DP output
194  - if:
195      properties:
196        compatible:
197          contains:
198            enum:
199              - qcom,sc7280-edp
200              - qcom,sc8180x-edp
201              - qcom,sc8280xp-edp
202    then:
203      properties:
204        "#sound-dai-cells": false
205    else:
206      if:
207        properties:
208          compatible:
209            contains:
210              enum:
211                - qcom,glymur-dp
212                - qcom,sa8775p-dp
213                - qcom,x1e80100-dp
214      then:
215        $ref: /schemas/sound/dai-common.yaml#
216        oneOf:
217          - required:
218              - aux-bus
219          - required:
220              - "#sound-dai-cells"
221      else:
222        $ref: /schemas/sound/dai-common.yaml#
223        properties:
224          aux-bus: false
225        required:
226          - "#sound-dai-cells"
227
228  - if:
229      properties:
230        compatible:
231          contains:
232            enum:
233              # these platforms support SST only
234              - qcom,sc7180-dp
235              - qcom,sc7280-dp
236              - qcom,sc7280-edp
237              - qcom,sc8180x-edp
238              - qcom,sc8280xp-edp
239    then:
240      properties:
241        reg:
242          minItems: 5
243          maxItems: 5
244        clocks:
245          minItems: 5
246          maxItems: 5
247        clock-names:
248          minItems: 5
249          maxItems: 5
250
251  - if:
252      properties:
253        compatible:
254          contains:
255            enum:
256              # these platforms support 2 streams MST on some interfaces,
257              # others are SST only
258              - qcom,sc8280xp-dp
259              - qcom,x1e80100-dp
260    then:
261      properties:
262        reg:
263          minItems: 5
264          maxItems: 5
265        clocks:
266          minItems: 5
267          maxItems: 6
268        clock-names:
269          minItems: 5
270          maxItems: 6
271
272  - if:
273      properties:
274        compatible:
275          contains:
276            # 2 streams MST
277            enum:
278              - qcom,sc8180x-dp
279              - qcom,sdm845-dp
280              - qcom,sm8350-dp
281    then:
282      properties:
283        reg:
284          minItems: 5
285          maxItems: 5
286        clocks:
287          minItems: 6
288          maxItems: 6
289        clock-names:
290          minItems: 6
291          maxItems: 6
292
293  - if:
294      properties:
295        compatible:
296          contains:
297            enum:
298              - qcom,sm8650-dp
299    then:
300      properties:
301        reg:
302          minItems: 5
303          maxItems: 9
304        clocks:
305          minItems: 6
306          maxItems: 6
307        clocks-names:
308          minItems: 6
309          maxItems: 6
310
311  - if:
312      properties:
313        compatible:
314          contains:
315            enum:
316              # these platforms support 4 stream MST on first DP,
317              # 2 streams MST on the second one.
318              - qcom,sa8775p-dp
319    then:
320      properties:
321        reg:
322          minItems: 9
323          maxItems: 9
324        clocks:
325          minItems: 6
326          maxItems: 8
327        clock-names:
328          minItems: 6
329          maxItems: 8
330
331  - if:
332      properties:
333        compatible:
334          contains:
335            enum:
336              # these platforms support 2 streams MST on some interfaces,
337              # others are SST only, but all controllers have 4 ports
338              - qcom,glymur-dp
339    then:
340      properties:
341        reg:
342          minItems: 9
343          maxItems: 9
344        clocks:
345          minItems: 5
346          maxItems: 6
347        clock-names:
348          minItems: 5
349          maxItems: 6
350
351unevaluatedProperties: false
352
353examples:
354  - |
355    #include <dt-bindings/interrupt-controller/arm-gic.h>
356    #include <dt-bindings/clock/qcom,dispcc-sc7180.h>
357    #include <dt-bindings/power/qcom-rpmpd.h>
358
359    displayport-controller@ae90000 {
360        compatible = "qcom,sc7180-dp";
361        reg = <0xae90000 0x200>,
362              <0xae90200 0x200>,
363              <0xae90400 0xc00>,
364              <0xae91000 0x400>,
365              <0xae91400 0x400>;
366        interrupt-parent = <&mdss>;
367        interrupts = <12>;
368        clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
369                 <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
370                 <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
371                 <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
372                 <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
373        clock-names = "core_iface", "core_aux",
374                      "ctrl_link",
375                      "ctrl_link_iface", "stream_pixel";
376
377        assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
378                          <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
379
380        assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
381
382        phys = <&dp_phy>;
383        phy-names = "dp";
384
385        #sound-dai-cells = <0>;
386
387        power-domains = <&rpmhpd SC7180_CX>;
388
389        ports {
390            #address-cells = <1>;
391            #size-cells = <0>;
392
393            port@0 {
394                reg = <0>;
395                endpoint {
396                    remote-endpoint = <&dpu_intf0_out>;
397                };
398            };
399
400            port@1 {
401                reg = <1>;
402                endpoint {
403                    remote-endpoint = <&typec>;
404                    data-lanes = <0 1>;
405                    link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
406                };
407            };
408        };
409    };
410...
411