7d9b29719150907f16fe9046f5e598e6f3844a94
[openwrt/staging/xback.git] /
1 From dfa6570eb5ce2f24059caadbe2ed70034b5337bc Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Mon, 15 May 2023 10:33:08 +0200
4 Subject: [PATCH] ARM: dts: BCM5301X: Specify MAC addresses on Luxul devices
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Use NRAM (NVMEM device) and its "et0macaddr" variable (NVMEM cell) to
10 point Ethernet devices to their MAC addresses.
11
12 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 Link: https://lore.kernel.org/r/20230515083308.7612-1-zajec5@gmail.com
14 Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
15 ---
16 arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 13 +++++++++++++
17 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 13 +++++++++++++
18 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 13 +++++++++++++
19 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 11 +++++++++++
20 arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 11 +++++++++++
21 arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 13 +++++++++++++
22 arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 11 +++++++++++
23 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 13 +++++++++++++
24 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 11 +++++++++++
25 arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 5 ++++-
26 10 files changed, 113 insertions(+), 1 deletion(-)
27
28 --- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
29 +++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
30 @@ -20,6 +20,14 @@
31 reg = <0x00000000 0x08000000>;
32 };
33
34 + nvram@1eff0000 {
35 + compatible = "brcm,nvram";
36 + reg = <0x1eff0000 0x10000>;
37 +
38 + et0macaddr: et0macaddr {
39 + };
40 + };
41 +
42 leds {
43 compatible = "gpio-leds";
44
45 @@ -53,6 +61,11 @@
46 };
47 };
48
49 +&gmac0 {
50 + nvmem-cells = <&et0macaddr>;
51 + nvmem-cell-names = "mac-address";
52 +};
53 +
54 &spi_nor {
55 status = "okay";
56 };
57 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
58 +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
59 @@ -24,6 +24,14 @@
60 reg = <0x00000000 0x08000000>;
61 };
62
63 + nvram@1eff0000 {
64 + compatible = "brcm,nvram";
65 + reg = <0x1eff0000 0x10000>;
66 +
67 + et0macaddr: et0macaddr {
68 + };
69 + };
70 +
71 nand_controller: nand-controller@18028000 {
72 nand@0 {
73 partitions {
74 @@ -60,6 +68,11 @@
75 };
76 };
77
78 +&gmac0 {
79 + nvmem-cells = <&et0macaddr>;
80 + nvmem-cell-names = "mac-address";
81 +};
82 +
83 &spi_nor {
84 status = "okay";
85 };
86 --- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
87 +++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
88 @@ -20,6 +20,14 @@
89 reg = <0x00000000 0x08000000>;
90 };
91
92 + nvram@1eff0000 {
93 + compatible = "brcm,nvram";
94 + reg = <0x1eff0000 0x10000>;
95 +
96 + et0macaddr: et0macaddr {
97 + };
98 + };
99 +
100 leds {
101 compatible = "gpio-leds";
102
103 @@ -53,6 +61,11 @@
104 };
105 };
106
107 +&gmac0 {
108 + nvmem-cells = <&et0macaddr>;
109 + nvmem-cell-names = "mac-address";
110 +};
111 +
112 &spi_nor {
113 status = "okay";
114 };
115 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
116 +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
117 @@ -24,6 +24,10 @@
118 nvram@1eff0000 {
119 compatible = "brcm,nvram";
120 reg = <0x1eff0000 0x10000>;
121 +
122 + et0macaddr: et0macaddr {
123 + #nvmem-cell-cells = <1>;
124 + };
125 };
126
127 leds {
128 @@ -106,6 +110,11 @@
129 vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
130 };
131
132 +&gmac0 {
133 + nvmem-cells = <&et0macaddr 0>;
134 + nvmem-cell-names = "mac-address";
135 +};
136 +
137 &spi_nor {
138 status = "okay";
139 };
140 @@ -137,6 +146,8 @@
141 port@4 {
142 reg = <4>;
143 label = "wan";
144 + nvmem-cells = <&et0macaddr 5>;
145 + nvmem-cell-names = "mac-address";
146 };
147
148 port@5 {
149 --- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
150 +++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
151 @@ -25,6 +25,10 @@
152 nvram@1eff0000 {
153 compatible = "brcm,nvram";
154 reg = <0x1eff0000 0x10000>;
155 +
156 + et0macaddr: et0macaddr {
157 + #nvmem-cell-cells = <1>;
158 + };
159 };
160
161 leds {
162 @@ -61,6 +65,11 @@
163 vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
164 };
165
166 +&gmac0 {
167 + nvmem-cells = <&et0macaddr 0>;
168 + nvmem-cell-names = "mac-address";
169 +};
170 +
171 &spi_nor {
172 status = "okay";
173 };
174 @@ -76,6 +85,8 @@
175 port@0 {
176 reg = <0>;
177 label = "wan";
178 + nvmem-cells = <&et0macaddr 1>;
179 + nvmem-cell-names = "mac-address";
180 };
181
182 port@1 {
183 --- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
184 +++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
185 @@ -20,6 +20,14 @@
186 reg = <0x00000000 0x08000000>;
187 };
188
189 + nvram@1eff0000 {
190 + compatible = "brcm,nvram";
191 + reg = <0x1eff0000 0x10000>;
192 +
193 + et0macaddr: et0macaddr {
194 + };
195 + };
196 +
197 leds {
198 compatible = "gpio-leds";
199
200 @@ -51,6 +59,11 @@
201 };
202 };
203
204 +&gmac0 {
205 + nvmem-cells = <&et0macaddr>;
206 + nvmem-cell-names = "mac-address";
207 +};
208 +
209 &spi_nor {
210 status = "okay";
211 };
212 --- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
213 +++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
214 @@ -25,6 +25,10 @@
215 nvram@1eff0000 {
216 compatible = "brcm,nvram";
217 reg = <0x1eff0000 0x10000>;
218 +
219 + et0macaddr: et0macaddr {
220 + #nvmem-cell-cells = <1>;
221 + };
222 };
223
224 leds {
225 @@ -61,6 +65,11 @@
226 vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
227 };
228
229 +&gmac0 {
230 + nvmem-cells = <&et0macaddr 0>;
231 + nvmem-cell-names = "mac-address";
232 +};
233 +
234 &spi_nor {
235 status = "okay";
236 };
237 @@ -76,6 +85,8 @@
238 port@0 {
239 reg = <0>;
240 label = "wan";
241 + nvmem-cells = <&et0macaddr 1>;
242 + nvmem-cell-names = "mac-address";
243 };
244
245 port@1 {
246 --- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
247 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
248 @@ -22,6 +22,14 @@
249 <0x88000000 0x18000000>;
250 };
251
252 + nvram@1eff0000 {
253 + compatible = "brcm,nvram";
254 + reg = <0x1eff0000 0x10000>;
255 +
256 + et0macaddr: et0macaddr {
257 + };
258 + };
259 +
260 leds {
261 compatible = "gpio-leds";
262
263 @@ -47,6 +55,11 @@
264 status = "okay";
265 };
266
267 +&gmac0 {
268 + nvmem-cells = <&et0macaddr>;
269 + nvmem-cell-names = "mac-address";
270 +};
271 +
272 &spi_nor {
273 status = "okay";
274 };
275 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
276 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
277 @@ -25,6 +25,10 @@
278 nvram@1eff0000 {
279 compatible = "brcm,nvram";
280 reg = <0x1eff0000 0x10000>;
281 +
282 + et0macaddr: et0macaddr {
283 + #nvmem-cell-cells = <1>;
284 + };
285 };
286
287 leds {
288 @@ -101,6 +105,11 @@
289 vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
290 };
291
292 +&gmac0 {
293 + nvmem-cells = <&et0macaddr 0>;
294 + nvmem-cell-names = "mac-address";
295 +};
296 +
297 &spi_nor {
298 status = "okay";
299 };
300 @@ -136,6 +145,8 @@
301 port@4 {
302 reg = <4>;
303 label = "wan";
304 + nvmem-cells = <&et0macaddr 5>;
305 + nvmem-cell-names = "mac-address";
306 };
307
308 port@5 {
309 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
310 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
311 @@ -27,6 +27,7 @@
312 reg = <0x1eff0000 0x10000>;
313
314 et0macaddr: et0macaddr {
315 + #nvmem-cell-cells = <1>;
316 };
317 };
318
319 @@ -76,7 +77,7 @@
320 };
321
322 &gmac0 {
323 - nvmem-cells = <&et0macaddr>;
324 + nvmem-cells = <&et0macaddr 0>;
325 nvmem-cell-names = "mac-address";
326 };
327
328 @@ -119,6 +120,8 @@
329 port@4 {
330 reg = <4>;
331 label = "wan";
332 + nvmem-cells = <&et0macaddr 5>;
333 + nvmem-cell-names = "mac-address";
334 };
335
336 port@5 {