1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright (c) 2019 MediaTek Inc.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/media/i2c/ov8856.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Omnivision OV8856 CMOS Sensor
9
10maintainers:
11  - Dongchun Zhu <dongchun.zhu@mediatek.com>
12
13description: |-
14  The Omnivision OV8856 is a high performance, 1/4-inch, 8 megapixel, CMOS
15  image sensor that delivers 3264x2448 at 30fps. It provides full-frame,
16  sub-sampled, and windowed 10-bit MIPI images in various formats via the
17  Serial Camera Control Bus (SCCB) interface. This chip is programmable
18  through I2C and two-wire SCCB. The sensor output is available via CSI-2
19  serial data output (up to 4-lane).
20
21properties:
22  compatible:
23    const: ovti,ov8856
24
25  reg:
26    maxItems: 1
27
28  clocks:
29    maxItems: 1
30
31  clock-names:
32    description:
33      Input clock for the sensor.
34    items:
35      - const: xvclk
36
37  clock-frequency:
38    description:
39      Frequency of the xvclk clock in Hertz.
40
41  dovdd-supply:
42    description:
43      Definition of the regulator used as interface power supply.
44
45  avdd-supply:
46    description:
47      Definition of the regulator used as analog power supply.
48
49  dvdd-supply:
50    description:
51      Definition of the regulator used as digital power supply.
52
53  reset-gpios:
54    description:
55      The phandle and specifier for the GPIO that controls sensor reset.
56      This corresponds to the hardware pin XSHUTDOWN which is physically
57      active low.
58
59  port:
60    $ref: /schemas/graph.yaml#/$defs/port-base
61    additionalProperties: false
62
63    properties:
64      endpoint:
65        $ref: /schemas/media/video-interfaces.yaml#
66        unevaluatedProperties: false
67
68        properties:
69          data-lanes:
70            description: |-
71              The driver only supports four-lane operation.
72            items:
73              - const: 1
74              - const: 2
75              - const: 3
76              - const: 4
77
78          link-frequencies:
79            description: Frequencies listed are driver, not h/w limitations.
80            maxItems: 2
81            items:
82              enum: [ 360000000, 180000000 ]
83
84        required:
85          - link-frequencies
86
87required:
88  - compatible
89  - reg
90  - clocks
91  - clock-names
92  - clock-frequency
93  - dovdd-supply
94  - avdd-supply
95  - dvdd-supply
96  - reset-gpios
97  - port
98
99additionalProperties: false
100
101examples:
102  - |
103    #include <dt-bindings/gpio/gpio.h>
104
105    i2c {
106        #address-cells = <1>;
107        #size-cells = <0>;
108
109        ov8856: camera@10 {
110            compatible = "ovti,ov8856";
111            reg = <0x10>;
112
113            reset-gpios = <&pio 111 GPIO_ACTIVE_LOW>;
114            pinctrl-names = "default";
115            pinctrl-0 = <&clk_24m_cam>;
116
117            clocks = <&cam_osc>;
118            clock-names = "xvclk";
119            clock-frequency = <19200000>;
120
121            avdd-supply = <&mt6358_vcama2_reg>;
122            dvdd-supply = <&mt6358_vcamd_reg>;
123            dovdd-supply = <&mt6358_vcamio_reg>;
124
125            port {
126                wcam_out: endpoint {
127                    remote-endpoint = <&mipi_in_wcam>;
128                    data-lanes = <1 2 3 4>;
129                    link-frequencies = /bits/ 64 <360000000>;
130                };
131            };
132        };
133    };
134...
135