Merge tag 'v4.16-rc2' into locking/core, to refresh the branch
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / i2c / ov5640.txt
1 * Omnivision OV5640 MIPI CSI-2 / parallel sensor
2
3 Required Properties:
4 - compatible: should be "ovti,ov5640"
5 - clocks: reference to the xclk input clock.
6 - clock-names: should be "xclk".
7 - DOVDD-supply: Digital I/O voltage supply, 1.8 volts
8 - AVDD-supply: Analog voltage supply, 2.8 volts
9 - DVDD-supply: Digital core voltage supply, 1.5 volts
10
11 Optional Properties:
12 - reset-gpios: reference to the GPIO connected to the reset pin, if any.
13                This is an active low signal to the OV5640.
14 - powerdown-gpios: reference to the GPIO connected to the powerdown pin,
15                    if any. This is an active high signal to the OV5640.
16
17 The device node must contain one 'port' child node for its digital output
18 video port, in accordance with the video interface bindings defined in
19 Documentation/devicetree/bindings/media/video-interfaces.txt.
20
21 OV5640 can be connected to a MIPI CSI-2 bus or a parallel bus endpoint.
22
23 Endpoint node required properties for CSI-2 connection are:
24 - remote-endpoint: a phandle to the bus receiver's endpoint node.
25 - clock-lanes: should be set to <0> (clock lane on hardware lane 0)
26 - data-lanes: should be set to <1> or <1 2> (one or two CSI-2 lanes supported)
27
28 Endpoint node required properties for parallel connection are:
29 - remote-endpoint: a phandle to the bus receiver's endpoint node.
30 - bus-width: shall be set to <8> for 8 bits parallel bus
31              or <10> for 10 bits parallel bus
32 - data-shift: shall be set to <2> for 8 bits parallel bus
33               (lines 9:2 are used) or <0> for 10 bits parallel bus
34 - hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively.
35 - vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively.
36 - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock
37                signal.
38
39 Examples:
40
41 &i2c1 {
42         ov5640: camera@3c {
43                 compatible = "ovti,ov5640";
44                 pinctrl-names = "default";
45                 pinctrl-0 = <&pinctrl_ov5640>;
46                 reg = <0x3c>;
47                 clocks = <&clks IMX6QDL_CLK_CKO>;
48                 clock-names = "xclk";
49                 DOVDD-supply = <&vgen4_reg>; /* 1.8v */
50                 AVDD-supply = <&vgen3_reg>;  /* 2.8v */
51                 DVDD-supply = <&vgen2_reg>;  /* 1.5v */
52                 powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
53                 reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
54
55                 port {
56                         /* MIPI CSI-2 bus endpoint */
57                         ov5640_to_mipi_csi2: endpoint {
58                                 remote-endpoint = <&mipi_csi2_from_ov5640>;
59                                 clock-lanes = <0>;
60                                 data-lanes = <1 2>;
61                         };
62                 };
63         };
64 };
65
66 &i2c1 {
67         ov5640: camera@3c {
68                 compatible = "ovti,ov5640";
69                 pinctrl-names = "default";
70                 pinctrl-0 = <&pinctrl_ov5640>;
71                 reg = <0x3c>;
72                 clocks = <&clk_ext_camera>;
73                 clock-names = "xclk";
74
75                 port {
76                         /* Parallel bus endpoint */
77                         ov5640_to_parallel: endpoint {
78                                 remote-endpoint = <&parallel_from_ov5640>;
79                                 bus-width = <8>;
80                                 data-shift = <2>; /* lines 9:2 are used */
81                                 hsync-active = <0>;
82                                 vsync-active = <0>;
83                                 pclk-sample = <1>;
84                         };
85                 };
86         };
87 };