bcm27xx: switch to kernel v6.1
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0558-ARM-dts-Rename-Zero-2-W-DT-files.patch
1 From d29fb06a96cac4111d23e8f1cfc4d191d2fd5419 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 1 Nov 2021 15:44:31 +0000
4 Subject: [PATCH] ARM: dts: Rename Zero 2 W DT files
5
6 Retain the old names for backwards compatibility for a while, while the
7 necessary firmware change rolls out.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
10 ---
11 arch/arm/boot/dts/Makefile | 1 +
12 arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts | 177 ++++++++++++++++++++
13 arch/arm/boot/dts/bcm2710-rpi-zero-2.dts | 178 +--------------------
14 3 files changed, 179 insertions(+), 177 deletions(-)
15 create mode 100644 arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
16
17 --- a/arch/arm/boot/dts/Makefile
18 +++ b/arch/arm/boot/dts/Makefile
19 @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
20 bcm2708-rpi-zero.dtb \
21 bcm2708-rpi-zero-w.dtb \
22 bcm2710-rpi-zero-2.dtb \
23 + bcm2710-rpi-zero-2-w.dtb \
24 bcm2709-rpi-2-b.dtb \
25 bcm2710-rpi-2-b.dtb \
26 bcm2710-rpi-3-b.dtb \
27 --- /dev/null
28 +++ b/arch/arm/boot/dts/bcm2710-rpi-zero-2-w.dts
29 @@ -0,0 +1,177 @@
30 +/dts-v1/;
31 +
32 +#include "bcm2710.dtsi"
33 +#include "bcm2709-rpi.dtsi"
34 +#include "bcm283x-rpi-csi1-2lane.dtsi"
35 +#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
36 +#include "bcm2708-rpi-bt.dtsi"
37 +#include "bcm283x-rpi-cam1-regulator.dtsi"
38 +
39 +/ {
40 + compatible = "raspberrypi,model-zero-2-w", "brcm,bcm2837";
41 + model = "Raspberry Pi Zero 2 W";
42 +
43 + chosen {
44 + bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
45 + };
46 +
47 + aliases {
48 + serial0 = &uart1;
49 + serial1 = &uart0;
50 + mmc1 = &mmcnr;
51 + };
52 +};
53 +
54 +&gpio {
55 + spi0_pins: spi0_pins {
56 + brcm,pins = <9 10 11>;
57 + brcm,function = <4>; /* alt0 */
58 + };
59 +
60 + spi0_cs_pins: spi0_cs_pins {
61 + brcm,pins = <8 7>;
62 + brcm,function = <1>; /* output */
63 + };
64 +
65 + i2c0_pins: i2c0 {
66 + brcm,pins = <0 1>;
67 + brcm,function = <4>;
68 + };
69 +
70 + i2c1_pins: i2c1 {
71 + brcm,pins = <2 3>;
72 + brcm,function = <4>;
73 + };
74 +
75 + i2s_pins: i2s {
76 + brcm,pins = <18 19 20 21>;
77 + brcm,function = <4>; /* alt0 */
78 + };
79 +
80 + sdio_pins: sdio_pins {
81 + brcm,pins = <34 35 36 37 38 39>;
82 + brcm,function = <7>; // alt3 = SD1
83 + brcm,pull = <0 2 2 2 2 2>;
84 + };
85 +
86 + bt_pins: bt_pins {
87 + brcm,pins = <43>;
88 + brcm,function = <4>; /* alt0:GPCLK2 */
89 + brcm,pull = <0>;
90 + };
91 +
92 + uart0_pins: uart0_pins {
93 + brcm,pins = <30 31 32 33>;
94 + brcm,function = <7>; /* alt3=UART0 */
95 + brcm,pull = <2 0 0 2>; /* up none none up */
96 + };
97 +
98 + uart1_pins: uart1_pins {
99 + brcm,pins;
100 + brcm,function;
101 + brcm,pull;
102 + };
103 +
104 + audio_pins: audio_pins {
105 + brcm,pins = <>;
106 + brcm,function = <>;
107 + };
108 +};
109 +
110 +&mmcnr {
111 + pinctrl-names = "default";
112 + pinctrl-0 = <&sdio_pins>;
113 + bus-width = <4>;
114 + status = "okay";
115 +};
116 +
117 +&uart0 {
118 + pinctrl-names = "default";
119 + pinctrl-0 = <&uart0_pins &bt_pins>;
120 + status = "okay";
121 +};
122 +
123 +&uart1 {
124 + pinctrl-names = "default";
125 + pinctrl-0 = <&uart1_pins>;
126 + status = "okay";
127 +};
128 +
129 +&spi0 {
130 + pinctrl-names = "default";
131 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
132 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
133 +
134 + spidev0: spidev@0{
135 + compatible = "spidev";
136 + reg = <0>; /* CE0 */
137 + #address-cells = <1>;
138 + #size-cells = <0>;
139 + spi-max-frequency = <125000000>;
140 + };
141 +
142 + spidev1: spidev@1{
143 + compatible = "spidev";
144 + reg = <1>; /* CE1 */
145 + #address-cells = <1>;
146 + #size-cells = <0>;
147 + spi-max-frequency = <125000000>;
148 + };
149 +};
150 +
151 +&i2c0if {
152 + clock-frequency = <100000>;
153 +};
154 +
155 +&i2c1 {
156 + pinctrl-names = "default";
157 + pinctrl-0 = <&i2c1_pins>;
158 + clock-frequency = <100000>;
159 +};
160 +
161 +&i2c2 {
162 + clock-frequency = <100000>;
163 +};
164 +
165 +&i2s {
166 + pinctrl-names = "default";
167 + pinctrl-0 = <&i2s_pins>;
168 +};
169 +
170 +&leds {
171 + act_led: led-act {
172 + label = "led0";
173 + linux,default-trigger = "actpwr";
174 + gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
175 + };
176 +};
177 +
178 +&hdmi {
179 + hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
180 +};
181 +
182 +&audio {
183 + pinctrl-names = "default";
184 + pinctrl-0 = <&audio_pins>;
185 + brcm,disable-headphones = <1>;
186 +};
187 +
188 +&bt {
189 + shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
190 +};
191 +
192 +&minibt {
193 + shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
194 +};
195 +
196 +&cam1_reg {
197 + gpio = <&gpio 40 GPIO_ACTIVE_HIGH>;
198 +};
199 +
200 +/ {
201 + __overrides__ {
202 + act_led_gpio = <&act_led>,"gpios:4";
203 + act_led_activelow = <&act_led>,"gpios:8";
204 + act_led_trigger = <&act_led>,"linux,default-trigger";
205 + };
206 +};
207 --- a/arch/arm/boot/dts/bcm2710-rpi-zero-2.dts
208 +++ b/arch/arm/boot/dts/bcm2710-rpi-zero-2.dts
209 @@ -1,177 +1 @@
210 -/dts-v1/;
211 -
212 -#include "bcm2710.dtsi"
213 -#include "bcm2709-rpi.dtsi"
214 -#include "bcm283x-rpi-csi1-2lane.dtsi"
215 -#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
216 -#include "bcm2708-rpi-bt.dtsi"
217 -#include "bcm283x-rpi-cam1-regulator.dtsi"
218 -
219 -/ {
220 - compatible = "raspberrypi,model-zero-2", "brcm,bcm2837";
221 - model = "Raspberry Pi Zero 2";
222 -
223 - chosen {
224 - bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
225 - };
226 -
227 - aliases {
228 - serial0 = &uart1;
229 - serial1 = &uart0;
230 - mmc1 = &mmcnr;
231 - };
232 -};
233 -
234 -&gpio {
235 - spi0_pins: spi0_pins {
236 - brcm,pins = <9 10 11>;
237 - brcm,function = <4>; /* alt0 */
238 - };
239 -
240 - spi0_cs_pins: spi0_cs_pins {
241 - brcm,pins = <8 7>;
242 - brcm,function = <1>; /* output */
243 - };
244 -
245 - i2c0_pins: i2c0 {
246 - brcm,pins = <0 1>;
247 - brcm,function = <4>;
248 - };
249 -
250 - i2c1_pins: i2c1 {
251 - brcm,pins = <2 3>;
252 - brcm,function = <4>;
253 - };
254 -
255 - i2s_pins: i2s {
256 - brcm,pins = <18 19 20 21>;
257 - brcm,function = <4>; /* alt0 */
258 - };
259 -
260 - sdio_pins: sdio_pins {
261 - brcm,pins = <34 35 36 37 38 39>;
262 - brcm,function = <7>; // alt3 = SD1
263 - brcm,pull = <0 2 2 2 2 2>;
264 - };
265 -
266 - bt_pins: bt_pins {
267 - brcm,pins = <43>;
268 - brcm,function = <4>; /* alt0:GPCLK2 */
269 - brcm,pull = <0>;
270 - };
271 -
272 - uart0_pins: uart0_pins {
273 - brcm,pins = <30 31 32 33>;
274 - brcm,function = <7>; /* alt3=UART0 */
275 - brcm,pull = <2 0 0 2>; /* up none none up */
276 - };
277 -
278 - uart1_pins: uart1_pins {
279 - brcm,pins;
280 - brcm,function;
281 - brcm,pull;
282 - };
283 -
284 - audio_pins: audio_pins {
285 - brcm,pins = <>;
286 - brcm,function = <>;
287 - };
288 -};
289 -
290 -&mmcnr {
291 - pinctrl-names = "default";
292 - pinctrl-0 = <&sdio_pins>;
293 - bus-width = <4>;
294 - status = "okay";
295 -};
296 -
297 -&uart0 {
298 - pinctrl-names = "default";
299 - pinctrl-0 = <&uart0_pins &bt_pins>;
300 - status = "okay";
301 -};
302 -
303 -&uart1 {
304 - pinctrl-names = "default";
305 - pinctrl-0 = <&uart1_pins>;
306 - status = "okay";
307 -};
308 -
309 -&spi0 {
310 - pinctrl-names = "default";
311 - pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
312 - cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
313 -
314 - spidev0: spidev@0{
315 - compatible = "spidev";
316 - reg = <0>; /* CE0 */
317 - #address-cells = <1>;
318 - #size-cells = <0>;
319 - spi-max-frequency = <125000000>;
320 - };
321 -
322 - spidev1: spidev@1{
323 - compatible = "spidev";
324 - reg = <1>; /* CE1 */
325 - #address-cells = <1>;
326 - #size-cells = <0>;
327 - spi-max-frequency = <125000000>;
328 - };
329 -};
330 -
331 -&i2c0if {
332 - clock-frequency = <100000>;
333 -};
334 -
335 -&i2c1 {
336 - pinctrl-names = "default";
337 - pinctrl-0 = <&i2c1_pins>;
338 - clock-frequency = <100000>;
339 -};
340 -
341 -&i2c2 {
342 - clock-frequency = <100000>;
343 -};
344 -
345 -&i2s {
346 - pinctrl-names = "default";
347 - pinctrl-0 = <&i2s_pins>;
348 -};
349 -
350 -&leds {
351 - act_led: led-act {
352 - label = "led0";
353 - linux,default-trigger = "actpwr";
354 - gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
355 - };
356 -};
357 -
358 -&hdmi {
359 - hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
360 -};
361 -
362 -&audio {
363 - pinctrl-names = "default";
364 - pinctrl-0 = <&audio_pins>;
365 - brcm,disable-headphones = <1>;
366 -};
367 -
368 -&bt {
369 - shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
370 -};
371 -
372 -&minibt {
373 - shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
374 -};
375 -
376 -&cam1_reg {
377 - gpio = <&gpio 40 GPIO_ACTIVE_HIGH>;
378 -};
379 -
380 -/ {
381 - __overrides__ {
382 - act_led_gpio = <&act_led>,"gpios:4";
383 - act_led_activelow = <&act_led>,"gpios:8";
384 - act_led_trigger = <&act_led>,"linux,default-trigger";
385 - };
386 -};
387 +#include "bcm2710-rpi-zero-2-w.dts"