1 From 8bad44295c6ee5176fb6dc0d5417029a1002d87c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 28 Aug 2019 13:35:19 +0100
4 Subject: [PATCH 782/782] dtoverlays: Add overlay for the Sony IMX219 image
7 Adds an overlay for the IMX219 image sensor, connected to the
8 Unicam CSI2 receiver peripheral.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 arch/arm/boot/dts/overlays/Makefile | 1 +
13 arch/arm/boot/dts/overlays/README | 12 ++
14 arch/arm/boot/dts/overlays/imx219-overlay.dts | 129 ++++++++++++++++++
15 3 files changed, 142 insertions(+)
16 create mode 100644 arch/arm/boot/dts/overlays/imx219-overlay.dts
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -77,6 +77,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
27 iqaudio-dacplus.dtbo \
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -1269,6 +1269,18 @@ Params: interrupt GPIO use
31 touchscreen (in pixels)
35 +Info: Sony IMX219 camera module.
36 + Uses Unicam 1, which is the standard camera connector on most Pi
38 +Load: dtoverlay=imx219,<param>=<val>
39 +Params: i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
40 + Useful on Compute Modules.
42 + i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
43 + This is required for Pi B+, 2, 0, and 0W.
47 Info: Configures the IQaudio Codec audio card
48 Load: dtoverlay=iqaudio-codec
50 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
52 +// SPDX-License-Identifier: GPL-2.0-only
53 +// Definitions for IMX219 camera module on VC I2C bus
57 +#include <dt-bindings/gpio/gpio.h>
60 + compatible = "brcm,bcm2835";
65 + #address-cells = <1>;
70 + compatible = "sony,imx219";
74 + clocks = <&imx219_clk>;
75 + clock-names = "xclk";
77 + VANA-supply = <&imx219_vana>; /* 2.8v */
78 + VDIG-supply = <&imx219_vdig>; /* 1.8v */
79 + VDDL-supply = <&imx219_vddl>; /* 1.2v */
81 + imx219_clk: camera-clk {
82 + compatible = "fixed-clock";
84 + clock-frequency = <24000000>;
88 + imx219_0: endpoint {
89 + remote-endpoint = <&csi1_ep>;
92 + clock-noncontinuous;
94 + /bits/ 64 <297000000>;
107 + csi1_ep: endpoint {
108 + remote-endpoint = <&imx219_0>;
115 + target = <&i2c0_pins>;
117 + brcm,pins = <28 29>;
118 + brcm,function = <4>; /* alt0 */
122 + target = <&i2c0_pins>;
124 + brcm,pins = <44 45>;
125 + brcm,function = <5>; /* alt1 */
129 + target = <&i2c0_pins>;
132 + brcm,function = <4>; /* alt0 */
136 + target = <&i2c_vc>;
145 + imx219_vana: fixedregulator@0 {
146 + compatible = "regulator-fixed";
147 + regulator-name = "imx219_vana";
148 + regulator-min-microvolt = <2800000>;
149 + regulator-max-microvolt = <2800000>;
150 + gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
151 + enable-active-high;
153 + imx219_vdig: fixedregulator@1 {
154 + compatible = "regulator-fixed";
155 + regulator-name = "imx219_vdig";
156 + regulator-min-microvolt = <1800000>;
157 + regulator-max-microvolt = <1800000>;
159 + imx219_vddl: fixedregulator@2 {
160 + compatible = "regulator-fixed";
161 + regulator-name = "imx219_vddl";
162 + regulator-min-microvolt = <1200000>;
163 + regulator-max-microvolt = <1200000>;
169 + target-path="/__overrides__";
171 + cam0-pwdn-ctrl = <&imx219_vana>,"gpio:0";
172 + cam0-pwdn = <&imx219_vana>,"gpio:4";
177 + i2c_pins_0_1 = <0>,"-2-3+4";
178 + i2c_pins_28_29 = <0>,"+2-3-4";