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