xref: /freebsd/sys/contrib/device-tree/Bindings/media/renesas,rzg2l-cru.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28bab661aSEmmanuel Vadot# Copyright (C) 2022 Renesas Electronics Corp.
38bab661aSEmmanuel Vadot%YAML 1.2
48bab661aSEmmanuel Vadot---
58bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/media/renesas,rzg2l-cru.yaml#
68bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
78bab661aSEmmanuel Vadot
88bab661aSEmmanuel Vadottitle: Renesas RZ/G2L (and alike SoC's) Camera Data Receiving Unit (CRU) Image processing
98bab661aSEmmanuel Vadot
108bab661aSEmmanuel Vadotmaintainers:
118bab661aSEmmanuel Vadot  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
128bab661aSEmmanuel Vadot
138bab661aSEmmanuel Vadotdescription:
148bab661aSEmmanuel Vadot  The CRU image processing module is a data conversion module equipped with pixel
158bab661aSEmmanuel Vadot  color space conversion, LUT, pixel format conversion, etc. An MIPI CSI-2 input and
168bab661aSEmmanuel Vadot  parallel (including ITU-R BT.656) input are provided as the image sensor interface.
178bab661aSEmmanuel Vadot
188bab661aSEmmanuel Vadotproperties:
198bab661aSEmmanuel Vadot  compatible:
208bab661aSEmmanuel Vadot    items:
218bab661aSEmmanuel Vadot      - enum:
22*0e8011faSEmmanuel Vadot          - renesas,r9a07g043-cru       # RZ/G2UL
238bab661aSEmmanuel Vadot          - renesas,r9a07g044-cru       # RZ/G2{L,LC}
248bab661aSEmmanuel Vadot          - renesas,r9a07g054-cru       # RZ/V2L
258bab661aSEmmanuel Vadot      - const: renesas,rzg2l-cru
268bab661aSEmmanuel Vadot
278bab661aSEmmanuel Vadot  reg:
288bab661aSEmmanuel Vadot    maxItems: 1
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot  interrupts:
318bab661aSEmmanuel Vadot    maxItems: 3
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel Vadot  interrupt-names:
348bab661aSEmmanuel Vadot    items:
358bab661aSEmmanuel Vadot      - const: image_conv
368bab661aSEmmanuel Vadot      - const: image_conv_err
378bab661aSEmmanuel Vadot      - const: axi_mst_err
388bab661aSEmmanuel Vadot
398bab661aSEmmanuel Vadot  clocks:
408bab661aSEmmanuel Vadot    items:
418bab661aSEmmanuel Vadot      - description: CRU Main clock
428bab661aSEmmanuel Vadot      - description: CRU Register access clock
438bab661aSEmmanuel Vadot      - description: CRU image transfer clock
448bab661aSEmmanuel Vadot
458bab661aSEmmanuel Vadot  clock-names:
468bab661aSEmmanuel Vadot    items:
478bab661aSEmmanuel Vadot      - const: video
488bab661aSEmmanuel Vadot      - const: apb
498bab661aSEmmanuel Vadot      - const: axi
508bab661aSEmmanuel Vadot
518bab661aSEmmanuel Vadot  power-domains:
528bab661aSEmmanuel Vadot    maxItems: 1
538bab661aSEmmanuel Vadot
548bab661aSEmmanuel Vadot  resets:
558bab661aSEmmanuel Vadot    items:
568bab661aSEmmanuel Vadot      - description: CRU_PRESETN reset terminal
578bab661aSEmmanuel Vadot      - description: CRU_ARESETN reset terminal
588bab661aSEmmanuel Vadot
598bab661aSEmmanuel Vadot  reset-names:
608bab661aSEmmanuel Vadot    items:
618bab661aSEmmanuel Vadot      - const: presetn
628bab661aSEmmanuel Vadot      - const: aresetn
638bab661aSEmmanuel Vadot
648bab661aSEmmanuel Vadot  ports:
658bab661aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
668bab661aSEmmanuel Vadot
678bab661aSEmmanuel Vadot    properties:
688bab661aSEmmanuel Vadot      port@0:
698bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
708bab661aSEmmanuel Vadot        unevaluatedProperties: false
718bab661aSEmmanuel Vadot        description:
728bab661aSEmmanuel Vadot          Input port node, single endpoint describing a parallel input source.
738bab661aSEmmanuel Vadot
748bab661aSEmmanuel Vadot        properties:
758bab661aSEmmanuel Vadot          endpoint:
768bab661aSEmmanuel Vadot            $ref: video-interfaces.yaml#
778bab661aSEmmanuel Vadot            unevaluatedProperties: false
788bab661aSEmmanuel Vadot
798bab661aSEmmanuel Vadot            properties:
808bab661aSEmmanuel Vadot              hsync-active: true
818bab661aSEmmanuel Vadot              vsync-active: true
828bab661aSEmmanuel Vadot              bus-width: true
838bab661aSEmmanuel Vadot              data-shift: true
848bab661aSEmmanuel Vadot
858bab661aSEmmanuel Vadot      port@1:
868bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
878bab661aSEmmanuel Vadot        description:
888bab661aSEmmanuel Vadot          Input port node, describing the Image Processing module connected to the
898bab661aSEmmanuel Vadot          CSI-2 receiver.
908bab661aSEmmanuel Vadot
918bab661aSEmmanuel Vadotrequired:
928bab661aSEmmanuel Vadot  - compatible
938bab661aSEmmanuel Vadot  - reg
948bab661aSEmmanuel Vadot  - interrupts
958bab661aSEmmanuel Vadot  - interrupt-names
968bab661aSEmmanuel Vadot  - clocks
978bab661aSEmmanuel Vadot  - clock-names
988bab661aSEmmanuel Vadot  - resets
998bab661aSEmmanuel Vadot  - reset-names
1008bab661aSEmmanuel Vadot  - power-domains
1018bab661aSEmmanuel Vadot
102*0e8011faSEmmanuel VadotallOf:
103*0e8011faSEmmanuel Vadot  - if:
104*0e8011faSEmmanuel Vadot      properties:
105*0e8011faSEmmanuel Vadot        compatible:
106*0e8011faSEmmanuel Vadot          contains:
107*0e8011faSEmmanuel Vadot            enum:
108*0e8011faSEmmanuel Vadot              - renesas,r9a07g044-cru
109*0e8011faSEmmanuel Vadot              - renesas,r9a07g054-cru
110*0e8011faSEmmanuel Vadot    then:
111*0e8011faSEmmanuel Vadot      properties:
112*0e8011faSEmmanuel Vadot        ports:
113*0e8011faSEmmanuel Vadot          required:
114*0e8011faSEmmanuel Vadot            - port@0
115*0e8011faSEmmanuel Vadot            - port@1
116*0e8011faSEmmanuel Vadot
117*0e8011faSEmmanuel Vadot  - if:
118*0e8011faSEmmanuel Vadot      properties:
119*0e8011faSEmmanuel Vadot        compatible:
120*0e8011faSEmmanuel Vadot          contains:
121*0e8011faSEmmanuel Vadot            enum:
122*0e8011faSEmmanuel Vadot              - renesas,r9a07g043-cru
123*0e8011faSEmmanuel Vadot    then:
124*0e8011faSEmmanuel Vadot      properties:
125*0e8011faSEmmanuel Vadot        ports:
126*0e8011faSEmmanuel Vadot          properties:
127*0e8011faSEmmanuel Vadot            port@0: false
128*0e8011faSEmmanuel Vadot
129*0e8011faSEmmanuel Vadot          required:
130*0e8011faSEmmanuel Vadot            - port@1
131*0e8011faSEmmanuel Vadot
1328bab661aSEmmanuel VadotadditionalProperties: false
1338bab661aSEmmanuel Vadot
1348bab661aSEmmanuel Vadotexamples:
1358bab661aSEmmanuel Vadot  # Device node example with CSI-2
1368bab661aSEmmanuel Vadot  - |
1378bab661aSEmmanuel Vadot    #include <dt-bindings/clock/r9a07g044-cpg.h>
1388bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1398bab661aSEmmanuel Vadot
1408bab661aSEmmanuel Vadot    cru: video@10830000 {
1418bab661aSEmmanuel Vadot        compatible = "renesas,r9a07g044-cru", "renesas,rzg2l-cru";
1428bab661aSEmmanuel Vadot        reg = <0x10830000 0x400>;
1438bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
1448bab661aSEmmanuel Vadot                     <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
1458bab661aSEmmanuel Vadot                     <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
1468bab661aSEmmanuel Vadot        interrupt-names = "image_conv", "image_conv_err", "axi_mst_err";
1478bab661aSEmmanuel Vadot        clocks = <&cpg CPG_MOD R9A07G044_CRU_VCLK>,
1488bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_PCLK>,
1498bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_ACLK>;
1508bab661aSEmmanuel Vadot        clock-names = "video", "apb", "axi";
1518bab661aSEmmanuel Vadot        power-domains = <&cpg>;
1528bab661aSEmmanuel Vadot        resets = <&cpg R9A07G044_CRU_PRESETN>,
1538bab661aSEmmanuel Vadot                 <&cpg R9A07G044_CRU_ARESETN>;
1548bab661aSEmmanuel Vadot        reset-names = "presetn", "aresetn";
1558bab661aSEmmanuel Vadot
1568bab661aSEmmanuel Vadot        ports {
1578bab661aSEmmanuel Vadot            #address-cells = <1>;
1588bab661aSEmmanuel Vadot            #size-cells = <0>;
1598bab661aSEmmanuel Vadot
1608bab661aSEmmanuel Vadot            port@0 {
1618bab661aSEmmanuel Vadot                #address-cells = <1>;
1628bab661aSEmmanuel Vadot                #size-cells = <0>;
1638bab661aSEmmanuel Vadot                reg = <0>;
1648bab661aSEmmanuel Vadot
1658bab661aSEmmanuel Vadot                cru_parallel_in: endpoint@0 {
1668bab661aSEmmanuel Vadot                    reg = <0>;
1678bab661aSEmmanuel Vadot                    remote-endpoint = <&ov5642>;
1688bab661aSEmmanuel Vadot                    hsync-active = <1>;
1698bab661aSEmmanuel Vadot                    vsync-active = <1>;
1708bab661aSEmmanuel Vadot                };
1718bab661aSEmmanuel Vadot            };
1728bab661aSEmmanuel Vadot
1738bab661aSEmmanuel Vadot            port@1 {
1748bab661aSEmmanuel Vadot                #address-cells = <1>;
1758bab661aSEmmanuel Vadot                #size-cells = <0>;
1768bab661aSEmmanuel Vadot                reg = <1>;
1778bab661aSEmmanuel Vadot
1788bab661aSEmmanuel Vadot                cru_csi_in: endpoint@0 {
1798bab661aSEmmanuel Vadot                    reg = <0>;
1808bab661aSEmmanuel Vadot                    remote-endpoint = <&csi_cru_in>;
1818bab661aSEmmanuel Vadot                };
1828bab661aSEmmanuel Vadot            };
1838bab661aSEmmanuel Vadot        };
1848bab661aSEmmanuel Vadot    };
185