xref: /openbmc/linux/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml (revision aab402ea9b4827f6d8d4a7c58d7492124b493e02)
172051783SSakari Ailus# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
272051783SSakari Ailus# Copyright (C) 2014--2020 Intel Corporation
372051783SSakari Ailus
472051783SSakari Ailus$id: http://devicetree.org/schemas/media/i2c/mipi-ccs.yaml#
572051783SSakari Ailus$schema: http://devicetree.org/meta-schemas/core.yaml#
672051783SSakari Ailus
772051783SSakari Ailustitle: MIPI CCS, SMIA++ and SMIA compliant camera sensors
872051783SSakari Ailus
972051783SSakari Ailusmaintainers:
1072051783SSakari Ailus  - Sakari Ailus <sakari.ailus@linux.intel.com>
1172051783SSakari Ailus
1272051783SSakari Ailusdescription:
1372051783SSakari Ailus
1472051783SSakari Ailus  CCS (Camera Command Set) is a raw Bayer camera sensor standard defined by the
1572051783SSakari Ailus  MIPI Alliance; see
1672051783SSakari Ailus  <URL:https://www.mipi.org/specifications/camera-command-set>.
1772051783SSakari Ailus
1872051783SSakari Ailus  SMIA (Standard Mobile Imaging Architecture) is an image sensor standard
1972051783SSakari Ailus  defined jointly by Nokia and ST. SMIA++, defined by Nokia, is an extension of
2072051783SSakari Ailus  that.
2172051783SSakari Ailus
2272051783SSakari Ailus  More detailed documentation can be found in
2372051783SSakari Ailus  Documentation/devicetree/bindings/media/video-interfaces.txt .
2472051783SSakari Ailus
2572051783SSakari Ailusproperties:
2672051783SSakari Ailus  compatible:
2772051783SSakari Ailus    oneOf:
2872051783SSakari Ailus      - items:
2972051783SSakari Ailus        - const: mipi-ccs-1.1
3072051783SSakari Ailus        - const: mipi-ccs
3172051783SSakari Ailus      - items:
3272051783SSakari Ailus        - const: mipi-ccs-1.0
3372051783SSakari Ailus        - const: mipi-ccs
3472051783SSakari Ailus      - const: nokia,smia
3572051783SSakari Ailus
3672051783SSakari Ailus  reg:
3772051783SSakari Ailus    maxItems: 1
3872051783SSakari Ailus
3972051783SSakari Ailus  vana-supply:
4072051783SSakari Ailus    description: Analogue voltage supply (VANA), typically 2,8 volts (sensor
4172051783SSakari Ailus      dependent).
4272051783SSakari Ailus    maxItems: 1
4372051783SSakari Ailus
4472051783SSakari Ailus  clocks:
4572051783SSakari Ailus    description: External clock to the sensor.
4672051783SSakari Ailus    maxItems: 1
4772051783SSakari Ailus
4872051783SSakari Ailus  clock-frequency:
4972051783SSakari Ailus    description: Frequency of the external clock to the sensor in Hz.
5072051783SSakari Ailus
5172051783SSakari Ailus  reset-gpios:
5272051783SSakari Ailus    description: Reset GPIO. Also commonly called XSHUTDOWN in hardware
5372051783SSakari Ailus      documentation.
5472051783SSakari Ailus    maxItems: 1
5572051783SSakari Ailus
5672051783SSakari Ailus  flash-leds:
5772051783SSakari Ailus    description: Flash LED phandles. See ../video-interfaces.txt for details.
5872051783SSakari Ailus
5972051783SSakari Ailus  lens-focus:
6072051783SSakari Ailus    description: Lens focus controller phandles. See ../video-interfaces.txt
6172051783SSakari Ailus      for details.
6272051783SSakari Ailus
6372051783SSakari Ailus  rotation:
6472051783SSakari Ailus    description: Rotation of the sensor.  See ../video-interfaces.txt for
6572051783SSakari Ailus      details.
6672051783SSakari Ailus    enum: [ 0, 180 ]
6772051783SSakari Ailus
6872051783SSakari Ailus  port:
6972051783SSakari Ailus    type: object
7072051783SSakari Ailus    properties:
7172051783SSakari Ailus      endpoint:
7272051783SSakari Ailus        type: object
7372051783SSakari Ailus        properties:
7472051783SSakari Ailus          link-frequencies:
7572051783SSakari Ailus            $ref: /schemas/types.yaml#/definitions/uint64-array
7672051783SSakari Ailus            description: List of allowed data link frequencies.
7772051783SSakari Ailus          data-lanes:
7872051783SSakari Ailus            minItems: 1
7972051783SSakari Ailus            maxItems: 8
80*aab402eaSSakari Ailus          bus-type:
81*aab402eaSSakari Ailus            description: The type of the data bus.
82*aab402eaSSakari Ailus            oneOf:
83*aab402eaSSakari Ailus              - const: 1 # CSI-2 C-PHY
84*aab402eaSSakari Ailus              - const: 3 # CCP2
85*aab402eaSSakari Ailus              - const: 4 # CSI-2 D-PHY
86*aab402eaSSakari Ailus
8772051783SSakari Ailus        required:
8872051783SSakari Ailus          - link-frequencies
8972051783SSakari Ailus          - data-lanes
90*aab402eaSSakari Ailus          - bus-type
9172051783SSakari Ailus
9272051783SSakari Ailusrequired:
9372051783SSakari Ailus  - compatible
9472051783SSakari Ailus  - reg
9572051783SSakari Ailus  - clock-frequency
9672051783SSakari Ailus  - clocks
9772051783SSakari Ailus
9872051783SSakari AilusadditionalProperties: false
9972051783SSakari Ailus
10072051783SSakari Ailusexamples:
10172051783SSakari Ailus  - |
10272051783SSakari Ailus    #include <dt-bindings/gpio/gpio.h>
10372051783SSakari Ailus
10472051783SSakari Ailus    i2c2 {
10572051783SSakari Ailus        #address-cells = <1>;
10672051783SSakari Ailus        #size-cells = <0>;
10772051783SSakari Ailus
10872051783SSakari Ailus        clock-frequency = <400000>;
10972051783SSakari Ailus
11072051783SSakari Ailus        camera-sensor@10 {
11172051783SSakari Ailus            compatible = "mipi-ccs-1.0", "mipi-ccs";
11272051783SSakari Ailus            reg = <0x10>;
11372051783SSakari Ailus            reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
11472051783SSakari Ailus            vana-supply = <&vaux3>;
11572051783SSakari Ailus            clocks = <&omap3_isp 0>;
11672051783SSakari Ailus            clock-frequency = <9600000>;
11772051783SSakari Ailus            port {
11872051783SSakari Ailus                ccs_ep: endpoint {
11972051783SSakari Ailus                    data-lanes = <1 2>;
12072051783SSakari Ailus                    remote-endpoint = <&csi2a_ep>;
12172051783SSakari Ailus                    link-frequencies = /bits/ 64 <199200000 210000000
12272051783SSakari Ailus                                                  499200000>;
123*aab402eaSSakari Ailus                    bus-type = <4>;
12472051783SSakari Ailus                };
12572051783SSakari Ailus            };
12672051783SSakari Ailus        };
12772051783SSakari Ailus    };
12872051783SSakari Ailus...
129