1 From 07dad18a058170c0bfd38fd1f0eb21407efcbafb Mon Sep 17 00:00:00 2001
2 From: David Plowman <david.plowman@raspberrypi.com>
3 Date: Tue, 29 Jun 2021 14:41:15 +0100
4 Subject: [PATCH] overlays: Add overlay for imx378 sensor
6 This is based off a common overlay which is now also used by the
9 Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
11 arch/arm/boot/dts/overlays/Makefile | 1 +
12 arch/arm/boot/dts/overlays/README | 9 ++
13 arch/arm/boot/dts/overlays/imx378-overlay.dts | 10 ++
14 arch/arm/boot/dts/overlays/imx477-overlay.dts | 109 +-----------------
15 .../boot/dts/overlays/imx477_378-overlay.dtsi | 108 +++++++++++++++++
16 5 files changed, 131 insertions(+), 106 deletions(-)
17 create mode 100644 arch/arm/boot/dts/overlays/imx378-overlay.dts
18 create mode 100644 arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
20 --- a/arch/arm/boot/dts/overlays/Makefile
21 +++ b/arch/arm/boot/dts/overlays/Makefile
22 @@ -94,6 +94,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
30 --- a/arch/arm/boot/dts/overlays/README
31 +++ b/arch/arm/boot/dts/overlays/README
32 @@ -1674,6 +1674,15 @@ Params: 4lane Enable 4
33 mono Denote that the module is a mono sensor.
37 +Info: Sony IMX378 camera module.
38 + Uses Unicam 1, which is the standard camera connector on most Pi
40 +Load: dtoverlay=imx378,<param>=<val>
41 +Params: rotation Mounting rotation of the camera sensor (0 or
46 Info: Sony IMX477 camera module.
47 Uses Unicam 1, which is the standard camera connector on most Pi
49 +++ b/arch/arm/boot/dts/overlays/imx378-overlay.dts
51 +// SPDX-License-Identifier: GPL-2.0-only
52 +// Definitions for IMX378 camera module on VC I2C bus
56 +#include "imx477_378-overlay.dtsi"
59 + compatible = "sony,imx378";
61 --- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
62 +++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
67 -#include <dt-bindings/gpio/gpio.h>
68 +#include "imx477_378-overlay.dtsi"
71 - compatible = "brcm,bcm2835";
74 - target = <&i2c_csi_dsi>;
76 - #address-cells = <1>;
81 - compatible = "sony,imx477";
85 - clocks = <&imx477_clk>;
86 - clock-names = "xclk";
88 - VANA-supply = <&cam1_reg>; /* 2.8v */
89 - VDIG-supply = <&imx477_vdig>; /* 1.05v */
90 - VDDL-supply = <&imx477_vddl>; /* 1.8v */
95 - imx477_0: endpoint {
96 - remote-endpoint = <&csi1_ep>;
99 - clock-noncontinuous;
101 - /bits/ 64 <450000000>;
114 - csi1_ep: endpoint {
115 - remote-endpoint = <&imx477_0>;
117 - data-lanes = <1 2>;
118 - clock-noncontinuous;
125 - target = <&i2c0if>;
134 - imx477_vdig: fixedregulator@0 {
135 - compatible = "regulator-fixed";
136 - regulator-name = "imx477_vdig";
137 - regulator-min-microvolt = <1050000>;
138 - regulator-max-microvolt = <1050000>;
140 - imx477_vddl: fixedregulator@1 {
141 - compatible = "regulator-fixed";
142 - regulator-name = "imx477_vddl";
143 - regulator-min-microvolt = <1800000>;
144 - regulator-max-microvolt = <1800000>;
146 - imx477_clk: camera-clk {
147 - compatible = "fixed-clock";
148 - #clock-cells = <0>;
149 - clock-frequency = <24000000>;
155 - target = <&i2c0mux>;
162 - target = <&cam1_reg>;
165 - regulator-name = "imx477_vana";
166 - startup-delay-us = <300000>;
167 - regulator-min-microvolt = <2800000>;
168 - regulator-max-microvolt = <2800000>;
173 - rotation = <&imx477>,"rotation:0";
176 + compatible = "sony,imx477";
179 +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
181 +// SPDX-License-Identifier: GPL-2.0-only
182 +// Definitions for IMX477 camera module on VC I2C bus
185 + compatible = "brcm,bcm2835";
188 + target = <&i2c_csi_dsi>;
190 + #address-cells = <1>;
194 + imx477: imx477@1a {
198 + clocks = <&imx477_clk>;
199 + clock-names = "xclk";
201 + VANA-supply = <&cam1_reg>; /* 2.8v */
202 + VDIG-supply = <&imx477_vdig>; /* 1.05v */
203 + VDDL-supply = <&imx477_vddl>; /* 1.8v */
208 + imx477_0: endpoint {
209 + remote-endpoint = <&csi1_ep>;
211 + data-lanes = <1 2>;
212 + clock-noncontinuous;
214 + /bits/ 64 <450000000>;
227 + csi1_ep: endpoint {
228 + remote-endpoint = <&imx477_0>;
230 + data-lanes = <1 2>;
231 + clock-noncontinuous;
238 + target = <&i2c0if>;
247 + imx477_vdig: fixedregulator@0 {
248 + compatible = "regulator-fixed";
249 + regulator-name = "imx477_vdig";
250 + regulator-min-microvolt = <1050000>;
251 + regulator-max-microvolt = <1050000>;
253 + imx477_vddl: fixedregulator@1 {
254 + compatible = "regulator-fixed";
255 + regulator-name = "imx477_vddl";
256 + regulator-min-microvolt = <1800000>;
257 + regulator-max-microvolt = <1800000>;
259 + imx477_clk: camera-clk {
260 + compatible = "fixed-clock";
261 + #clock-cells = <0>;
262 + clock-frequency = <24000000>;
268 + target = <&i2c0mux>;
275 + target = <&cam1_reg>;
278 + regulator-name = "imx477_vana";
279 + startup-delay-us = <300000>;
280 + regulator-min-microvolt = <2800000>;
281 + regulator-max-microvolt = <2800000>;
286 + rotation = <&imx477>,"rotation:0";