xref: /linux/Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml (revision 20a72af11f411bb74c14bd424f33b02e03937cf6)
1898bd5b5SJacopo Mondi# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2898bd5b5SJacopo Mondi%YAML 1.2
3898bd5b5SJacopo Mondi---
4898bd5b5SJacopo Mondi$id: http://devicetree.org/schemas/media/i2c/ovti,ov772x.yaml#
5898bd5b5SJacopo Mondi$schema: http://devicetree.org/meta-schemas/core.yaml#
6898bd5b5SJacopo Mondi
7898bd5b5SJacopo Mondititle: Omnivision OV7720/OV7725 CMOS sensor
8898bd5b5SJacopo Mondi
9898bd5b5SJacopo Mondimaintainers:
10898bd5b5SJacopo Mondi  - Jacopo Mondi <jacopo@jmondi.org>
11898bd5b5SJacopo Mondi
12898bd5b5SJacopo Mondidescription: |
13898bd5b5SJacopo Mondi  The Omnivision OV7720/OV7725 sensor supports multiple resolutions output,
14898bd5b5SJacopo Mondi  such as VGA, QVGA, and any size scaling down from CIF to 40x30. It also can
15898bd5b5SJacopo Mondi  support the YUV422, RGB565/555/444, GRB422 or raw RGB output formats.
16898bd5b5SJacopo Mondi
17898bd5b5SJacopo Mondiproperties:
18898bd5b5SJacopo Mondi  compatible:
19898bd5b5SJacopo Mondi    enum:
20898bd5b5SJacopo Mondi      - ovti,ov7720
21898bd5b5SJacopo Mondi      - ovti,ov7725
22898bd5b5SJacopo Mondi
23898bd5b5SJacopo Mondi  reg:
24898bd5b5SJacopo Mondi    maxItems: 1
25898bd5b5SJacopo Mondi
26898bd5b5SJacopo Mondi  clocks:
27898bd5b5SJacopo Mondi    maxItems: 1
28898bd5b5SJacopo Mondi
29898bd5b5SJacopo Mondi  reset-gpios:
30898bd5b5SJacopo Mondi    description: |
31898bd5b5SJacopo Mondi      Reference to the GPIO connected to the RSTB pin which is active low.
32898bd5b5SJacopo Mondi    maxItems: 1
33898bd5b5SJacopo Mondi
34898bd5b5SJacopo Mondi  powerdown-gpios:
35898bd5b5SJacopo Mondi    description: |
36898bd5b5SJacopo Mondi      Reference to the GPIO connected to the PWDN pin which is active high.
37898bd5b5SJacopo Mondi    maxItems: 1
38898bd5b5SJacopo Mondi
39898bd5b5SJacopo Mondi  port:
40066a94e2SRob Herring    $ref: /schemas/graph.yaml#/$defs/port-base
41898bd5b5SJacopo Mondi    description: |
42066a94e2SRob Herring      Video output port.
43898bd5b5SJacopo Mondi
44b2d05946SJacopo Mondi    properties:
45b2d05946SJacopo Mondi      endpoint:
46066a94e2SRob Herring        $ref: /schemas/media/video-interfaces.yaml#
47066a94e2SRob Herring        unevaluatedProperties: false
48b2d05946SJacopo Mondi
49b2d05946SJacopo Mondi        properties:
50b2d05946SJacopo Mondi          bus-type:
51b2d05946SJacopo Mondi            enum: [5, 6]
52b2d05946SJacopo Mondi
53b20d9facSJacopo Mondi          bus-width:
54b20d9facSJacopo Mondi            enum: [8, 10]
55b20d9facSJacopo Mondi            default: 10
56b20d9facSJacopo Mondi
57b20d9facSJacopo Mondi          data-shift:
58b20d9facSJacopo Mondi            enum: [0, 2]
59b20d9facSJacopo Mondi            default: 0
60b20d9facSJacopo Mondi
61b20d9facSJacopo Mondi          hsync-active:
62b20d9facSJacopo Mondi            enum: [0, 1]
63b20d9facSJacopo Mondi            default: 1
64b20d9facSJacopo Mondi
65b20d9facSJacopo Mondi          vsync-active:
66b20d9facSJacopo Mondi            enum: [0, 1]
67b20d9facSJacopo Mondi            default: 1
68b20d9facSJacopo Mondi
69b20d9facSJacopo Mondi          pclk-sample:
70b20d9facSJacopo Mondi            enum: [0, 1]
71b20d9facSJacopo Mondi            default: 1
72b20d9facSJacopo Mondi
73b20d9facSJacopo Mondi        allOf:
74b20d9facSJacopo Mondi          - if:
75b20d9facSJacopo Mondi              properties:
76b20d9facSJacopo Mondi                bus-type:
77b20d9facSJacopo Mondi                  const: 6
78b20d9facSJacopo Mondi            then:
79b20d9facSJacopo Mondi              properties:
80b20d9facSJacopo Mondi                hsync-active: false
81b20d9facSJacopo Mondi                vsync-active: false
82b20d9facSJacopo Mondi
83b20d9facSJacopo Mondi          - if:
84b20d9facSJacopo Mondi              properties:
85b20d9facSJacopo Mondi                bus-width:
86b20d9facSJacopo Mondi                  const: 10
87b20d9facSJacopo Mondi            then:
88b20d9facSJacopo Mondi              properties:
89b20d9facSJacopo Mondi                data-shift:
90b20d9facSJacopo Mondi                  const: 0
91b20d9facSJacopo Mondi
92b2d05946SJacopo Mondi        required:
93b2d05946SJacopo Mondi          - bus-type
94b2d05946SJacopo Mondi
95b2d05946SJacopo Mondi    additionalProperties: false
96b2d05946SJacopo Mondi
97898bd5b5SJacopo Mondirequired:
98898bd5b5SJacopo Mondi  - compatible
99898bd5b5SJacopo Mondi  - reg
100898bd5b5SJacopo Mondi  - clocks
101898bd5b5SJacopo Mondi  - port
102898bd5b5SJacopo Mondi
103898bd5b5SJacopo MondiadditionalProperties: false
104898bd5b5SJacopo Mondi
105898bd5b5SJacopo Mondiexamples:
106898bd5b5SJacopo Mondi  - |
107898bd5b5SJacopo Mondi    #include <dt-bindings/gpio/gpio.h>
108c4cfd47eSLaurent Pinchart    #include <dt-bindings/media/video-interfaces.h>
109898bd5b5SJacopo Mondi
110*20a72af1SRob Herring    i2c {
111898bd5b5SJacopo Mondi        #address-cells = <1>;
112898bd5b5SJacopo Mondi        #size-cells = <0>;
113898bd5b5SJacopo Mondi        ov772x: camera@21 {
114898bd5b5SJacopo Mondi            compatible = "ovti,ov7725";
115898bd5b5SJacopo Mondi            reg = <0x21>;
116898bd5b5SJacopo Mondi            reset-gpios = <&axi_gpio_0 0 GPIO_ACTIVE_LOW>;
117898bd5b5SJacopo Mondi            powerdown-gpios = <&axi_gpio_0 1 GPIO_ACTIVE_LOW>;
118898bd5b5SJacopo Mondi            clocks = <&xclk>;
119898bd5b5SJacopo Mondi
120898bd5b5SJacopo Mondi            port {
121898bd5b5SJacopo Mondi                ov772x_0: endpoint {
122c4cfd47eSLaurent Pinchart                    bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
123b20d9facSJacopo Mondi                    vsync-active = <0>;
124b20d9facSJacopo Mondi                    hsync-active = <0>;
125b20d9facSJacopo Mondi                    pclk-sample = <0>;
126b20d9facSJacopo Mondi                    bus-width = <8>;
127b20d9facSJacopo Mondi                    data-shift = <0>;
128898bd5b5SJacopo Mondi                    remote-endpoint = <&vcap1_in0>;
129898bd5b5SJacopo Mondi                };
130898bd5b5SJacopo Mondi            };
131898bd5b5SJacopo Mondi        };
132898bd5b5SJacopo Mondi    };
133898bd5b5SJacopo Mondi
134898bd5b5SJacopo Mondi...
135