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 <[email protected]>
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      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
43      - renesas,du-r8a779g0 # for R-Car V4H compatible DU
44      - renesas,du-r8a779h0 # for R-Car V4M compatible DU
45
46  reg:
47    maxItems: 1
48
49  # See compatible-specific constraints below.
50  clocks: true
51  clock-names: true
52  interrupts:
53    description: Interrupt specifiers, one per DU channel
54  resets: true
55  reset-names: true
56
57  power-domains:
58    maxItems: 1
59
60  ports:
61    $ref: /schemas/graph.yaml#/properties/ports
62    description: |
63      The connections to the DU output video ports are modeled using the OF
64      graph bindings specified in Documentation/devicetree/bindings/graph.txt.
65      The number of ports and their assignment are model-dependent. Each port
66      shall have a single endpoint.
67
68    patternProperties:
69      "^port@[0-3]$":
70        $ref: /schemas/graph.yaml#/properties/port
71        unevaluatedProperties: false
72
73    unevaluatedProperties: false
74
75  renesas,cmms:
76    $ref: /schemas/types.yaml#/definitions/phandle-array
77    minItems: 1
78    maxItems: 4
79    items:
80      maxItems: 1
81    description:
82      A list of phandles to the CMM instances present in the SoC, one for each
83      available DU channel.
84
85  renesas,vsps:
86    $ref: /schemas/types.yaml#/definitions/phandle-array
87    minItems: 1
88    maxItems: 4
89    items:
90      items:
91        - description: phandle to VSP instance that serves the DU channel
92        - description: Channel index identifying the LIF instance in that VSP
93    description:
94      A list of phandle and channel index tuples to the VSPs that handle the
95      memory interfaces for the DU channels.
96
97required:
98  - compatible
99  - reg
100  - clocks
101  - interrupts
102  - ports
103
104allOf:
105  - if:
106      properties:
107        compatible:
108          contains:
109            const: renesas,du-r8a7779
110    then:
111      properties:
112        clocks:
113          minItems: 1
114          items:
115            - description: Functional clock
116            - description: DU_DOTCLKIN0 input clock
117            - description: DU_DOTCLKIN1 input clock
118
119        clock-names:
120          minItems: 1
121          items:
122            - const: du.0
123            - pattern: '^dclkin\.[01]$'
124            - pattern: '^dclkin\.[01]$'
125
126        interrupts:
127          maxItems: 1
128
129        resets:
130          maxItems: 1
131
132        ports:
133          properties:
134            port@0:
135              description: DPAD 0
136            port@1:
137              description: DPAD 1
138            # port@2 is TCON, not supported yet
139            port@2: false
140            port@3: false
141
142          required:
143            - port@0
144            - port@1
145
146      required:
147        - interrupts
148
149  - if:
150      properties:
151        compatible:
152          contains:
153            enum:
154              - renesas,du-r8a7743
155              - renesas,du-r8a7744
156              - renesas,du-r8a7791
157              - renesas,du-r8a7793
158    then:
159      properties:
160        clocks:
161          minItems: 2
162          items:
163            - description: Functional clock for DU0
164            - description: Functional clock for DU1
165            - description: DU_DOTCLKIN0 input clock
166            - description: DU_DOTCLKIN1 input clock
167
168        clock-names:
169          minItems: 2
170          items:
171            - const: du.0
172            - const: du.1
173            - pattern: '^dclkin\.[01]$'
174            - pattern: '^dclkin\.[01]$'
175
176        interrupts:
177          maxItems: 2
178
179        resets:
180          maxItems: 1
181
182        reset-names:
183          items:
184            - const: du.0
185
186        ports:
187          properties:
188            port@0:
189              description: DPAD 0
190            port@1:
191              description: LVDS 0
192            # port@2 is TCON, not supported yet
193            port@2: false
194            port@3: false
195
196          required:
197            - port@0
198            - port@1
199
200      required:
201        - clock-names
202        - interrupts
203        - resets
204        - reset-names
205
206  - if:
207      properties:
208        compatible:
209          contains:
210            enum:
211              - renesas,du-r8a7745
212              - renesas,du-r8a7792
213    then:
214      properties:
215        clocks:
216          minItems: 2
217          items:
218            - description: Functional clock for DU0
219            - description: Functional clock for DU1
220            - description: DU_DOTCLKIN0 input clock
221            - description: DU_DOTCLKIN1 input clock
222
223        clock-names:
224          minItems: 2
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          items:
271            - description: Functional clock for DU0
272            - description: Functional clock for DU1
273            - description: DU_DOTCLKIN0 input clock
274            - description: DU_DOTCLKIN1 input clock
275
276        clock-names:
277          minItems: 2
278          items:
279            - const: du.0
280            - const: du.1
281            - pattern: '^dclkin\.[01]$'
282            - pattern: '^dclkin\.[01]$'
283
284        interrupts:
285          maxItems: 2
286
287        resets:
288          maxItems: 1
289
290        reset-names:
291          items:
292            - const: du.0
293
294        ports:
295          properties:
296            port@0:
297              description: DPAD 0
298            port@1:
299              description: DPAD 1
300            # port@2 is TCON, not supported yet
301            port@2: false
302            port@3: false
303
304          required:
305            - port@0
306            - port@1
307
308      required:
309        - clock-names
310        - interrupts
311        - resets
312        - reset-names
313
314  - if:
315      properties:
316        compatible:
317          contains:
318            enum:
319              - renesas,du-r8a77470
320    then:
321      properties:
322        clocks:
323          minItems: 2
324          items:
325            - description: Functional clock for DU0
326            - description: Functional clock for DU1
327            - description: DU_DOTCLKIN0 input clock
328            - description: DU_DOTCLKIN1 input clock
329
330        clock-names:
331          minItems: 2
332          items:
333            - const: du.0
334            - const: du.1
335            - pattern: '^dclkin\.[01]$'
336            - pattern: '^dclkin\.[01]$'
337
338        interrupts:
339          maxItems: 2
340
341        resets:
342          maxItems: 1
343
344        reset-names:
345          items:
346            - const: du.0
347
348        ports:
349          properties:
350            port@0:
351              description: DPAD 0
352            port@1:
353              description: DPAD 1
354            port@2:
355              description: LVDS 0
356            # port@3 is DVENC, not supported yet
357            port@3: false
358
359          required:
360            - port@0
361            - port@1
362            - port@2
363
364      required:
365        - clock-names
366        - interrupts
367        - resets
368        - reset-names
369
370  - if:
371      properties:
372        compatible:
373          contains:
374            enum:
375              - renesas,du-r8a7742
376              - renesas,du-r8a7790
377    then:
378      properties:
379        clocks:
380          minItems: 3
381          items:
382            - description: Functional clock for DU0
383            - description: Functional clock for DU1
384            - description: Functional clock for DU2
385            - description: DU_DOTCLKIN0 input clock
386            - description: DU_DOTCLKIN1 input clock
387            - description: DU_DOTCLKIN2 input clock
388
389        clock-names:
390          minItems: 3
391          items:
392            - const: du.0
393            - const: du.1
394            - const: du.2
395            - pattern: '^dclkin\.[012]$'
396            - pattern: '^dclkin\.[012]$'
397            - pattern: '^dclkin\.[012]$'
398
399        interrupts:
400          maxItems: 3
401
402        resets:
403          maxItems: 1
404
405        reset-names:
406          items:
407            - const: du.0
408
409        ports:
410          properties:
411            port@0:
412              description: DPAD 0
413            port@1:
414              description: LVDS 0
415            port@2:
416              description: LVDS 1
417            # port@3 is TCON, not supported yet
418            port@3: false
419
420          required:
421            - port@0
422            - port@1
423            - port@2
424
425      required:
426        - clock-names
427        - interrupts
428        - resets
429        - reset-names
430
431  - if:
432      properties:
433        compatible:
434          contains:
435            enum:
436              - renesas,du-r8a7795
437    then:
438      properties:
439        clocks:
440          minItems: 4
441          items:
442            - description: Functional clock for DU0
443            - description: Functional clock for DU1
444            - description: Functional clock for DU2
445            - description: Functional clock for DU4
446            - description: DU_DOTCLKIN0 input clock
447            - description: DU_DOTCLKIN1 input clock
448            - description: DU_DOTCLKIN2 input clock
449            - description: DU_DOTCLKIN3 input clock
450
451        clock-names:
452          minItems: 4
453          items:
454            - const: du.0
455            - const: du.1
456            - const: du.2
457            - const: du.3
458            - pattern: '^dclkin\.[0123]$'
459            - pattern: '^dclkin\.[0123]$'
460            - pattern: '^dclkin\.[0123]$'
461            - pattern: '^dclkin\.[0123]$'
462
463        interrupts:
464          maxItems: 4
465
466        resets:
467          maxItems: 2
468
469        reset-names:
470          items:
471            - const: du.0
472            - const: du.2
473
474        ports:
475          properties:
476            port@0:
477              description: DPAD 0
478            port@1:
479              description: HDMI 0
480            port@2:
481              description: HDMI 1
482            port@3:
483              description: LVDS 0
484
485          required:
486            - port@0
487            - port@1
488            - port@2
489            - port@3
490
491        renesas,cmms:
492          minItems: 4
493          maxItems: 4
494
495        renesas,vsps:
496          minItems: 4
497          maxItems: 4
498
499      required:
500        - clock-names
501        - interrupts
502        - resets
503        - reset-names
504        - renesas,vsps
505
506  - if:
507      properties:
508        compatible:
509          contains:
510            enum:
511              - renesas,du-r8a774a1
512              - renesas,du-r8a7796
513              - renesas,du-r8a77961
514    then:
515      properties:
516        clocks:
517          minItems: 3
518          items:
519            - description: Functional clock for DU0
520            - description: Functional clock for DU1
521            - description: Functional clock for DU2
522            - description: DU_DOTCLKIN0 input clock
523            - description: DU_DOTCLKIN1 input clock
524            - description: DU_DOTCLKIN2 input clock
525
526        clock-names:
527          minItems: 3
528          items:
529            - const: du.0
530            - const: du.1
531            - const: du.2
532            - pattern: '^dclkin\.[012]$'
533            - pattern: '^dclkin\.[012]$'
534            - pattern: '^dclkin\.[012]$'
535
536        interrupts:
537          maxItems: 3
538
539        resets:
540          maxItems: 2
541
542        reset-names:
543          items:
544            - const: du.0
545            - const: du.2
546
547        ports:
548          properties:
549            port@0:
550              description: DPAD 0
551            port@1:
552              description: HDMI 0
553            port@2:
554              description: LVDS 0
555            port@3: false
556
557          required:
558            - port@0
559            - port@1
560            - port@2
561
562        renesas,cmms:
563          minItems: 3
564          maxItems: 3
565
566        renesas,vsps:
567          minItems: 3
568          maxItems: 3
569
570      required:
571        - clock-names
572        - interrupts
573        - resets
574        - reset-names
575        - renesas,vsps
576
577  - if:
578      properties:
579        compatible:
580          contains:
581            enum:
582              - renesas,du-r8a774b1
583              - renesas,du-r8a774e1
584              - renesas,du-r8a77965
585    then:
586      properties:
587        clocks:
588          minItems: 3
589          items:
590            - description: Functional clock for DU0
591            - description: Functional clock for DU1
592            - description: Functional clock for DU3
593            - description: DU_DOTCLKIN0 input clock
594            - description: DU_DOTCLKIN1 input clock
595            - description: DU_DOTCLKIN3 input clock
596
597        clock-names:
598          minItems: 3
599          items:
600            - const: du.0
601            - const: du.1
602            - const: du.3
603            - pattern: '^dclkin\.[013]$'
604            - pattern: '^dclkin\.[013]$'
605            - pattern: '^dclkin\.[013]$'
606
607        interrupts:
608          maxItems: 3
609
610        resets:
611          maxItems: 2
612
613        reset-names:
614          items:
615            - const: du.0
616            - const: du.3
617
618        ports:
619          properties:
620            port@0:
621              description: DPAD 0
622            port@1:
623              description: HDMI 0
624            port@2:
625              description: LVDS 0
626            port@3: false
627
628          required:
629            - port@0
630            - port@1
631            - port@2
632
633        renesas,cmms:
634          minItems: 3
635          maxItems: 3
636
637        renesas,vsps:
638          minItems: 3
639          maxItems: 3
640
641      required:
642        - clock-names
643        - interrupts
644        - resets
645        - reset-names
646        - renesas,vsps
647
648  - if:
649      properties:
650        compatible:
651          contains:
652            enum:
653              - renesas,du-r8a77970
654              - renesas,du-r8a77980
655    then:
656      properties:
657        clocks:
658          minItems: 1
659          items:
660            - description: Functional clock for DU0
661            - description: DU_DOTCLKIN0 input clock
662
663        clock-names:
664          minItems: 1
665          items:
666            - const: du.0
667            - const: dclkin.0
668
669        interrupts:
670          maxItems: 1
671
672        resets:
673          maxItems: 1
674
675        reset-names:
676          items:
677            - const: du.0
678
679        ports:
680          properties:
681            port@0:
682              description: DPAD 0
683            port@1:
684              description: LVDS 0
685            port@2: false
686            port@3: false
687
688          required:
689            - port@0
690            - port@1
691
692        renesas,vsps:
693          maxItems: 1
694
695      required:
696        - clock-names
697        - interrupts
698        - resets
699        - reset-names
700        - renesas,vsps
701
702  - if:
703      properties:
704        compatible:
705          contains:
706            enum:
707              - renesas,du-r8a774c0
708              - renesas,du-r8a77990
709              - renesas,du-r8a77995
710    then:
711      properties:
712        clocks:
713          minItems: 2
714          items:
715            - description: Functional clock for DU0
716            - description: Functional clock for DU1
717            - description: DU_DOTCLKIN0 input clock
718            - description: DU_DOTCLKIN1 input clock
719
720        clock-names:
721          minItems: 2
722          items:
723            - const: du.0
724            - const: du.1
725            - pattern: '^dclkin\.[01]$'
726            - pattern: '^dclkin\.[01]$'
727
728        interrupts:
729          maxItems: 2
730
731        resets:
732          maxItems: 1
733
734        reset-names:
735          items:
736            - const: du.0
737
738        ports:
739          properties:
740            port@0:
741              description: DPAD 0
742            port@1:
743              description: LVDS 0
744            port@2:
745              description: LVDS 1
746            # port@3 is TCON, not supported yet
747            port@3: false
748
749          required:
750            - port@0
751            - port@1
752            - port@2
753
754        renesas,cmms:
755          minItems: 2
756          maxItems: 2
757
758        renesas,vsps:
759          minItems: 2
760          maxItems: 2
761
762      required:
763        - clock-names
764        - interrupts
765        - resets
766        - reset-names
767        - renesas,vsps
768
769  - if:
770      properties:
771        compatible:
772          contains:
773            enum:
774              - renesas,du-r8a779a0
775              - renesas,du-r8a779g0
776    then:
777      properties:
778        clocks:
779          items:
780            - description: Functional clock
781
782        clock-names:
783          items:
784            - const: du.0
785
786        interrupts:
787          maxItems: 2
788
789        resets:
790          maxItems: 1
791
792        reset-names:
793          items:
794            - const: du.0
795
796        ports:
797          properties:
798            port@0:
799              description: DSI 0
800            port@1:
801              description: DSI 1
802            port@2: false
803            port@3: false
804
805          required:
806            - port@0
807            - port@1
808
809        renesas,vsps:
810          minItems: 2
811          maxItems: 2
812
813      required:
814        - clock-names
815        - interrupts
816        - resets
817        - reset-names
818        - renesas,vsps
819
820  - if:
821      properties:
822        compatible:
823          contains:
824            enum:
825              - renesas,du-r8a779h0
826    then:
827      properties:
828        clocks:
829          items:
830            - description: Functional clock
831
832        clock-names:
833          items:
834            - const: du.0
835
836        interrupts:
837          maxItems: 1
838
839        resets:
840          maxItems: 1
841
842        reset-names:
843          items:
844            - const: du.0
845
846        ports:
847          properties:
848            port@0:
849              description: DSI 0
850            port@1: false
851            port@2: false
852            port@3: false
853
854          required:
855            - port@0
856
857        renesas,vsps:
858          maxItems: 1
859
860      required:
861        - clock-names
862        - interrupts
863        - resets
864        - reset-names
865        - renesas,vsps
866
867additionalProperties: false
868
869examples:
870  # R-Car H3 ES2.0 DU
871  - |
872    #include <dt-bindings/clock/renesas-cpg-mssr.h>
873    #include <dt-bindings/interrupt-controller/arm-gic.h>
874
875    display@feb00000 {
876        compatible = "renesas,du-r8a7795";
877        reg = <0xfeb00000 0x80000>;
878        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
879                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
880                     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>,
881                     <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
882        clocks = <&cpg CPG_MOD 724>,
883                 <&cpg CPG_MOD 723>,
884                 <&cpg CPG_MOD 722>,
885                 <&cpg CPG_MOD 721>;
886        clock-names = "du.0", "du.1", "du.2", "du.3";
887        resets = <&cpg 724>, <&cpg 722>;
888        reset-names = "du.0", "du.2";
889
890        renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
891        renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
892
893        ports {
894            #address-cells = <1>;
895            #size-cells = <0>;
896
897            port@0 {
898                reg = <0>;
899                endpoint {
900                    remote-endpoint = <&adv7123_in>;
901                };
902            };
903            port@1 {
904                reg = <1>;
905                endpoint {
906                    remote-endpoint = <&dw_hdmi0_in>;
907                };
908            };
909            port@2 {
910                reg = <2>;
911                endpoint {
912                    remote-endpoint = <&dw_hdmi1_in>;
913                };
914            };
915            port@3 {
916                reg = <3>;
917                endpoint {
918                    remote-endpoint = <&lvds0_in>;
919                };
920            };
921        };
922    };
923
924...
925