1*c509d8b9SMaxime Ripard# SPDX-License-Identifier: GPL-2.0 2*c509d8b9SMaxime Ripard%YAML 1.2 3*c509d8b9SMaxime Ripard--- 4*c509d8b9SMaxime Ripard$id: http://devicetree.org/schemas/media/i2c/ovti,ov5640.yaml# 5*c509d8b9SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 6*c509d8b9SMaxime Ripard 7*c509d8b9SMaxime Ripardtitle: OmniVision OV5640 Image Sensor Device Tree Bindings 8*c509d8b9SMaxime Ripard 9*c509d8b9SMaxime Ripardmaintainers: 10*c509d8b9SMaxime Ripard - Steve Longerbeam <slongerbeam@gmail.com> 11*c509d8b9SMaxime Ripard 12*c509d8b9SMaxime RipardallOf: 13*c509d8b9SMaxime Ripard - $ref: /schemas/media/video-interface-devices.yaml# 14*c509d8b9SMaxime Ripard 15*c509d8b9SMaxime Ripardproperties: 16*c509d8b9SMaxime Ripard compatible: 17*c509d8b9SMaxime Ripard const: ovti,ov5640 18*c509d8b9SMaxime Ripard 19*c509d8b9SMaxime Ripard reg: 20*c509d8b9SMaxime Ripard maxItems: 1 21*c509d8b9SMaxime Ripard 22*c509d8b9SMaxime Ripard clocks: 23*c509d8b9SMaxime Ripard description: XCLK Input Clock 24*c509d8b9SMaxime Ripard 25*c509d8b9SMaxime Ripard clock-names: 26*c509d8b9SMaxime Ripard const: xclk 27*c509d8b9SMaxime Ripard 28*c509d8b9SMaxime Ripard AVDD-supply: 29*c509d8b9SMaxime Ripard description: Analog voltage supply, 2.8 volts 30*c509d8b9SMaxime Ripard 31*c509d8b9SMaxime Ripard DVDD-supply: 32*c509d8b9SMaxime Ripard description: Digital core voltage supply, 1.5 volts 33*c509d8b9SMaxime Ripard 34*c509d8b9SMaxime Ripard DOVDD-supply: 35*c509d8b9SMaxime Ripard description: Digital I/O voltage supply, 1.8 volts 36*c509d8b9SMaxime Ripard 37*c509d8b9SMaxime Ripard powerdown-gpios: 38*c509d8b9SMaxime Ripard maxItems: 1 39*c509d8b9SMaxime Ripard description: > 40*c509d8b9SMaxime Ripard Reference to the GPIO connected to the powerdown pin, if any. 41*c509d8b9SMaxime Ripard 42*c509d8b9SMaxime Ripard reset-gpios: 43*c509d8b9SMaxime Ripard maxItems: 1 44*c509d8b9SMaxime Ripard description: > 45*c509d8b9SMaxime Ripard Reference to the GPIO connected to the reset pin, if any. 46*c509d8b9SMaxime Ripard 47*c509d8b9SMaxime Ripard rotation: 48*c509d8b9SMaxime Ripard enum: 49*c509d8b9SMaxime Ripard - 0 50*c509d8b9SMaxime Ripard - 180 51*c509d8b9SMaxime Ripard 52*c509d8b9SMaxime Ripard port: 53*c509d8b9SMaxime Ripard description: Digital Output Port 54*c509d8b9SMaxime Ripard $ref: /schemas/graph.yaml#/$defs/port-base 55*c509d8b9SMaxime Ripard additionalProperties: false 56*c509d8b9SMaxime Ripard 57*c509d8b9SMaxime Ripard properties: 58*c509d8b9SMaxime Ripard endpoint: 59*c509d8b9SMaxime Ripard $ref: /schemas/media/video-interfaces.yaml# 60*c509d8b9SMaxime Ripard unevaluatedProperties: false 61*c509d8b9SMaxime Ripard 62*c509d8b9SMaxime Ripard properties: 63*c509d8b9SMaxime Ripard clock-lanes: 64*c509d8b9SMaxime Ripard const: 0 65*c509d8b9SMaxime Ripard 66*c509d8b9SMaxime Ripard data-lanes: 67*c509d8b9SMaxime Ripard minItems: 1 68*c509d8b9SMaxime Ripard maxItems: 2 69*c509d8b9SMaxime Ripard items: 70*c509d8b9SMaxime Ripard enum: [1, 2] 71*c509d8b9SMaxime Ripard 72*c509d8b9SMaxime Ripard bus-width: 73*c509d8b9SMaxime Ripard enum: [8, 10] 74*c509d8b9SMaxime Ripard 75*c509d8b9SMaxime Ripard data-shift: 76*c509d8b9SMaxime Ripard enum: [0, 2] 77*c509d8b9SMaxime Ripard 78*c509d8b9SMaxime Ripardrequired: 79*c509d8b9SMaxime Ripard - compatible 80*c509d8b9SMaxime Ripard - reg 81*c509d8b9SMaxime Ripard - clocks 82*c509d8b9SMaxime Ripard - clock-names 83*c509d8b9SMaxime Ripard - AVDD-supply 84*c509d8b9SMaxime Ripard - DVDD-supply 85*c509d8b9SMaxime Ripard - DOVDD-supply 86*c509d8b9SMaxime Ripard - port 87*c509d8b9SMaxime Ripard 88*c509d8b9SMaxime RipardadditionalProperties: false 89*c509d8b9SMaxime Ripard 90*c509d8b9SMaxime Ripardexamples: 91*c509d8b9SMaxime Ripard - | 92*c509d8b9SMaxime Ripard #include <dt-bindings/clock/imx6qdl-clock.h> 93*c509d8b9SMaxime Ripard #include <dt-bindings/gpio/gpio.h> 94*c509d8b9SMaxime Ripard 95*c509d8b9SMaxime Ripard i2c { 96*c509d8b9SMaxime Ripard #address-cells = <1>; 97*c509d8b9SMaxime Ripard #size-cells = <0>; 98*c509d8b9SMaxime Ripard 99*c509d8b9SMaxime Ripard camera@3c { 100*c509d8b9SMaxime Ripard compatible = "ovti,ov5640"; 101*c509d8b9SMaxime Ripard pinctrl-names = "default"; 102*c509d8b9SMaxime Ripard pinctrl-0 = <&pinctrl_ov5640>; 103*c509d8b9SMaxime Ripard reg = <0x3c>; 104*c509d8b9SMaxime Ripard clocks = <&clks IMX6QDL_CLK_CKO>; 105*c509d8b9SMaxime Ripard clock-names = "xclk"; 106*c509d8b9SMaxime Ripard DOVDD-supply = <&vgen4_reg>; /* 1.8v */ 107*c509d8b9SMaxime Ripard AVDD-supply = <&vgen3_reg>; /* 2.8v */ 108*c509d8b9SMaxime Ripard DVDD-supply = <&vgen2_reg>; /* 1.5v */ 109*c509d8b9SMaxime Ripard powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; 110*c509d8b9SMaxime Ripard reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; 111*c509d8b9SMaxime Ripard rotation = <180>; 112*c509d8b9SMaxime Ripard 113*c509d8b9SMaxime Ripard port { 114*c509d8b9SMaxime Ripard /* MIPI CSI-2 bus endpoint */ 115*c509d8b9SMaxime Ripard ov5640_to_mipi_csi2: endpoint { 116*c509d8b9SMaxime Ripard remote-endpoint = <&mipi_csi2_from_ov5640>; 117*c509d8b9SMaxime Ripard clock-lanes = <0>; 118*c509d8b9SMaxime Ripard data-lanes = <1 2>; 119*c509d8b9SMaxime Ripard }; 120*c509d8b9SMaxime Ripard }; 121*c509d8b9SMaxime Ripard }; 122*c509d8b9SMaxime Ripard }; 123*c509d8b9SMaxime Ripard 124*c509d8b9SMaxime Ripard - | 125*c509d8b9SMaxime Ripard i2c { 126*c509d8b9SMaxime Ripard #address-cells = <1>; 127*c509d8b9SMaxime Ripard #size-cells = <0>; 128*c509d8b9SMaxime Ripard 129*c509d8b9SMaxime Ripard camera@3c { 130*c509d8b9SMaxime Ripard compatible = "ovti,ov5640"; 131*c509d8b9SMaxime Ripard pinctrl-names = "default"; 132*c509d8b9SMaxime Ripard pinctrl-0 = <&pinctrl_ov5640>; 133*c509d8b9SMaxime Ripard reg = <0x3c>; 134*c509d8b9SMaxime Ripard clocks = <&clk_ext_camera>; 135*c509d8b9SMaxime Ripard clock-names = "xclk"; 136*c509d8b9SMaxime Ripard DOVDD-supply = <&vgen4_reg>; /* 1.8v */ 137*c509d8b9SMaxime Ripard AVDD-supply = <&vgen3_reg>; /* 2.8v */ 138*c509d8b9SMaxime Ripard DVDD-supply = <&vgen2_reg>; /* 1.5v */ 139*c509d8b9SMaxime Ripard 140*c509d8b9SMaxime Ripard port { 141*c509d8b9SMaxime Ripard /* Parallel bus endpoint */ 142*c509d8b9SMaxime Ripard ov5640_to_parallel: endpoint { 143*c509d8b9SMaxime Ripard remote-endpoint = <¶llel_from_ov5640>; 144*c509d8b9SMaxime Ripard bus-width = <8>; 145*c509d8b9SMaxime Ripard data-shift = <2>; /* lines 9:2 are used */ 146*c509d8b9SMaxime Ripard hsync-active = <0>; 147*c509d8b9SMaxime Ripard vsync-active = <0>; 148*c509d8b9SMaxime Ripard pclk-sample = <1>; 149*c509d8b9SMaxime Ripard }; 150*c509d8b9SMaxime Ripard }; 151*c509d8b9SMaxime Ripard }; 152*c509d8b9SMaxime Ripard }; 153*c509d8b9SMaxime Ripard 154*c509d8b9SMaxime Ripard... 155