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