bcm27xx: add kernel 5.10 support
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.10 / 950-0439-dtoverlays-Update-sensor-overlays-to-use-cam1_reg-wh.patch
1 From ca1159109b527af8450b627936c6eb732f496c14 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 6 Jan 2021 17:42:31 +0000
4 Subject: [PATCH] dtoverlays: Update sensor overlays to use cam1_reg
5 where possible
6
7 Update those overlays that use the regulator framework to use the
8 new cam1_reg node to control the camera shutdown line, and remove
9 the firmware workaround nodes.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/imx219-overlay.dts | 18 +++++---------
14 .../boot/dts/overlays/imx290_327-overlay.dtsi | 18 +++++---------
15 arch/arm/boot/dts/overlays/imx477-overlay.dts | 24 +++++++------------
16 arch/arm/boot/dts/overlays/ov7251-overlay.dts | 18 +++++---------
17 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 19 ++++++---------
18 5 files changed, 34 insertions(+), 63 deletions(-)
19
20 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
21 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
22 @@ -23,7 +23,7 @@
23 clocks = <&imx219_clk>;
24 clock-names = "xclk";
25
26 - VANA-supply = <&imx219_vana>; /* 2.8v */
27 + VANA-supply = <&cam1_reg>; /* 2.8v */
28 VDIG-supply = <&imx219_vdig>; /* 1.8v */
29 VDDL-supply = <&imx219_vddl>; /* 1.2v */
30
31 @@ -69,14 +69,6 @@
32 fragment@3 {
33 target-path="/";
34 __overlay__ {
35 - imx219_vana: fixedregulator@0 {
36 - compatible = "regulator-fixed";
37 - regulator-name = "imx219_vana";
38 - regulator-min-microvolt = <2800000>;
39 - regulator-max-microvolt = <2800000>;
40 - gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
41 - enable-active-high;
42 - };
43 imx219_vdig: fixedregulator@1 {
44 compatible = "regulator-fixed";
45 regulator-name = "imx219_vdig";
46 @@ -106,10 +98,12 @@
47 };
48
49 fragment@5 {
50 - target-path="/__overrides__";
51 + target = <&cam1_reg>;
52 __overlay__ {
53 - cam0-pwdn-ctrl = <&imx219_vana>,"gpio:0";
54 - cam0-pwdn = <&imx219_vana>,"gpio:4";
55 + status = "okay";
56 + regulator-name = "imx219_vana";
57 + regulator-min-microvolt = <2800000>;
58 + regulator-max-microvolt = <2800000>;
59 };
60 };
61
62 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
63 +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
64 @@ -24,7 +24,7 @@
65 clock-names = "xclk";
66 clock-frequency = <37125000>;
67
68 - vdda-supply = <&imx290_vdda>; /* 2.8v */
69 + vdda-supply = <&cam1_reg>; /* 2.8v */
70 vdddo-supply = <&imx290_vdddo>; /* 1.8v */
71 vddd-supply = <&imx290_vddd>; /* 1.5v */
72
73 @@ -61,14 +61,6 @@
74 fragment@3 {
75 target-path="/";
76 __overlay__ {
77 - imx290_vdda: fixedregulator@0 {
78 - compatible = "regulator-fixed";
79 - regulator-name = "imx290_vdda";
80 - regulator-min-microvolt = <2800000>;
81 - regulator-max-microvolt = <2800000>;
82 - gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
83 - enable-active-high;
84 - };
85 imx290_vdddo: fixedregulator@1 {
86 compatible = "regulator-fixed";
87 regulator-name = "imx290_vdddo";
88 @@ -98,10 +90,12 @@
89 };
90
91 fragment@5 {
92 - target-path="/__overrides__";
93 + target = <&cam1_reg>;
94 __overlay__ {
95 - cam0-pwdn-ctrl = <&imx290_vdda>,"gpio:0";
96 - cam0-pwdn = <&imx290_vdda>,"gpio:4";
97 + status = "okay";
98 + regulator-name = "imx290_vdda";
99 + regulator-min-microvolt = <2800000>;
100 + regulator-max-microvolt = <2800000>;
101 };
102 };
103
104 --- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
105 +++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
106 @@ -23,7 +23,7 @@
107 clocks = <&imx477_clk>;
108 clock-names = "xclk";
109
110 - VANA-supply = <&imx477_vana>; /* 2.8v */
111 + VANA-supply = <&cam1_reg>; /* 2.8v */
112 VDIG-supply = <&imx477_vdig>; /* 1.05v */
113 VDDL-supply = <&imx477_vddl>; /* 1.8v */
114
115 @@ -69,22 +69,13 @@
116 fragment@3 {
117 target-path="/";
118 __overlay__ {
119 - imx477_vana: fixedregulator@0 {
120 - compatible = "regulator-fixed";
121 - regulator-name = "imx477_vana";
122 - regulator-min-microvolt = <2800000>;
123 - regulator-max-microvolt = <2800000>;
124 - gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
125 - enable-active-high;
126 - startup-delay-us = <300000>;
127 - };
128 - imx477_vdig: fixedregulator@1 {
129 + imx477_vdig: fixedregulator@0 {
130 compatible = "regulator-fixed";
131 regulator-name = "imx477_vdig";
132 regulator-min-microvolt = <1050000>;
133 regulator-max-microvolt = <1050000>;
134 };
135 - imx477_vddl: fixedregulator@2 {
136 + imx477_vddl: fixedregulator@1 {
137 compatible = "regulator-fixed";
138 regulator-name = "imx477_vddl";
139 regulator-min-microvolt = <1800000>;
140 @@ -106,10 +97,13 @@
141 };
142
143 fragment@5 {
144 - target-path="/__overrides__";
145 + target = <&cam1_reg>;
146 __overlay__ {
147 - cam0-pwdn-ctrl = <&imx477_vana>,"gpio:0";
148 - cam0-pwdn = <&imx477_vana>,"gpio:4";
149 + status = "okay";
150 + regulator-name = "imx477_vana";
151 + startup-delay-us = <300000>;
152 + regulator-min-microvolt = <2800000>;
153 + regulator-max-microvolt = <2800000>;
154 };
155 };
156
157 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
158 +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
159 @@ -25,11 +25,9 @@
160 clock-frequency = <24000000>;
161
162 vdddo-supply = <&ov7251_dovdd>;
163 - vdda-supply = <&ov7251_avdd>;
164 + vdda-supply = <&cam1_reg>;
165 vddd-supply = <&ov7251_dvdd>;
166
167 - enable-gpios = <&gpio 41 GPIO_ACTIVE_HIGH>;
168 -
169 port {
170 ov7251_0: endpoint {
171 remote-endpoint = <&csi1_ep>;
172 @@ -68,12 +66,6 @@
173 fragment@3 {
174 target-path="/";
175 __overlay__ {
176 - ov7251_avdd: fixedregulator@0 {
177 - compatible = "regulator-fixed";
178 - regulator-name = "ov7251_avdd";
179 - regulator-min-microvolt = <2800000>;
180 - regulator-max-microvolt = <2800000>;
181 - };
182 ov7251_dovdd: fixedregulator@1 {
183 compatible = "regulator-fixed";
184 regulator-name = "ov7251_dovdd";
185 @@ -102,10 +94,12 @@
186 };
187
188 fragment@5 {
189 - target-path="/__overrides__";
190 + target = <&cam1_reg>;
191 __overlay__ {
192 - cam0-pwdn-ctrl = <&ov7251>,"enable-gpios:0";
193 - cam0-pwdn = <&ov7251>,"enable-gpios:4";
194 + status = "okay";
195 + regulator-name = "ov7251_avdd";
196 + regulator-min-microvolt = <2800000>;
197 + regulator-max-microvolt = <2800000>;
198 };
199 };
200 };
201 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
202 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
203 @@ -23,7 +23,7 @@
204 clocks = <&ov9281_clk>;
205 clock-names = "xvclk";
206
207 - avdd-supply = <&ov9281_avdd>;
208 + avdd-supply = <&cam1_reg>;
209 dovdd-supply = <&ov9281_dovdd>;
210 dvdd-supply = <&ov9281_dvdd>;
211
212 @@ -66,14 +66,6 @@
213 fragment@3 {
214 target-path="/";
215 __overlay__ {
216 - ov9281_avdd: fixedregulator@0 {
217 - compatible = "regulator-fixed";
218 - regulator-name = "ov9281_avdd";
219 - regulator-min-microvolt = <2800000>;
220 - regulator-max-microvolt = <2800000>;
221 - gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
222 - enable-active-high;
223 - };
224 ov9281_dovdd: fixedregulator@1 {
225 compatible = "regulator-fixed";
226 regulator-name = "ov9281_dovdd";
227 @@ -102,10 +94,13 @@
228 };
229
230 fragment@5 {
231 - target-path="/__overrides__";
232 + target = <&cam1_reg>;
233 __overlay__ {
234 - cam0-pwdn-ctrl = <&ov9281_avdd>,"gpio:0";
235 - cam0-pwdn = <&ov9281_avdd>,"gpio:4";
236 + status = "okay";
237 + regulator-name = "ov9281_avdd";
238 + regulator-min-microvolt = <2800000>;
239 + regulator-max-microvolt = <2800000>;
240 };
241 };
242 +
243 };