xref: /freebsd/sys/contrib/device-tree/Bindings/media/renesas,rzg2l-csi2.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-csi2.yaml#
68bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
78bab661aSEmmanuel Vadot
88bab661aSEmmanuel Vadottitle: Renesas RZ/G2L (and alike SoC's) MIPI CSI-2 receiver
98bab661aSEmmanuel Vadot
108bab661aSEmmanuel Vadotmaintainers:
118bab661aSEmmanuel Vadot  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
128bab661aSEmmanuel Vadot
138bab661aSEmmanuel Vadotdescription:
148bab661aSEmmanuel Vadot  The CSI-2 receiver device provides MIPI CSI-2 capabilities for the Renesas RZ/G2L
158bab661aSEmmanuel Vadot  (and alike SoCs). MIPI CSI-2 is part of the CRU block which is used in conjunction
168bab661aSEmmanuel Vadot  with the Image Processing module, which provides the video capture capabilities.
178bab661aSEmmanuel Vadot
188bab661aSEmmanuel Vadotproperties:
198bab661aSEmmanuel Vadot  compatible:
208bab661aSEmmanuel Vadot    items:
218bab661aSEmmanuel Vadot      - enum:
22*0e8011faSEmmanuel Vadot          - renesas,r9a07g043-csi2       # RZ/G2UL
238bab661aSEmmanuel Vadot          - renesas,r9a07g044-csi2       # RZ/G2{L,LC}
248bab661aSEmmanuel Vadot          - renesas,r9a07g054-csi2       # RZ/V2L
258bab661aSEmmanuel Vadot      - const: renesas,rzg2l-csi2
268bab661aSEmmanuel Vadot
278bab661aSEmmanuel Vadot  reg:
288bab661aSEmmanuel Vadot    maxItems: 1
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot  interrupts:
318bab661aSEmmanuel Vadot    maxItems: 1
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel Vadot  clocks:
348bab661aSEmmanuel Vadot    items:
358bab661aSEmmanuel Vadot      - description: Internal clock for connecting CRU and MIPI
368bab661aSEmmanuel Vadot      - description: CRU Main clock
378bab661aSEmmanuel Vadot      - description: CRU Register access clock
388bab661aSEmmanuel Vadot
398bab661aSEmmanuel Vadot  clock-names:
408bab661aSEmmanuel Vadot    items:
418bab661aSEmmanuel Vadot      - const: system
428bab661aSEmmanuel Vadot      - const: video
438bab661aSEmmanuel Vadot      - const: apb
448bab661aSEmmanuel Vadot
458bab661aSEmmanuel Vadot  power-domains:
468bab661aSEmmanuel Vadot    maxItems: 1
478bab661aSEmmanuel Vadot
488bab661aSEmmanuel Vadot  resets:
498bab661aSEmmanuel Vadot    items:
508bab661aSEmmanuel Vadot      - description: CRU_PRESETN reset terminal
518bab661aSEmmanuel Vadot      - description: CRU_CMN_RSTB reset terminal
528bab661aSEmmanuel Vadot
538bab661aSEmmanuel Vadot  reset-names:
548bab661aSEmmanuel Vadot    items:
558bab661aSEmmanuel Vadot      - const: presetn
568bab661aSEmmanuel Vadot      - const: cmn-rstb
578bab661aSEmmanuel Vadot
588bab661aSEmmanuel Vadot  ports:
598bab661aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
608bab661aSEmmanuel Vadot
618bab661aSEmmanuel Vadot    properties:
628bab661aSEmmanuel Vadot      port@0:
638bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
648bab661aSEmmanuel Vadot        unevaluatedProperties: false
658bab661aSEmmanuel Vadot        description:
668bab661aSEmmanuel Vadot          Input port node, single endpoint describing the CSI-2 transmitter.
678bab661aSEmmanuel Vadot
688bab661aSEmmanuel Vadot        properties:
698bab661aSEmmanuel Vadot          endpoint:
708bab661aSEmmanuel Vadot            $ref: video-interfaces.yaml#
718bab661aSEmmanuel Vadot            unevaluatedProperties: false
728bab661aSEmmanuel Vadot
738bab661aSEmmanuel Vadot            properties:
748bab661aSEmmanuel Vadot              data-lanes:
758bab661aSEmmanuel Vadot                minItems: 1
768bab661aSEmmanuel Vadot                maxItems: 4
778bab661aSEmmanuel Vadot                items:
788bab661aSEmmanuel Vadot                  maximum: 4
798bab661aSEmmanuel Vadot
808bab661aSEmmanuel Vadot            required:
818bab661aSEmmanuel Vadot              - clock-lanes
828bab661aSEmmanuel Vadot              - data-lanes
838bab661aSEmmanuel Vadot
848bab661aSEmmanuel Vadot      port@1:
858bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
868bab661aSEmmanuel Vadot        description:
878bab661aSEmmanuel Vadot          Output port node, Image Processing block connected to the CSI-2 receiver.
888bab661aSEmmanuel Vadot
898bab661aSEmmanuel Vadot    required:
908bab661aSEmmanuel Vadot      - port@0
918bab661aSEmmanuel Vadot      - port@1
928bab661aSEmmanuel Vadot
938bab661aSEmmanuel Vadotrequired:
948bab661aSEmmanuel Vadot  - compatible
958bab661aSEmmanuel Vadot  - reg
968bab661aSEmmanuel Vadot  - interrupts
978bab661aSEmmanuel Vadot  - clocks
988bab661aSEmmanuel Vadot  - clock-names
998bab661aSEmmanuel Vadot  - power-domains
1008bab661aSEmmanuel Vadot  - resets
1018bab661aSEmmanuel Vadot  - reset-names
1028bab661aSEmmanuel Vadot  - ports
1038bab661aSEmmanuel Vadot
1048bab661aSEmmanuel VadotadditionalProperties: false
1058bab661aSEmmanuel Vadot
1068bab661aSEmmanuel Vadotexamples:
1078bab661aSEmmanuel Vadot  - |
1088bab661aSEmmanuel Vadot    #include <dt-bindings/clock/r9a07g044-cpg.h>
1098bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1108bab661aSEmmanuel Vadot
1118bab661aSEmmanuel Vadot    csi: csi@10830400 {
1128bab661aSEmmanuel Vadot        compatible = "renesas,r9a07g044-csi2", "renesas,rzg2l-csi2";
1138bab661aSEmmanuel Vadot        reg = <0x10830400 0xfc00>;
1148bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
1158bab661aSEmmanuel Vadot        clocks = <&cpg CPG_MOD R9A07G044_CRU_SYSCLK>,
1168bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_VCLK>,
1178bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_PCLK>;
1188bab661aSEmmanuel Vadot        clock-names = "system", "video", "apb";
1198bab661aSEmmanuel Vadot        power-domains = <&cpg>;
1208bab661aSEmmanuel Vadot        resets = <&cpg R9A07G044_CRU_PRESETN>,
1218bab661aSEmmanuel Vadot                 <&cpg R9A07G044_CRU_CMN_RSTB>;
1228bab661aSEmmanuel Vadot        reset-names = "presetn", "cmn-rstb";
1238bab661aSEmmanuel Vadot
1248bab661aSEmmanuel Vadot        ports {
1258bab661aSEmmanuel Vadot            #address-cells = <1>;
1268bab661aSEmmanuel Vadot            #size-cells = <0>;
1278bab661aSEmmanuel Vadot
1288bab661aSEmmanuel Vadot            port@0 {
1298bab661aSEmmanuel Vadot                reg = <0>;
1308bab661aSEmmanuel Vadot
1318bab661aSEmmanuel Vadot                csi2_in: endpoint {
1328bab661aSEmmanuel Vadot                    clock-lanes = <0>;
1338bab661aSEmmanuel Vadot                    data-lanes = <1 2>;
1348bab661aSEmmanuel Vadot                    remote-endpoint = <&ov5645_ep>;
1358bab661aSEmmanuel Vadot                };
1368bab661aSEmmanuel Vadot            };
1378bab661aSEmmanuel Vadot
1388bab661aSEmmanuel Vadot            port@1 {
1398bab661aSEmmanuel Vadot                #address-cells = <1>;
1408bab661aSEmmanuel Vadot                #size-cells = <0>;
1418bab661aSEmmanuel Vadot
1428bab661aSEmmanuel Vadot                reg = <1>;
1438bab661aSEmmanuel Vadot
1448bab661aSEmmanuel Vadot                csi2cru: endpoint@0 {
1458bab661aSEmmanuel Vadot                    reg = <0>;
1468bab661aSEmmanuel Vadot                    remote-endpoint = <&crucsi2>;
1478bab661aSEmmanuel Vadot                };
1488bab661aSEmmanuel Vadot            };
1498bab661aSEmmanuel Vadot        };
1508bab661aSEmmanuel Vadot    };
151