bcm27xx: add support for linux v5.15
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0577-ARM-dts-Update-rpi-400-and-cm4-dts-to-match-4-b.patch
1 From 34e658087e54db26ebd86f86a1549a393002a9ad Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Fri, 26 Nov 2021 15:20:06 +0000
4 Subject: [PATCH] ARM: dts: Update rpi-400 and cm4 dts to match 4-b
5
6 The Pi 4B dts file has had numerous updates since the Pi 400 and CM4
7 dts files were written. Apply those updates to the other files to
8 minimise the differences. The change is largely cosmetic, except for
9 the PCI "device-type" to "device_type" rename, and the correction of
10 the labels on the Pi 400 GPIO expander pins.
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 arch/arm/boot/dts/bcm2711-rpi-400.dts | 90 ++++--------------------
15 arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 98 ++++++---------------------
16 2 files changed, 36 insertions(+), 152 deletions(-)
17
18 --- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
19 +++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
20 @@ -1,9 +1,8 @@
21 // SPDX-License-Identifier: GPL-2.0
22 /dts-v1/;
23 #include "bcm2711.dtsi"
24 -#include "bcm2835-rpi.dtsi"
25 -
26 -#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
27 +#include "bcm2711-rpi.dtsi"
28 +//#include "bcm283x-rpi-usb-peripheral.dtsi"
29
30 / {
31 compatible = "raspberrypi,400", "brcm,bcm2711";
32 @@ -14,19 +13,6 @@
33 stdout-path = "serial1:115200n8";
34 };
35
36 - /* Will be filled by the bootloader */
37 - memory@0 {
38 - device_type = "memory";
39 - reg = <0 0 0>;
40 - };
41 -
42 - aliases {
43 - emmc2bus = &emmc2bus;
44 - ethernet0 = &genet;
45 - pcie0 = &pcie0;
46 - blconfig = &blconfig;
47 - };
48 -
49 leds {
50 led-act {
51 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
52 @@ -54,8 +40,8 @@
53 regulator-always-on;
54 regulator-settling-time-us = <5000>;
55 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
56 - states = <1800000 0x1
57 - 3300000 0x0>;
58 + states = <1800000 0x1>,
59 + <3300000 0x0>;
60 status = "okay";
61 };
62
63 @@ -78,31 +64,15 @@
64 status = "okay";
65 };
66
67 -&firmware {
68 - firmware_clocks: clocks {
69 - compatible = "raspberrypi,firmware-clocks";
70 - #clock-cells = <1>;
71 - };
72 -
73 - expgpio: gpio {
74 - compatible = "raspberrypi,firmware-gpio";
75 - gpio-controller;
76 - #gpio-cells = <2>;
77 - gpio-line-names = "BT_ON",
78 - "WL_ON",
79 - "PWR_LED_OFF",
80 - "GLOBAL_RESET",
81 - "VDD_SD_IO_SEL",
82 - "CAM_GPIO",
83 - "SD_PWR_ON",
84 - "SD_OC_N";
85 - status = "okay";
86 - };
87 -
88 - reset: reset {
89 - compatible = "raspberrypi,firmware-reset";
90 - #reset-cells = <1>;
91 - };
92 +&expgpio {
93 + gpio-line-names = "BT_ON",
94 + "WL_ON",
95 + "PWR_LED_OFF",
96 + "GLOBAL_RESET",
97 + "VDD_SD_IO_SEL",
98 + "GLOBAL_SHUTDOWN",
99 + "SD_PWR_ON",
100 + "SHUTDOWN_REQUEST";
101 };
102
103 &gpio {
104 @@ -179,23 +149,13 @@
105 };
106
107 &hdmi0 {
108 - clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
109 - clock-names = "hdmi", "bvb", "audio", "cec";
110 - wifi-2.4ghz-coexistence;
111 status = "okay";
112 };
113
114 &hdmi1 {
115 - clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
116 - clock-names = "hdmi", "bvb", "audio", "cec";
117 - wifi-2.4ghz-coexistence;
118 status = "okay";
119 };
120
121 -&hvs {
122 - clocks = <&firmware_clocks 4>;
123 -};
124 -
125 &pixelvalve0 {
126 status = "okay";
127 };
128 @@ -218,22 +178,6 @@
129 status = "okay";
130 };
131
132 -&rmem {
133 - /*
134 - * RPi4's co-processor will copy the board's bootloader configuration
135 - * into memory for the OS to consume. It'll also update this node with
136 - * its placement information.
137 - */
138 - blconfig: nvram@0 {
139 - compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
140 - #address-cells = <1>;
141 - #size-cells = <1>;
142 - reg = <0x0 0x0 0x0>;
143 - no-map;
144 - status = "disabled";
145 - };
146 -};
147 -
148 /* SDHCI is used to control the SDIO for wireless */
149 &sdhci {
150 #address-cells = <1>;
151 @@ -274,7 +218,7 @@
152
153 &pcie0 {
154 pci@0,0 {
155 - device-type = "pci";
156 + device_type = "pci";
157 #address-cells = <3>;
158 #size-cells = <2>;
159 ranges;
160 @@ -282,7 +226,7 @@
161 reg = <0 0 0 0 0>;
162
163 usb@0,0 {
164 - reg = <0x0 0 0 0 0>;
165 + reg = <0 0 0 0 0>;
166 resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
167 };
168 };
169 @@ -309,10 +253,6 @@
170 status = "okay";
171 };
172
173 -&vchiq {
174 - interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
175 -};
176 -
177 &vc4 {
178 status = "okay";
179 };
180 --- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
181 +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
182 @@ -1,9 +1,8 @@
183 // SPDX-License-Identifier: GPL-2.0
184 /dts-v1/;
185 #include "bcm2711.dtsi"
186 -#include "bcm2835-rpi.dtsi"
187 -
188 -#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
189 +#include "bcm2711-rpi.dtsi"
190 +//#include "bcm283x-rpi-usb-peripheral.dtsi"
191
192 / {
193 compatible = "raspberrypi,4-compute-module", "brcm,bcm2711";
194 @@ -14,19 +13,6 @@
195 stdout-path = "serial1:115200n8";
196 };
197
198 - /* Will be filled by the bootloader */
199 - memory@0 {
200 - device_type = "memory";
201 - reg = <0 0 0>;
202 - };
203 -
204 - aliases {
205 - emmc2bus = &emmc2bus;
206 - ethernet0 = &genet;
207 - pcie0 = &pcie0;
208 - blconfig = &blconfig;
209 - };
210 -
211 leds {
212 led-act {
213 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
214 @@ -54,8 +40,8 @@
215 regulator-always-on;
216 regulator-settling-time-us = <5000>;
217 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
218 - states = <1800000 0x1
219 - 3300000 0x0>;
220 + states = <1800000 0x1>,
221 + <3300000 0x0>;
222 status = "okay";
223 };
224
225 @@ -78,42 +64,26 @@
226 status = "okay";
227 };
228
229 -&firmware {
230 - firmware_clocks: clocks {
231 - compatible = "raspberrypi,firmware-clocks";
232 - #clock-cells = <1>;
233 - };
234 -
235 - expgpio: gpio {
236 - compatible = "raspberrypi,firmware-gpio";
237 - gpio-controller;
238 - #gpio-cells = <2>;
239 - gpio-line-names = "BT_ON",
240 - "WL_ON",
241 - "PWR_LED_OFF",
242 - "ANT1",
243 - "VDD_SD_IO_SEL",
244 - "CAM_GPIO",
245 - "SD_PWR_ON",
246 - "ANT2";
247 - status = "okay";
248 -
249 - ant1: ant1 {
250 - gpio-hog;
251 - gpios = <3 GPIO_ACTIVE_HIGH>;
252 - output-high;
253 - };
254 -
255 - ant2: ant2 {
256 - gpio-hog;
257 - gpios = <7 GPIO_ACTIVE_HIGH>;
258 - output-low;
259 - };
260 - };
261 -
262 - reset: reset {
263 - compatible = "raspberrypi,firmware-reset";
264 - #reset-cells = <1>;
265 +&expgpio {
266 + gpio-line-names = "BT_ON",
267 + "WL_ON",
268 + "PWR_LED_OFF",
269 + "ANT1",
270 + "VDD_SD_IO_SEL",
271 + "CAM_GPIO",
272 + "SD_PWR_ON",
273 + "ANT2";
274 +
275 + ant1: ant1 {
276 + gpio-hog;
277 + gpios = <3 GPIO_ACTIVE_HIGH>;
278 + output-high;
279 + };
280 +
281 + ant2: ant2 {
282 + gpio-hog;
283 + gpios = <7 GPIO_ACTIVE_HIGH>;
284 + output-low;
285 };
286 };
287
288 @@ -191,23 +161,13 @@
289 };
290
291 &hdmi0 {
292 - clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
293 - clock-names = "hdmi", "bvb", "audio", "cec";
294 - wifi-2.4ghz-coexistence;
295 status = "okay";
296 };
297
298 &hdmi1 {
299 - clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
300 - clock-names = "hdmi", "bvb", "audio", "cec";
301 - wifi-2.4ghz-coexistence;
302 status = "okay";
303 };
304
305 -&hvs {
306 - clocks = <&firmware_clocks 4>;
307 -};
308 -
309 &pixelvalve0 {
310 status = "okay";
311 };
312 @@ -230,22 +190,6 @@
313 status = "okay";
314 };
315
316 -&rmem {
317 - /*
318 - * RPi4's co-processor will copy the board's bootloader configuration
319 - * into memory for the OS to consume. It'll also update this node with
320 - * its placement information.
321 - */
322 - blconfig: nvram@0 {
323 - compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
324 - #address-cells = <1>;
325 - #size-cells = <1>;
326 - reg = <0x0 0x0 0x0>;
327 - no-map;
328 - status = "disabled";
329 - };
330 -};
331 -
332 /* SDHCI is used to control the SDIO for wireless */
333 &sdhci {
334 #address-cells = <1>;