1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/i2c/ovti,ov772x.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Omnivision OV7720/OV7725 CMOS sensor
8
9maintainers:
10  - Jacopo Mondi <jacopo@jmondi.org>
11
12description: |
13  The Omnivision OV7720/OV7725 sensor supports multiple resolutions output,
14  such as VGA, QVGA, and any size scaling down from CIF to 40x30. It also can
15  support the YUV422, RGB565/555/444, GRB422 or raw RGB output formats.
16
17properties:
18  compatible:
19    enum:
20      - ovti,ov7720
21      - ovti,ov7725
22
23  reg:
24    maxItems: 1
25
26  clocks:
27    maxItems: 1
28
29  reset-gpios:
30    description: |
31      Reference to the GPIO connected to the RSTB pin which is active low.
32    maxItems: 1
33
34  powerdown-gpios:
35    description: |
36      Reference to the GPIO connected to the PWDN pin which is active high.
37    maxItems: 1
38
39  port:
40    type: object
41    description: |
42      Video output port. See ../video-interfaces.txt.
43
44    properties:
45      endpoint:
46        type: object
47
48        properties:
49          bus-type:
50            enum: [5, 6]
51
52          bus-width:
53            enum: [8, 10]
54            default: 10
55
56          data-shift:
57            enum: [0, 2]
58            default: 0
59
60          hsync-active:
61            enum: [0, 1]
62            default: 1
63
64          vsync-active:
65            enum: [0, 1]
66            default: 1
67
68          pclk-sample:
69            enum: [0, 1]
70            default: 1
71
72        allOf:
73          - if:
74              properties:
75                bus-type:
76                  const: 6
77            then:
78              properties:
79                hsync-active: false
80                vsync-active: false
81
82          - if:
83              properties:
84                bus-width:
85                  const: 10
86            then:
87              properties:
88                data-shift:
89                  const: 0
90
91        required:
92          - bus-type
93
94        unevaluatedProperties: false
95
96    additionalProperties: false
97
98required:
99  - compatible
100  - reg
101  - clocks
102  - port
103
104additionalProperties: false
105
106examples:
107  - |
108    #include <dt-bindings/gpio/gpio.h>
109
110    i2c0 {
111        #address-cells = <1>;
112        #size-cells = <0>;
113        ov772x: camera@21 {
114            compatible = "ovti,ov7725";
115            reg = <0x21>;
116            reset-gpios = <&axi_gpio_0 0 GPIO_ACTIVE_LOW>;
117            powerdown-gpios = <&axi_gpio_0 1 GPIO_ACTIVE_LOW>;
118            clocks = <&xclk>;
119
120            port {
121                ov772x_0: endpoint {
122                    bus-type = <5>;
123                    vsync-active = <0>;
124                    hsync-active = <0>;
125                    pclk-sample = <0>;
126                    bus-width = <8>;
127                    data-shift = <0>;
128                    remote-endpoint = <&vcap1_in0>;
129                };
130            };
131        };
132    };
133
134...
135