summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/media/i2c/ovti,ov772x.yaml
blob: 44529425ce3a01d17503c0bdab6f464bf35dfe6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/ovti,ov772x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Omnivision OV7720/OV7725 CMOS sensor

maintainers:
  - Jacopo Mondi <jacopo@jmondi.org>

description: |
  The Omnivision OV7720/OV7725 sensor supports multiple resolutions output,
  such as VGA, QVGA, and any size scaling down from CIF to 40x30. It also can
  support the YUV422, RGB565/555/444, GRB422 or raw RGB output formats.

properties:
  compatible:
    enum:
      - ovti,ov7720
      - ovti,ov7725

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  reset-gpios:
    description: |
      Reference to the GPIO connected to the RSTB pin which is active low.
    maxItems: 1

  powerdown-gpios:
    description: |
      Reference to the GPIO connected to the PWDN pin which is active high.
    maxItems: 1

  port:
    $ref: /schemas/graph.yaml#/$defs/port-base
    description: |
      Video output port.

    properties:
      endpoint:
        $ref: /schemas/media/video-interfaces.yaml#
        unevaluatedProperties: false

        properties:
          bus-type:
            enum: [5, 6]

          bus-width:
            enum: [8, 10]
            default: 10

          data-shift:
            enum: [0, 2]
            default: 0

          hsync-active:
            enum: [0, 1]
            default: 1

          vsync-active:
            enum: [0, 1]
            default: 1

          pclk-sample:
            enum: [0, 1]
            default: 1

        allOf:
          - if:
              properties:
                bus-type:
                  const: 6
            then:
              properties:
                hsync-active: false
                vsync-active: false

          - if:
              properties:
                bus-width:
                  const: 10
            then:
              properties:
                data-shift:
                  const: 0

        required:
          - bus-type

    additionalProperties: false

required:
  - compatible
  - reg
  - clocks
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;
        ov772x: camera@21 {
            compatible = "ovti,ov7725";
            reg = <0x21>;
            reset-gpios = <&axi_gpio_0 0 GPIO_ACTIVE_LOW>;
            powerdown-gpios = <&axi_gpio_0 1 GPIO_ACTIVE_LOW>;
            clocks = <&xclk>;

            port {
                ov772x_0: endpoint {
                    bus-type = <5>;
                    vsync-active = <0>;
                    hsync-active = <0>;
                    pclk-sample = <0>;
                    bus-width = <8>;
                    data-shift = <0>;
                    remote-endpoint = <&vcap1_in0>;
                };
            };
        };
    };

...