142 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/media/i2c/ovti,ov5642.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: OmniVision OV5642 Image Sensor8 9maintainers:10 - Fabio Estevam <festevam@gmail.com>11 12allOf:13 - $ref: /schemas/media/video-interface-devices.yaml#14 15properties:16 compatible:17 const: ovti,ov564218 19 reg:20 maxItems: 121 22 clocks:23 description: XCLK Input Clock24 25 AVDD-supply:26 description: Analog voltage supply, 2.8V.27 28 DVDD-supply:29 description: Digital core voltage supply, 1.5V.30 31 DOVDD-supply:32 description: Digital I/O voltage supply, 1.8V.33 34 powerdown-gpios:35 maxItems: 136 description: Reference to the GPIO connected to the powerdown pin, if any.37 38 reset-gpios:39 maxItems: 140 description: Reference to the GPIO connected to the reset pin, if any.41 42 port:43 $ref: /schemas/graph.yaml#/$defs/port-base44 description: |45 Video output port.46 47 properties:48 endpoint:49 $ref: /schemas/media/video-interfaces.yaml#50 unevaluatedProperties: false51 52 properties:53 bus-type:54 enum: [5, 6]55 56 bus-width:57 enum: [8, 10]58 default: 1059 60 data-shift:61 enum: [0, 2]62 default: 063 64 hsync-active:65 enum: [0, 1]66 default: 167 68 vsync-active:69 enum: [0, 1]70 default: 171 72 pclk-sample:73 enum: [0, 1]74 default: 175 76 allOf:77 - if:78 properties:79 bus-type:80 const: 681 then:82 properties:83 hsync-active: false84 vsync-active: false85 86 - if:87 properties:88 bus-width:89 const: 1090 then:91 properties:92 data-shift:93 const: 094 95 required:96 - bus-type97 98 additionalProperties: false99 100required:101 - compatible102 - reg103 - clocks104 - port105 106additionalProperties: false107 108examples:109 - |110 #include <dt-bindings/gpio/gpio.h>111 #include <dt-bindings/media/video-interfaces.h>112 113 i2c {114 #address-cells = <1>;115 #size-cells = <0>;116 117 camera@3c {118 compatible = "ovti,ov5642";119 reg = <0x3c>;120 pinctrl-names = "default";121 pinctrl-0 = <&pinctrl_ov5642>;122 clocks = <&clk_ext_camera>;123 DOVDD-supply = <&vgen4_reg>;124 AVDD-supply = <&vgen3_reg>;125 DVDD-supply = <&vgen2_reg>;126 powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;127 reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;128 129 port {130 ov5642_to_parallel: endpoint {131 bus-type = <MEDIA_BUS_TYPE_PARALLEL>;132 remote-endpoint = <¶llel_from_ov5642>;133 bus-width = <8>;134 data-shift = <2>; /* lines 9:2 are used */135 hsync-active = <0>;136 vsync-active = <0>;137 pclk-sample = <1>;138 };139 };140 };141 };142