xref: /openbmc/linux/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml (revision 87e4b53f8aba0d45b1c52677e74d7fcf9f56d7d0)
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:
40*87e4b53fSSakari Ailus    description: Analogue voltage supply (VANA), sensor dependent.
4172051783SSakari Ailus    maxItems: 1
4272051783SSakari Ailus
4372051783SSakari Ailus  clocks:
4472051783SSakari Ailus    description: External clock to the sensor.
4572051783SSakari Ailus    maxItems: 1
4672051783SSakari Ailus
4772051783SSakari Ailus  clock-frequency:
4872051783SSakari Ailus    description: Frequency of the external clock to the sensor in Hz.
4972051783SSakari Ailus
5072051783SSakari Ailus  reset-gpios:
5172051783SSakari Ailus    description: Reset GPIO. Also commonly called XSHUTDOWN in hardware
5272051783SSakari Ailus      documentation.
5372051783SSakari Ailus    maxItems: 1
5472051783SSakari Ailus
5572051783SSakari Ailus  flash-leds:
5672051783SSakari Ailus    description: Flash LED phandles. See ../video-interfaces.txt for details.
5772051783SSakari Ailus
5872051783SSakari Ailus  lens-focus:
5972051783SSakari Ailus    description: Lens focus controller phandles. See ../video-interfaces.txt
6072051783SSakari Ailus      for details.
6172051783SSakari Ailus
6272051783SSakari Ailus  rotation:
6372051783SSakari Ailus    description: Rotation of the sensor.  See ../video-interfaces.txt for
6472051783SSakari Ailus      details.
6572051783SSakari Ailus    enum: [ 0, 180 ]
6672051783SSakari Ailus
6772051783SSakari Ailus  port:
6872051783SSakari Ailus    type: object
6972051783SSakari Ailus    properties:
7072051783SSakari Ailus      endpoint:
7172051783SSakari Ailus        type: object
7272051783SSakari Ailus        properties:
7372051783SSakari Ailus          link-frequencies:
7472051783SSakari Ailus            $ref: /schemas/types.yaml#/definitions/uint64-array
7572051783SSakari Ailus            description: List of allowed data link frequencies.
7672051783SSakari Ailus          data-lanes:
7772051783SSakari Ailus            minItems: 1
7872051783SSakari Ailus            maxItems: 8
79aab402eaSSakari Ailus          bus-type:
80aab402eaSSakari Ailus            description: The type of the data bus.
81aab402eaSSakari Ailus            oneOf:
82aab402eaSSakari Ailus              - const: 1 # CSI-2 C-PHY
83aab402eaSSakari Ailus              - const: 3 # CCP2
84aab402eaSSakari Ailus              - const: 4 # CSI-2 D-PHY
85aab402eaSSakari Ailus
8672051783SSakari Ailus        required:
8772051783SSakari Ailus          - link-frequencies
8872051783SSakari Ailus          - data-lanes
89aab402eaSSakari Ailus          - bus-type
9072051783SSakari Ailus
9172051783SSakari Ailusrequired:
9272051783SSakari Ailus  - compatible
9372051783SSakari Ailus  - reg
9472051783SSakari Ailus  - clock-frequency
9572051783SSakari Ailus  - clocks
9672051783SSakari Ailus
9772051783SSakari AilusadditionalProperties: false
9872051783SSakari Ailus
9972051783SSakari Ailusexamples:
10072051783SSakari Ailus  - |
10172051783SSakari Ailus    #include <dt-bindings/gpio/gpio.h>
10272051783SSakari Ailus
10372051783SSakari Ailus    i2c2 {
10472051783SSakari Ailus        #address-cells = <1>;
10572051783SSakari Ailus        #size-cells = <0>;
10672051783SSakari Ailus
10772051783SSakari Ailus        clock-frequency = <400000>;
10872051783SSakari Ailus
10972051783SSakari Ailus        camera-sensor@10 {
11072051783SSakari Ailus            compatible = "mipi-ccs-1.0", "mipi-ccs";
11172051783SSakari Ailus            reg = <0x10>;
11272051783SSakari Ailus            reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
11372051783SSakari Ailus            vana-supply = <&vaux3>;
11472051783SSakari Ailus            clocks = <&omap3_isp 0>;
11572051783SSakari Ailus            clock-frequency = <9600000>;
11672051783SSakari Ailus            port {
11772051783SSakari Ailus                ccs_ep: endpoint {
11872051783SSakari Ailus                    data-lanes = <1 2>;
11972051783SSakari Ailus                    remote-endpoint = <&csi2a_ep>;
12072051783SSakari Ailus                    link-frequencies = /bits/ 64 <199200000 210000000
12172051783SSakari Ailus                                                  499200000>;
122aab402eaSSakari Ailus                    bus-type = <4>;
12372051783SSakari Ailus                };
12472051783SSakari Ailus            };
12572051783SSakari Ailus        };
12672051783SSakari Ailus    };
12772051783SSakari Ailus...
128