1 From f8b75a1bcdbf2b5cc591079cafad3b94cc74ff48 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Sat, 20 Nov 2021 14:43:29 +0000
4 Subject: [PATCH] dtoverlays: Convert the camera sensor overlays to use
7 Now that we have regulators and clocks defined in the base DT for
8 image sensors, switch the overlays to use them.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/imx219-overlay.dts | 40 ++++---------------
13 .../boot/dts/overlays/imx290_327-overlay.dtsi | 40 ++++---------------
14 .../boot/dts/overlays/imx477_378-overlay.dtsi | 31 +++-----------
15 arch/arm/boot/dts/overlays/imx519-overlay.dts | 38 +++---------------
16 arch/arm/boot/dts/overlays/ov5647-overlay.dts | 18 +++++----
17 arch/arm/boot/dts/overlays/ov7251-overlay.dts | 37 +++--------------
18 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 39 ++++--------------
19 7 files changed, 50 insertions(+), 193 deletions(-)
21 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
22 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
27 - clocks = <&imx219_clk>;
28 + clocks = <&cam1_clk>;
31 VANA-supply = <&cam1_reg>; /* 2.8v */
32 - VDIG-supply = <&imx219_vdig>; /* 1.8v */
33 - VDDL-supply = <&imx219_vddl>; /* 1.2v */
34 + VDIG-supply = <&cam_dummy_reg>; /* 1.8v */
35 + VDDL-supply = <&cam_dummy_reg>; /* 1.2v */
44 + target = <&cam1_clk>;
46 - imx219_vdig: fixedregulator@1 {
47 - compatible = "regulator-fixed";
48 - regulator-name = "imx219_vdig";
49 - regulator-min-microvolt = <1800000>;
50 - regulator-max-microvolt = <1800000>;
52 - imx219_vddl: fixedregulator@2 {
53 - compatible = "regulator-fixed";
54 - regulator-name = "imx219_vddl";
55 - regulator-min-microvolt = <1200000>;
56 - regulator-max-microvolt = <1200000>;
59 - imx219_clk: camera-clk {
60 - compatible = "fixed-clock";
62 - clock-frequency = <24000000>;
65 + clock-frequency = <24000000>;
73 - target = <&cam1_reg>;
76 - regulator-name = "imx219_vana";
77 - regulator-min-microvolt = <2800000>;
78 - regulator-max-microvolt = <2800000>;
85 brcm,media-controller;
88 rotation = <&imx219>,"rotation:0";
89 orientation = <&imx219>,"orientation:0";
90 - media-controller = <0>,"=6";
91 + media-controller = <0>,"=5";
94 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
95 +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
100 - clocks = <&imx290_clk>;
101 + clocks = <&cam1_clk>;
102 clock-names = "xclk";
103 clock-frequency = <37125000>;
108 vdda-supply = <&cam1_reg>; /* 2.8v */
109 - vdddo-supply = <&imx290_vdddo>; /* 1.8v */
110 - vddd-supply = <&imx290_vddd>; /* 1.5v */
111 + vdddo-supply = <&cam_dummy_reg>; /* 1.8v */
112 + vddd-supply = <&cam_dummy_reg>; /* 1.5v */
121 + target = <&cam1_clk>;
123 - imx290_vdddo: fixedregulator@1 {
124 - compatible = "regulator-fixed";
125 - regulator-name = "imx290_vdddo";
126 - regulator-min-microvolt = <1800000>;
127 - regulator-max-microvolt = <1800000>;
129 - imx290_vddd: fixedregulator@2 {
130 - compatible = "regulator-fixed";
131 - regulator-name = "imx290_vddd";
132 - regulator-min-microvolt = <1500000>;
133 - regulator-max-microvolt = <1500000>;
136 - imx290_clk: camera-clk {
137 - compatible = "fixed-clock";
138 - #clock-cells = <0>;
139 - clock-frequency = <37125000>;
142 + clock-frequency = <37125000>;
151 - target = <&cam1_reg>;
154 - regulator-name = "imx290_vdda";
155 - regulator-min-microvolt = <2800000>;
156 - regulator-max-microvolt = <2800000>;
161 target = <&imx290_0>;
166 4lane = <0>, "-6+7-8+9";
167 - clock-frequency = <&imx290_clk>,"clock-frequency:0",
168 + clock-frequency = <&cam1_clk>,"clock-frequency:0",
169 <&imx290>,"clock-frequency:0";
170 rotation = <&imx290>,"rotation:0";
171 orientation = <&imx290>,"orientation:0";
172 --- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
173 +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
178 - clocks = <&imx477_clk>;
179 + clocks = <&cam1_clk>;
180 clock-names = "xclk";
182 VANA-supply = <&cam1_reg>; /* 2.8v */
183 - VDIG-supply = <&imx477_vdig>; /* 1.05v */
184 - VDDL-supply = <&imx477_vddl>; /* 1.8v */
185 + VDIG-supply = <&cam_dummy_reg>; /* 1.05v */
186 + VDDL-supply = <&cam_dummy_reg>; /* 1.8v */
195 + target = <&cam1_clk>;
197 - imx477_vdig: fixedregulator@0 {
198 - compatible = "regulator-fixed";
199 - regulator-name = "imx477_vdig";
200 - regulator-min-microvolt = <1050000>;
201 - regulator-max-microvolt = <1050000>;
203 - imx477_vddl: fixedregulator@1 {
204 - compatible = "regulator-fixed";
205 - regulator-name = "imx477_vddl";
206 - regulator-min-microvolt = <1800000>;
207 - regulator-max-microvolt = <1800000>;
209 - imx477_clk: camera-clk {
210 - compatible = "fixed-clock";
211 - #clock-cells = <0>;
212 - clock-frequency = <24000000>;
214 + clock-frequency = <24000000>;
221 target = <&cam1_reg>;
224 - regulator-name = "imx477_vana";
225 startup-delay-us = <300000>;
226 - regulator-min-microvolt = <2800000>;
227 - regulator-max-microvolt = <2800000>;
231 --- a/arch/arm/boot/dts/overlays/imx519-overlay.dts
232 +++ b/arch/arm/boot/dts/overlays/imx519-overlay.dts
237 - clocks = <&imx519_clk>;
238 + clocks = <&cam1_clk>;
239 clock-names = "xclk";
241 VANA-supply = <&cam1_reg>; /* 2.8v */
242 - VDIG-supply = <&imx519_vdig>; /* 1.8v */
243 - VDDL-supply = <&imx519_vddl>; /* 1.2v */
244 + VDIG-supply = <&cam_dummy_reg>; /* 1.8v */
245 + VDDL-supply = <&cam_dummy_reg>; /* 1.2v */
254 + target = <&cam1_clk>;
256 - imx519_vdig: fixedregulator@1 {
257 - compatible = "regulator-fixed";
258 - regulator-name = "imx519_vdig";
259 - regulator-min-microvolt = <1800000>;
260 - regulator-max-microvolt = <1800000>;
262 - imx519_vddl: fixedregulator@2 {
263 - compatible = "regulator-fixed";
264 - regulator-name = "imx519_vddl";
265 - regulator-min-microvolt = <1200000>;
266 - regulator-max-microvolt = <1200000>;
269 - imx519_clk: camera-clk {
270 - compatible = "fixed-clock";
271 - #clock-cells = <0>;
272 - clock-frequency = <24000000>;
274 + clock-frequency = <24000000>;
284 - target = <&cam1_reg>;
287 - regulator-name = "imx519_vana";
288 - regulator-min-microvolt = <2800000>;
289 - regulator-max-microvolt = <2800000>;
296 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
297 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
301 pwdn-gpios = <&gpio 41 1>, <&gpio 32 1>;
302 - clocks = <&ov5647_clk>;
303 + clocks = <&cam1_clk>;
312 + target = <&cam1_clk>;
314 - ov5647_clk: camera-clk {
315 - compatible = "fixed-clock";
316 - #clock-cells = <0>;
317 - clock-frequency = <25000000>;
320 + clock-frequency = <25000000>;
329 + target = <&cam1_reg>;
331 + status = "disabled";
336 rotation = <&ov5647>,"rotation:0";
337 orientation = <&ov5647>,"orientation:0";
338 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
339 +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
344 - clocks = <&ov7251_clk>;
345 + clocks = <&cam1_clk>;
346 clock-names = "xclk";
347 clock-frequency = <24000000>;
349 - vdddo-supply = <&ov7251_dovdd>;
350 + vdddo-supply = <&cam_dummy_reg>;
351 vdda-supply = <&cam1_reg>;
352 - vddd-supply = <&ov7251_dvdd>;
353 + vddd-supply = <&cam_dummy_reg>;
362 + target = <&cam1_clk>;
364 - ov7251_dovdd: fixedregulator@1 {
365 - compatible = "regulator-fixed";
366 - regulator-name = "ov7251_dovdd";
367 - regulator-min-microvolt = <1800000>;
368 - regulator-max-microvolt = <1800000>;
370 - ov7251_dvdd: fixedregulator@2 {
371 - compatible = "regulator-fixed";
372 - regulator-name = "ov7251_dvdd";
373 - regulator-min-microvolt = <1200000>;
374 - regulator-max-microvolt = <1200000>;
376 - ov7251_clk: ov7251-clk {
377 - compatible = "fixed-clock";
378 - #clock-cells = <0>;
379 - clock-frequency = <24000000>;
382 + clock-frequency = <24000000>;
391 - target = <&cam1_reg>;
394 - regulator-name = "ov7251_avdd";
395 - regulator-min-microvolt = <2800000>;
396 - regulator-max-microvolt = <2800000>;
403 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
404 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
409 - clocks = <&ov9281_clk>;
410 + clocks = <&cam1_clk>;
411 clock-names = "xvclk";
413 avdd-supply = <&cam1_reg>;
414 - dovdd-supply = <&ov9281_dovdd>;
415 - dvdd-supply = <&ov9281_dvdd>;
416 + dovdd-supply = <&cam_dummy_reg>;
417 + dvdd-supply = <&cam_dummy_reg>;
426 + target = <&cam1_clk>;
428 - ov9281_dovdd: fixedregulator@1 {
429 - compatible = "regulator-fixed";
430 - regulator-name = "ov9281_dovdd";
431 - regulator-min-microvolt = <1800000>;
432 - regulator-max-microvolt = <1800000>;
434 - ov9281_dvdd: fixedregulator@2 {
435 - compatible = "regulator-fixed";
436 - regulator-name = "ov9281_dvdd";
437 - regulator-min-microvolt = <1200000>;
438 - regulator-max-microvolt = <1200000>;
440 - ov9281_clk: ov9281-clk {
441 - compatible = "fixed-clock";
442 - #clock-cells = <0>;
443 - clock-frequency = <24000000>;
446 + clock-frequency = <24000000>;
454 - target = <&cam1_reg>;
457 - regulator-name = "ov9281_avdd";
458 - regulator-min-microvolt = <2800000>;
459 - regulator-max-microvolt = <2800000>;
466 brcm,media-controller;
469 rotation = <&ov9281>,"rotation:0";
470 orientation = <&ov9281>,"orientation:0";
471 - media-controller = <0>,"=6";
472 + media-controller = <0>,"=5";