xref: /freebsd/sys/contrib/device-tree/Bindings/display/renesas,du.yaml (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/renesas,du.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas R-Car Display Unit (DU)
8
9maintainers:
10  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
11
12description: |
13  These DT bindings describe the Display Unit embedded in the Renesas R-Car
14  Gen1, R-Car Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs.
15
16properties:
17  compatible:
18    enum:
19      - renesas,du-r8a7742 # for RZ/G1H compatible DU
20      - renesas,du-r8a7743 # for RZ/G1M compatible DU
21      - renesas,du-r8a7744 # for RZ/G1N compatible DU
22      - renesas,du-r8a7745 # for RZ/G1E compatible DU
23      - renesas,du-r8a77470 # for RZ/G1C compatible DU
24      - renesas,du-r8a774a1 # for RZ/G2M compatible DU
25      - renesas,du-r8a774b1 # for RZ/G2N compatible DU
26      - renesas,du-r8a774c0 # for RZ/G2E compatible DU
27      - renesas,du-r8a774e1 # for RZ/G2H compatible DU
28      - renesas,du-r8a7779 # for R-Car H1 compatible DU
29      - renesas,du-r8a7790 # for R-Car H2 compatible DU
30      - renesas,du-r8a7791 # for R-Car M2-W compatible DU
31      - renesas,du-r8a7792 # for R-Car V2H compatible DU
32      - renesas,du-r8a7793 # for R-Car M2-N compatible DU
33      - renesas,du-r8a7794 # for R-Car E2 compatible DU
34      - renesas,du-r8a7795 # for R-Car H3 compatible DU
35      - renesas,du-r8a7796 # for R-Car M3-W compatible DU
36      - renesas,du-r8a77961 # for R-Car M3-W+ compatible DU
37      - renesas,du-r8a77965 # for R-Car M3-N compatible DU
38      - renesas,du-r8a77970 # for R-Car V3M compatible DU
39      - renesas,du-r8a77980 # for R-Car V3H compatible DU
40      - renesas,du-r8a77990 # for R-Car E3 compatible DU
41      - renesas,du-r8a77995 # for R-Car D3 compatible DU
42
43  reg:
44    maxItems: 1
45
46  # See compatible-specific constraints below.
47  clocks: true
48  clock-names: true
49  interrupts:
50    description: Interrupt specifiers, one per DU channel
51  resets: true
52  reset-names: true
53
54  power-domains:
55    maxItems: 1
56
57  ports:
58    $ref: /schemas/graph.yaml#/properties/port
59    description: |
60      The connections to the DU output video ports are modeled using the OF
61      graph bindings specified in Documentation/devicetree/bindings/graph.txt.
62      The number of ports and their assignment are model-dependent. Each port
63      shall have a single endpoint.
64
65    patternProperties:
66      "^port@[0-3]$":
67        $ref: /schemas/graph.yaml#/properties/port
68        unevaluatedProperties: false
69
70    required:
71      - port@0
72      - port@1
73
74    unevaluatedProperties: false
75
76  renesas,cmms:
77    $ref: "/schemas/types.yaml#/definitions/phandle-array"
78    description:
79      A list of phandles to the CMM instances present in the SoC, one for each
80      available DU channel.
81
82  renesas,vsps:
83    $ref: "/schemas/types.yaml#/definitions/phandle-array"
84    description:
85      A list of phandle and channel index tuples to the VSPs that handle the
86      memory interfaces for the DU channels. The phandle identifies the VSP
87      instance that serves the DU channel, and the channel index identifies
88      the LIF instance in that VSP.
89
90required:
91  - compatible
92  - reg
93  - clocks
94  - interrupts
95  - resets
96  - ports
97
98allOf:
99  - if:
100      properties:
101        compatible:
102          contains:
103            const: renesas,du-r8a7779
104    then:
105      properties:
106        clocks:
107          minItems: 1
108          maxItems: 3
109          items:
110            - description: Functional clock
111            - description: DU_DOTCLKIN0 input clock
112            - description: DU_DOTCLKIN1 input clock
113
114        clock-names:
115          minItems: 1
116          maxItems: 3
117          items:
118            - const: du.0
119            - pattern: '^dclkin\.[01]$'
120            - pattern: '^dclkin\.[01]$'
121
122        interrupts:
123          maxItems: 1
124
125        resets:
126          maxItems: 1
127
128        ports:
129          properties:
130            port@0:
131              description: DPAD 0
132            port@1:
133              description: DPAD 1
134            # port@2 is TCON, not supported yet
135            port@2: false
136            port@3: false
137
138          required:
139            - port@0
140            - port@1
141
142      required:
143        - interrupts
144
145  - if:
146      properties:
147        compatible:
148          contains:
149            enum:
150              - renesas,du-r8a7743
151              - renesas,du-r8a7744
152              - renesas,du-r8a7791
153              - renesas,du-r8a7793
154    then:
155      properties:
156        clocks:
157          minItems: 2
158          maxItems: 4
159          items:
160            - description: Functional clock for DU0
161            - description: Functional clock for DU1
162            - description: DU_DOTCLKIN0 input clock
163            - description: DU_DOTCLKIN1 input clock
164
165        clock-names:
166          minItems: 2
167          maxItems: 4
168          items:
169            - const: du.0
170            - const: du.1
171            - pattern: '^dclkin\.[01]$'
172            - pattern: '^dclkin\.[01]$'
173
174        interrupts:
175          maxItems: 2
176
177        resets:
178          maxItems: 1
179
180        reset-names:
181          items:
182            - const: du.0
183
184        ports:
185          properties:
186            port@0:
187              description: DPAD 0
188            port@1:
189              description: LVDS 0
190            # port@2 is TCON, not supported yet
191            port@2: false
192            port@3: false
193
194          required:
195            - port@0
196            - port@1
197
198      required:
199        - clock-names
200        - interrupts
201        - resets
202        - reset-names
203
204  - if:
205      properties:
206        compatible:
207          contains:
208            enum:
209              - renesas,du-r8a7745
210              - renesas,du-r8a7792
211    then:
212      properties:
213        clocks:
214          minItems: 2
215          maxItems: 4
216          items:
217            - description: Functional clock for DU0
218            - description: Functional clock for DU1
219            - description: DU_DOTCLKIN0 input clock
220            - description: DU_DOTCLKIN1 input clock
221
222        clock-names:
223          minItems: 2
224          maxItems: 4
225          items:
226            - const: du.0
227            - const: du.1
228            - pattern: '^dclkin\.[01]$'
229            - pattern: '^dclkin\.[01]$'
230
231        interrupts:
232          maxItems: 2
233
234        resets:
235          maxItems: 1
236
237        reset-names:
238          items:
239            - const: du.0
240
241        ports:
242          properties:
243            port@0:
244              description: DPAD 0
245            port@1:
246              description: DPAD 1
247            port@2: false
248            port@3: false
249
250          required:
251            - port@0
252            - port@1
253
254      required:
255        - clock-names
256        - interrupts
257        - resets
258        - reset-names
259
260  - if:
261      properties:
262        compatible:
263          contains:
264            enum:
265              - renesas,du-r8a7794
266    then:
267      properties:
268        clocks:
269          minItems: 2
270          maxItems: 4
271          items:
272            - description: Functional clock for DU0
273            - description: Functional clock for DU1
274            - description: DU_DOTCLKIN0 input clock
275            - description: DU_DOTCLKIN1 input clock
276
277        clock-names:
278          minItems: 2
279          maxItems: 4
280          items:
281            - const: du.0
282            - const: du.1
283            - pattern: '^dclkin\.[01]$'
284            - pattern: '^dclkin\.[01]$'
285
286        interrupts:
287          maxItems: 2
288
289        resets:
290          maxItems: 1
291
292        reset-names:
293          items:
294            - const: du.0
295
296        ports:
297          properties:
298            port@0:
299              description: DPAD 0
300            port@1:
301              description: DPAD 1
302            # port@2 is TCON, not supported yet
303            port@2: false
304            port@3: false
305
306          required:
307            - port@0
308            - port@1
309
310      required:
311        - clock-names
312        - interrupts
313        - resets
314        - reset-names
315
316  - if:
317      properties:
318        compatible:
319          contains:
320            enum:
321              - renesas,du-r8a77470
322    then:
323      properties:
324        clocks:
325          minItems: 2
326          maxItems: 4
327          items:
328            - description: Functional clock for DU0
329            - description: Functional clock for DU1
330            - description: DU_DOTCLKIN0 input clock
331            - description: DU_DOTCLKIN1 input clock
332
333        clock-names:
334          minItems: 2
335          maxItems: 4
336          items:
337            - const: du.0
338            - const: du.1
339            - pattern: '^dclkin\.[01]$'
340            - pattern: '^dclkin\.[01]$'
341
342        interrupts:
343          maxItems: 2
344
345        resets:
346          maxItems: 1
347
348        reset-names:
349          items:
350            - const: du.0
351
352        ports:
353          properties:
354            port@0:
355              description: DPAD 0
356            port@1:
357              description: DPAD 1
358            port@2:
359              description: LVDS 0
360            # port@3 is DVENC, not supported yet
361            port@3: false
362
363          required:
364            - port@0
365            - port@1
366            - port@2
367
368      required:
369        - clock-names
370        - interrupts
371        - resets
372        - reset-names
373
374  - if:
375      properties:
376        compatible:
377          contains:
378            enum:
379              - renesas,du-r8a7742
380              - renesas,du-r8a7790
381    then:
382      properties:
383        clocks:
384          minItems: 3
385          maxItems: 6
386          items:
387            - description: Functional clock for DU0
388            - description: Functional clock for DU1
389            - description: Functional clock for DU2
390            - description: DU_DOTCLKIN0 input clock
391            - description: DU_DOTCLKIN1 input clock
392            - description: DU_DOTCLKIN2 input clock
393
394        clock-names:
395          minItems: 3
396          maxItems: 6
397          items:
398            - const: du.0
399            - const: du.1
400            - const: du.2
401            - pattern: '^dclkin\.[012]$'
402            - pattern: '^dclkin\.[012]$'
403            - pattern: '^dclkin\.[012]$'
404
405        interrupts:
406          maxItems: 3
407
408        resets:
409          maxItems: 1
410
411        reset-names:
412          items:
413            - const: du.0
414
415        ports:
416          properties:
417            port@0:
418              description: DPAD 0
419            port@1:
420              description: LVDS 0
421            port@2:
422              description: LVDS 1
423            # port@3 is TCON, not supported yet
424            port@3: false
425
426          required:
427            - port@0
428            - port@1
429            - port@2
430
431      required:
432        - clock-names
433        - interrupts
434        - resets
435        - reset-names
436
437  - if:
438      properties:
439        compatible:
440          contains:
441            enum:
442              - renesas,du-r8a7795
443    then:
444      properties:
445        clocks:
446          minItems: 4
447          maxItems: 8
448          items:
449            - description: Functional clock for DU0
450            - description: Functional clock for DU1
451            - description: Functional clock for DU2
452            - description: Functional clock for DU4
453            - description: DU_DOTCLKIN0 input clock
454            - description: DU_DOTCLKIN1 input clock
455            - description: DU_DOTCLKIN2 input clock
456            - description: DU_DOTCLKIN3 input clock
457
458        clock-names:
459          minItems: 4
460          maxItems: 8
461          items:
462            - const: du.0
463            - const: du.1
464            - const: du.2
465            - const: du.3
466            - pattern: '^dclkin\.[0123]$'
467            - pattern: '^dclkin\.[0123]$'
468            - pattern: '^dclkin\.[0123]$'
469            - pattern: '^dclkin\.[0123]$'
470
471        interrupts:
472          maxItems: 4
473
474        resets:
475          maxItems: 2
476
477        reset-names:
478          items:
479            - const: du.0
480            - const: du.2
481
482        ports:
483          properties:
484            port@0:
485              description: DPAD 0
486            port@1:
487              description: HDMI 0
488            port@2:
489              description: HDMI 1
490            port@3:
491              description: LVDS 0
492
493          required:
494            - port@0
495            - port@1
496            - port@2
497            - port@3
498
499        renesas,cmms:
500          minItems: 4
501
502        renesas,vsps:
503          minItems: 4
504
505      required:
506        - clock-names
507        - interrupts
508        - resets
509        - reset-names
510        - renesas,vsps
511
512  - if:
513      properties:
514        compatible:
515          contains:
516            enum:
517              - renesas,du-r8a774a1
518              - renesas,du-r8a7796
519              - renesas,du-r8a77961
520    then:
521      properties:
522        clocks:
523          minItems: 3
524          maxItems: 6
525          items:
526            - description: Functional clock for DU0
527            - description: Functional clock for DU1
528            - description: Functional clock for DU2
529            - description: DU_DOTCLKIN0 input clock
530            - description: DU_DOTCLKIN1 input clock
531            - description: DU_DOTCLKIN2 input clock
532
533        clock-names:
534          minItems: 3
535          maxItems: 6
536          items:
537            - const: du.0
538            - const: du.1
539            - const: du.2
540            - pattern: '^dclkin\.[012]$'
541            - pattern: '^dclkin\.[012]$'
542            - pattern: '^dclkin\.[012]$'
543
544        interrupts:
545          maxItems: 3
546
547        resets:
548          maxItems: 2
549
550        reset-names:
551          items:
552            - const: du.0
553            - const: du.2
554
555        ports:
556          properties:
557            port@0:
558              description: DPAD 0
559            port@1:
560              description: HDMI 0
561            port@2:
562              description: LVDS 0
563            port@3: false
564
565          required:
566            - port@0
567            - port@1
568            - port@2
569
570        renesas,cmms:
571          minItems: 3
572
573        renesas,vsps:
574          minItems: 3
575
576      required:
577        - clock-names
578        - interrupts
579        - resets
580        - reset-names
581        - renesas,vsps
582
583  - if:
584      properties:
585        compatible:
586          contains:
587            enum:
588              - renesas,du-r8a774b1
589              - renesas,du-r8a774e1
590              - renesas,du-r8a77965
591    then:
592      properties:
593        clocks:
594          minItems: 3
595          maxItems: 6
596          items:
597            - description: Functional clock for DU0
598            - description: Functional clock for DU1
599            - description: Functional clock for DU3
600            - description: DU_DOTCLKIN0 input clock
601            - description: DU_DOTCLKIN1 input clock
602            - description: DU_DOTCLKIN3 input clock
603
604        clock-names:
605          minItems: 3
606          maxItems: 6
607          items:
608            - const: du.0
609            - const: du.1
610            - const: du.3
611            - pattern: '^dclkin\.[013]$'
612            - pattern: '^dclkin\.[013]$'
613            - pattern: '^dclkin\.[013]$'
614
615        interrupts:
616          maxItems: 3
617
618        resets:
619          maxItems: 2
620
621        reset-names:
622          items:
623            - const: du.0
624            - const: du.3
625
626        ports:
627          properties:
628            port@0:
629              description: DPAD 0
630            port@1:
631              description: HDMI 0
632            port@2:
633              description: LVDS 0
634            port@3: false
635
636          required:
637            - port@0
638            - port@1
639            - port@2
640
641        renesas,cmms:
642          minItems: 3
643
644        renesas,vsps:
645          minItems: 3
646
647      required:
648        - clock-names
649        - interrupts
650        - resets
651        - reset-names
652        - renesas,vsps
653
654  - if:
655      properties:
656        compatible:
657          contains:
658            enum:
659              - renesas,du-r8a77970
660              - renesas,du-r8a77980
661    then:
662      properties:
663        clocks:
664          minItems: 1
665          maxItems: 2
666          items:
667            - description: Functional clock for DU0
668            - description: DU_DOTCLKIN0 input clock
669
670        clock-names:
671          minItems: 1
672          maxItems: 2
673          items:
674            - const: du.0
675            - const: dclkin.0
676
677        interrupts:
678          maxItems: 1
679
680        resets:
681          maxItems: 1
682
683        reset-names:
684          items:
685            - const: du.0
686
687        ports:
688          properties:
689            port@0:
690              description: DPAD 0
691            port@1:
692              description: LVDS 0
693            port@2: false
694            port@3: false
695
696          required:
697            - port@0
698            - port@1
699
700        renesas,vsps:
701          minItems: 1
702
703      required:
704        - clock-names
705        - interrupts
706        - resets
707        - reset-names
708        - renesas,vsps
709
710  - if:
711      properties:
712        compatible:
713          contains:
714            enum:
715              - renesas,du-r8a774c0
716              - renesas,du-r8a77990
717              - renesas,du-r8a77995
718    then:
719      properties:
720        clocks:
721          minItems: 2
722          maxItems: 4
723          items:
724            - description: Functional clock for DU0
725            - description: Functional clock for DU1
726            - description: DU_DOTCLKIN0 input clock
727            - description: DU_DOTCLKIN1 input clock
728
729        clock-names:
730          minItems: 2
731          maxItems: 4
732          items:
733            - const: du.0
734            - const: du.1
735            - pattern: '^dclkin\.[01]$'
736            - pattern: '^dclkin\.[01]$'
737
738        interrupts:
739          maxItems: 2
740
741        resets:
742          maxItems: 1
743
744        reset-names:
745          items:
746            - const: du.0
747
748        ports:
749          properties:
750            port@0:
751              description: DPAD 0
752            port@1:
753              description: LVDS 0
754            port@2:
755              description: LVDS 1
756            # port@3 is TCON, not supported yet
757            port@3: false
758
759          required:
760            - port@0
761            - port@1
762            - port@2
763
764        renesas,cmms:
765          minItems: 2
766
767        renesas,vsps:
768          minItems: 2
769
770      required:
771        - clock-names
772        - interrupts
773        - resets
774        - reset-names
775        - renesas,vsps
776
777additionalProperties: false
778
779examples:
780  # R-Car H3 ES2.0 DU
781  - |
782    #include <dt-bindings/clock/renesas-cpg-mssr.h>
783    #include <dt-bindings/interrupt-controller/arm-gic.h>
784
785    display@feb00000 {
786        compatible = "renesas,du-r8a7795";
787        reg = <0xfeb00000 0x80000>;
788        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
789                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
790                     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>,
791                     <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
792        clocks = <&cpg CPG_MOD 724>,
793                 <&cpg CPG_MOD 723>,
794                 <&cpg CPG_MOD 722>,
795                 <&cpg CPG_MOD 721>;
796        clock-names = "du.0", "du.1", "du.2", "du.3";
797        resets = <&cpg 724>, <&cpg 722>;
798        reset-names = "du.0", "du.2";
799
800        renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
801        renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
802
803        ports {
804            #address-cells = <1>;
805            #size-cells = <0>;
806
807            port@0 {
808                reg = <0>;
809                endpoint {
810                    remote-endpoint = <&adv7123_in>;
811                };
812            };
813            port@1 {
814                reg = <1>;
815                endpoint {
816                    remote-endpoint = <&dw_hdmi0_in>;
817                };
818            };
819            port@2 {
820                reg = <2>;
821                endpoint {
822                    remote-endpoint = <&dw_hdmi1_in>;
823                };
824            };
825            port@3 {
826                reg = <3>;
827                endpoint {
828                    remote-endpoint = <&lvds0_in>;
829                };
830            };
831        };
832    };
833
834...
835