# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/ovti,ov2735.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: OmniVision OV2735 Image Sensor

maintainers:
  - Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>

description:
  The OmniVision OV2735 is a 2MP (1920x1080) color CMOS image sensor controlled
  through an I2C-compatible SCCB bus. it outputs RAW10 format and uses a 1/2.7"
  optical format.

properties:
  compatible:
    const: ovti,ov2735

  reg:
    maxItems: 1

  clocks:
    items:
      - description: XVCLK clock

  avdd-supply:
    description: Analog Domain Power Supply

  dovdd-supply:
    description: I/O Domain Power Supply

  dvdd-supply:
    description: Digital Domain Power Supply

  reset-gpios:
    maxItems: 1
    description: Reset Pin GPIO Control (active low)

  enable-gpios:
    maxItems: 1
    description:
      Active-low enable pin. Labeled as 'PWDN' in the datasheet, but acts as
      an enable signal. During power rail ramp-up, the device remains powered
      down. Once power rails are stable, pulling this pin low powers on the
      device.

  port:
    description: MIPI CSI-2 transmitter port
    $ref: /schemas/graph.yaml#/$defs/port-base
    additionalProperties: false

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

        properties:
          data-lanes:
            items:
              - const: 1
              - const: 2

        required:
          - data-lanes
          - link-frequencies

required:
  - compatible
  - reg
  - clocks
  - avdd-supply
  - dovdd-supply
  - dvdd-supply
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        camera-sensor@3c {
            compatible = "ovti,ov2735";
            reg = <0x3c>;
            clocks = <&ov2735_clk>;

            avdd-supply = <&ov2735_avdd>;
            dovdd-supply = <&ov2735_dovdd>;
            dvdd-supply = <&ov2735_dvdd>;

            reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
            enable-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;

            port {
                cam_out: endpoint {
                    remote-endpoint = <&mipi_in_cam>;
                    data-lanes = <1 2>;
                    link-frequencies = /bits/ 64 <420000000>;
                };
            };
        };
    };
