Documentation / devicetree / bindings / media / rockchip,rk3568-mipi-csi2.yaml


Based on kernel version 7.0. Page generated on 2026-04-23 09:48 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/rockchip,rk3568-mipi-csi2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip MIPI CSI-2 Receiver

maintainers:
  - Michael Riesch <michael.riesch@collabora.com>

description:
  The Rockchip MIPI CSI-2 Receiver is a CSI-2 bridge with one input port and
  one output port. It receives the data with the help of an external MIPI PHY
  (C-PHY or D-PHY) and passes it to the Rockchip Video Capture (VICAP) block.

properties:
  compatible:
    enum:
      - rockchip,rk3568-mipi-csi2

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: Interrupt that signals changes in CSI2HOST_ERR1.
      - description: Interrupt that signals changes in CSI2HOST_ERR2.

  interrupt-names:
    items:
      - const: err1
      - const: err2

  clocks:
    maxItems: 1

  phys:
    maxItems: 1
    description: MIPI C-PHY or D-PHY.

  ports:
    $ref: /schemas/graph.yaml#/properties/ports

    properties:
      port@0:
        $ref: /schemas/graph.yaml#/$defs/port-base
        unevaluatedProperties: false
        description: Input port node. Connect to e.g., a MIPI CSI-2 image sensor.

        properties:
          endpoint:
            $ref: video-interfaces.yaml#
            unevaluatedProperties: false

            properties:
              bus-type:
                enum:
                  - 1 # MEDIA_BUS_TYPE_CSI2_CPHY
                  - 4 # MEDIA_BUS_TYPE_CSI2_DPHY

              data-lanes:
                minItems: 1
                maxItems: 4

            required:
              - bus-type
              - data-lanes

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description: Output port connected to a Rockchip VICAP port.

    required:
      - port@0
      - port@1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

required:
  - compatible
  - reg
  - clocks
  - phys
  - ports
  - power-domains
  - resets

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/rk3568-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/media/video-interfaces.h>
    #include <dt-bindings/power/rk3568-power.h>
 
    soc {
        interrupt-parent = <&gic>;
        #address-cells = <2>;
        #size-cells = <2>;
 
        csi: csi@fdfb0000 {
            compatible = "rockchip,rk3568-mipi-csi2";
            reg = <0x0 0xfdfb0000 0x0 0x10000>;
            interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "err1", "err2";
            clocks = <&cru PCLK_CSI2HOST1>;
            phys = <&csi_dphy>;
            power-domains = <&power RK3568_PD_VI>;
            resets = <&cru SRST_P_CSI2HOST1>;
 
            ports {
                #address-cells = <1>;
                #size-cells = <0>;
 
                csi_in: port@0 {
                    reg = <0>;
 
                    csi_input: endpoint {
                        bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                        data-lanes = <1 2 3 4>;
                        remote-endpoint = <&imx415_output>;
                    };
                };
 
                csi_out: port@1 {
                    reg = <1>;
 
                    csi_output: endpoint {
                        remote-endpoint = <&vicap_mipi_input>;
                    };
                };
            };
        };
    };