1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright (c) 2020 MediaTek Inc.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/media/i2c/ovti,ov02a10.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Omnivision OV02A10 CMOS Sensor Device Tree Bindings
9
10maintainers:
11  - Dongchun Zhu <dongchun.zhu@mediatek.com>
12
13description: |-
14  The Omnivision OV02A10 is a low-cost, high performance, 1/5-inch, 2 megapixel
15  image sensor, which is the latest production derived from Omnivision's CMOS
16  image sensor technology. Ihis chip supports high frame rate speeds up to 30fps
17  @ 1600x1200 (UXGA) resolution transferred over a 1-lane MIPI interface. The
18  sensor output is available via CSI-2 serial data output.
19
20properties:
21  compatible:
22    const: ovti,ov02a10
23
24  reg:
25    maxItems: 1
26
27  clocks:
28    maxItems: 1
29
30  clock-names:
31    description:
32      External clock for the sensor.
33    items:
34      - const: eclk
35
36  clock-frequency:
37    description:
38      Frequency of the eclk clock in Hz.
39
40  dovdd-supply:
41    description:
42      Definition of the regulator used as Digital I/O voltage supply.
43
44  avdd-supply:
45    description:
46      Definition of the regulator used as Analog voltage supply.
47
48  dvdd-supply:
49    description:
50      Definition of the regulator used as Digital core voltage supply.
51
52  powerdown-gpios:
53    description:
54      Must be the device tree identifier of the GPIO connected to the
55      PD_PAD pin. This pin is used to place the OV02A10 into standby mode
56      or shutdown mode. As the line needs to be high for the powerdown mode
57      to be active, it should be marked GPIO_ACTIVE_HIGH.
58    maxItems: 1
59
60  reset-gpios:
61    description:
62      Must be the device tree identifier of the GPIO connected to the
63      RST_PD pin. If specified, it will be asserted during driver probe.
64      As the line needs to be low for the reset to be active, it should be
65      marked GPIO_ACTIVE_LOW.
66    maxItems: 1
67
68  rotation:
69    description:
70      Definition of the sensor's placement.
71    allOf:
72      - $ref: "/schemas/types.yaml#/definitions/uint32"
73      - enum:
74          - 0    # Sensor Mounted Upright
75          - 180  # Sensor Mounted Upside Down
76        default: 0
77
78  # See ../video-interfaces.txt for details
79  port:
80    type: object
81    additionalProperties: false
82    description:
83      Output port node, single endpoint describing the CSI-2 transmitter.
84
85    properties:
86      endpoint:
87        type: object
88        additionalProperties: false
89
90        properties:
91          link-frequencies: true
92          ovti,mipi-clock-voltage:
93            allOf:
94              - $ref: "/schemas/types.yaml#/definitions/uint32"
95            description:
96              Definition of MIPI clock voltage unit. This entry corresponds to
97              the link speed defined by the 'link-frequencies' property.
98              If present, the value shall be in the range of 0-4.
99            default: 4
100          remote-endpoint: true
101
102        required:
103          - link-frequencies
104          - remote-endpoint
105
106    required:
107      - endpoint
108
109required:
110  - compatible
111  - reg
112  - clocks
113  - clock-names
114  - clock-frequency
115  - dovdd-supply
116  - avdd-supply
117  - dvdd-supply
118  - powerdown-gpios
119  - reset-gpios
120  - port
121
122additionalProperties: false
123
124examples:
125  - |
126    #include <dt-bindings/gpio/gpio.h>
127
128    i2c {
129        #address-cells = <1>;
130        #size-cells = <0>;
131
132        ov02a10: camera-sensor@3d {
133            compatible = "ovti,ov02a10";
134            reg = <0x3d>;
135
136            powerdown-gpios = <&pio 107 GPIO_ACTIVE_HIGH>;
137            reset-gpios = <&pio 109 GPIO_ACTIVE_LOW>;
138
139            clocks = <&ov02a10_clk>;
140            clock-names = "eclk";
141            clock-frequency = <24000000>;
142
143            rotation = <180>;
144
145            dovdd-supply = <&ov02a10_dovdd>;
146            avdd-supply = <&ov02a10_avdd>;
147            dvdd-supply = <&ov02a10_dvdd>;
148
149            port {
150                wcam_out: endpoint {
151                    link-frequencies = /bits/ 64 <390000000>;
152                    ovti,mipi-clock-voltage = <3>;
153                    remote-endpoint = <&mipi_in_wcam>;
154                };
155            };
156        };
157    };
158
159...
160