bcm53xx: backport DT changes for ASUS RT-AC3100 queued for v6.6
[openwrt/staging/neocturne.git] / target / linux / bcm53xx / patches-6.1 / 032-v6.6-0016-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC3100.patch
1 From 2900083269f7c0f0ff430bffc6ced2038aed9b6b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
3 Date: Thu, 3 Aug 2023 10:14:54 +0300
4 Subject: [PATCH] ARM: dts: BCM5301X: Add DT for ASUS RT-AC3100
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 ASUS RT-AC3100 is ASUS RT-AC88U without the external switch. Move the
10 shared bindings to bcm47094-asus-rt-ac3100.dtsi.
11
12 Remove the fixed-link node on port@7 as commit ba4aebce23b2 ("ARM: dts:
13 BCM5301X: Describe switch ports in the main DTS") states it's not
14 necessary.
15
16 Replace the copyright notice with an author notice.
17
18 Rename the model name from Asus to ASUS on bcm47094-asus-rt-ac88u.dts.
19
20 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
21 Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
22 Link: https://lore.kernel.org/r/20230803071454.5902-2-arinc.unal@arinc9.com
23 Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
24 ---
25 arch/arm/boot/dts/Makefile | 1 +
26 .../dts/bcm47094-asus-rt-ac3100.dts | 23 +++
27 .../dts/bcm47094-asus-rt-ac3100.dtsi | 163 ++++++++++++++++++
28 .../dts/bcm47094-asus-rt-ac88u.dts | 155 +----------------
29 4 files changed, 190 insertions(+), 152 deletions(-)
30 create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts
31 create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi
32
33 --- a/arch/arm/boot/dts/Makefile
34 +++ b/arch/arm/boot/dts/Makefile
35 @@ -127,6 +127,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
36 bcm4709-netgear-r7000.dtb \
37 bcm4709-netgear-r8000.dtb \
38 bcm4709-tplink-archer-c9-v1.dtb \
39 + bcm47094-asus-rt-ac3100.dtb \
40 bcm47094-asus-rt-ac88u.dtb \
41 bcm47094-dlink-dir-885l.dtb \
42 bcm47094-dlink-dir-890l.dtb \
43 --- /dev/null
44 +++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts
45 @@ -0,0 +1,23 @@
46 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
47 +/*
48 + * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
49 + */
50 +
51 +/dts-v1/;
52 +
53 +#include "bcm47094-asus-rt-ac3100.dtsi"
54 +
55 +/ {
56 + compatible = "asus,rt-ac3100", "brcm,bcm47094", "brcm,bcm4708";
57 + model = "ASUS RT-AC3100";
58 +
59 + nvram@1c080000 {
60 + et0macaddr: et0macaddr {
61 + };
62 + };
63 +};
64 +
65 +&gmac0 {
66 + nvmem-cells = <&et0macaddr>;
67 + nvmem-cell-names = "mac-address";
68 +};
69 --- /dev/null
70 +++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi
71 @@ -0,0 +1,163 @@
72 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
73 +/*
74 + * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
75 + */
76 +
77 +#include "bcm47094.dtsi"
78 +#include "bcm5301x-nand-cs0-bch8.dtsi"
79 +
80 +/ {
81 + chosen {
82 + bootargs = "earlycon";
83 + };
84 +
85 + memory@0 {
86 + device_type = "memory";
87 + reg = <0x00000000 0x08000000>,
88 + <0x88000000 0x18000000>;
89 + };
90 +
91 + nvram@1c080000 {
92 + compatible = "brcm,nvram";
93 + reg = <0x1c080000 0x00180000>;
94 + };
95 +
96 + leds {
97 + compatible = "gpio-leds";
98 +
99 + led-power {
100 + label = "white:power";
101 + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
102 + linux,default-trigger = "default-on";
103 + };
104 +
105 + led-wan-red {
106 + label = "red:wan";
107 + gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
108 + };
109 +
110 + led-lan {
111 + label = "white:lan";
112 + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
113 + };
114 +
115 + led-usb2 {
116 + label = "white:usb2";
117 + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
118 + trigger-sources = <&ehci_port2>;
119 + linux,default-trigger = "usbport";
120 + };
121 +
122 + led-usb3 {
123 + label = "white:usb3";
124 + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
125 + trigger-sources = <&ehci_port1>, <&xhci_port1>;
126 + linux,default-trigger = "usbport";
127 + };
128 +
129 + led-wps {
130 + label = "white:wps";
131 + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
132 + };
133 + };
134 +
135 + gpio-keys {
136 + compatible = "gpio-keys";
137 +
138 + button-wps {
139 + label = "WPS";
140 + linux,code = <KEY_WPS_BUTTON>;
141 + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
142 + };
143 +
144 + button-reset {
145 + label = "Reset";
146 + linux,code = <KEY_RESTART>;
147 + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
148 + };
149 +
150 + button-wifi {
151 + label = "Wi-Fi";
152 + linux,code = <KEY_RFKILL>;
153 + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
154 + };
155 +
156 + button-led {
157 + label = "Backlight";
158 + linux,code = <KEY_BRIGHTNESS_ZERO>;
159 + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
160 + };
161 + };
162 +};
163 +
164 +&srab {
165 + compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
166 + status = "okay";
167 +
168 + ports {
169 + port@0 {
170 + label = "lan4";
171 + };
172 +
173 + port@1 {
174 + label = "lan3";
175 + };
176 +
177 + port@2 {
178 + label = "lan2";
179 + };
180 +
181 + port@3 {
182 + label = "lan1";
183 + };
184 +
185 + port@4 {
186 + label = "wan";
187 + };
188 +
189 + port@5 {
190 + label = "cpu";
191 + };
192 +
193 + port@7 {
194 + label = "cpu";
195 + };
196 +
197 + port@8 {
198 + label = "cpu";
199 + };
200 + };
201 +};
202 +
203 +&usb2 {
204 + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
205 +};
206 +
207 +&usb3_phy {
208 + status = "okay";
209 +};
210 +
211 +&nandcs {
212 + partitions {
213 + compatible = "fixed-partitions";
214 + #address-cells = <1>;
215 + #size-cells = <1>;
216 +
217 + partition@0 {
218 + label = "boot";
219 + reg = <0x00000000 0x00080000>;
220 + read-only;
221 + };
222 +
223 + partition@80000 {
224 + label = "nvram";
225 + reg = <0x00080000 0x00180000>;
226 + };
227 +
228 + partition@200000 {
229 + label = "firmware";
230 + reg = <0x00200000 0x07e00000>;
231 + compatible = "brcm,trx";
232 + };
233 + };
234 +};
235 --- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
236 +++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
237 @@ -1,102 +1,21 @@
238 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
239 /*
240 - * Copyright (C) 2021-2022 Arınç ÜNAL <arinc.unal@arinc9.com>
241 + * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
242 */
243
244 /dts-v1/;
245
246 -#include "bcm47094.dtsi"
247 -#include "bcm5301x-nand-cs0-bch8.dtsi"
248 +#include "bcm47094-asus-rt-ac3100.dtsi"
249
250 / {
251 compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
252 - model = "Asus RT-AC88U";
253 -
254 - chosen {
255 - bootargs = "earlycon";
256 - };
257 -
258 - memory@0 {
259 - device_type = "memory";
260 - reg = <0x00000000 0x08000000>,
261 - <0x88000000 0x18000000>;
262 - };
263 + model = "ASUS RT-AC88U";
264
265 nvram@1c080000 {
266 - compatible = "brcm,nvram";
267 - reg = <0x1c080000 0x00180000>;
268 -
269 et1macaddr: et1macaddr {
270 };
271 };
272
273 - leds {
274 - compatible = "gpio-leds";
275 -
276 - led-power {
277 - label = "white:power";
278 - gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
279 - linux,default-trigger = "default-on";
280 - };
281 -
282 - led-wan-red {
283 - label = "red:wan";
284 - gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
285 - };
286 -
287 - led-lan {
288 - label = "white:lan";
289 - gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
290 - };
291 -
292 - led-usb2 {
293 - label = "white:usb2";
294 - gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
295 - trigger-sources = <&ehci_port2>;
296 - linux,default-trigger = "usbport";
297 - };
298 -
299 - led-usb3 {
300 - label = "white:usb3";
301 - gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
302 - trigger-sources = <&ehci_port1>, <&xhci_port1>;
303 - linux,default-trigger = "usbport";
304 - };
305 -
306 - led-wps {
307 - label = "white:wps";
308 - gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
309 - };
310 - };
311 -
312 - gpio-keys {
313 - compatible = "gpio-keys";
314 -
315 - button-wps {
316 - label = "WPS";
317 - linux,code = <KEY_WPS_BUTTON>;
318 - gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
319 - };
320 -
321 - button-reset {
322 - label = "Reset";
323 - linux,code = <KEY_RESTART>;
324 - gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
325 - };
326 -
327 - button-wifi {
328 - label = "Wi-Fi";
329 - linux,code = <KEY_RFKILL>;
330 - gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
331 - };
332 -
333 - button-led {
334 - label = "Backlight";
335 - linux,code = <KEY_BRIGHTNESS_ZERO>;
336 - gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
337 - };
338 - };
339 -
340 switch {
341 compatible = "realtek,rtl8365mb";
342 /* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
343 @@ -175,31 +94,9 @@
344 };
345
346 &srab {
347 - compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
348 - status = "okay";
349 dsa,member = <0 0>;
350
351 ports {
352 - port@0 {
353 - label = "lan4";
354 - };
355 -
356 - port@1 {
357 - label = "lan3";
358 - };
359 -
360 - port@2 {
361 - label = "lan2";
362 - };
363 -
364 - port@3 {
365 - label = "lan1";
366 - };
367 -
368 - port@4 {
369 - label = "wan";
370 - };
371 -
372 sw0_p5: port@5 {
373 /delete-property/ethernet;
374
375 @@ -212,19 +109,6 @@
376 pause;
377 };
378 };
379 -
380 - port@7 {
381 - label = "cpu";
382 -
383 - fixed-link {
384 - speed = <1000>;
385 - full-duplex;
386 - };
387 - };
388 -
389 - port@8 {
390 - label = "cpu";
391 - };
392 };
393 };
394
395 @@ -236,36 +120,3 @@
396 nvmem-cells = <&et1macaddr>;
397 nvmem-cell-names = "mac-address";
398 };
399 -
400 -&usb2 {
401 - vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
402 -};
403 -
404 -&usb3_phy {
405 - status = "okay";
406 -};
407 -
408 -&nandcs {
409 - partitions {
410 - compatible = "fixed-partitions";
411 - #address-cells = <1>;
412 - #size-cells = <1>;
413 -
414 - partition@0 {
415 - label = "boot";
416 - reg = <0x00000000 0x00080000>;
417 - read-only;
418 - };
419 -
420 - partition@80000 {
421 - label = "nvram";
422 - reg = <0x00080000 0x00180000>;
423 - };
424 -
425 - partition@200000 {
426 - label = "firmware";
427 - reg = <0x00200000 0x07e00000>;
428 - compatible = "brcm,trx";
429 - };
430 - };
431 -};