1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
4 */
5
6/dts-v1/;
7
8#include "bcm47094.dtsi"
9#include "bcm5301x-nand-cs0-bch8.dtsi"
10
11/ {
12	compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";
13	model = "Linksys EA9500";
14
15	chosen {
16		bootargs = "console=ttyS0,115200";
17	};
18
19	memory@0 {
20		device_type = "memory";
21		reg = <0x00000000 0x08000000>,
22		      <0x88000000 0x08000000>;
23	};
24
25	nvram@1c080000 {
26		compatible = "brcm,nvram";
27		reg = <0x1c080000 0x100000>;
28	};
29
30	gpio-keys {
31		compatible = "gpio-keys";
32
33		wps {
34			label = "WPS";
35			linux,code = <KEY_WPS_BUTTON>;
36			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
37		};
38
39		rfkill {
40				label = "WiFi";
41				linux,code = <KEY_RFKILL>;
42				gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
43		};
44
45		reset {
46				label = "Reset";
47				linux,code = <KEY_RESTART>;
48				gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
49		};
50	};
51
52	leds {
53		compatible = "gpio-leds";
54
55		wps {
56			label = "bcm53xx:white:wps";
57			gpios = <&chipcommon 22 GPIO_ACTIVE_LOW>;
58		};
59
60		usb2 {
61			label = "bcm53xx:green:usb2";
62			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
63			trigger-sources = <&ohci_port2>, <&ehci_port2>;
64			linux,default-trigger = "usbport";
65		};
66
67		usb3 {
68			label = "bcm53xx:green:usb3";
69			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
70			trigger-sources = <&ohci_port1>, <&ehci_port1>,
71					  <&xhci_port1>;
72			linux,default-trigger = "usbport";
73		};
74
75		power {
76			label = "bcm53xx:white:power";
77			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
78			linux,default-trigger = "default-on";
79		};
80
81		wifi-disabled {
82			label = "bcm53xx:amber:wifi-disabled";
83			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
84		};
85
86		wifi-enabled {
87			label = "bcm53xx:white:wifi-enabled";
88			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
89		};
90
91		bluebar1 {
92			label = "bcm53xx:white:bluebar1";
93			gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
94		};
95
96		bluebar2 {
97			label = "bcm53xx:white:bluebar2";
98			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
99		};
100
101		bluebar3 {
102			label = "bcm53xx:white:bluebar3";
103			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
104		};
105
106		bluebar4 {
107			label = "bcm53xx:white:bluebar4";
108			gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
109		};
110
111		bluebar5 {
112			label = "bcm53xx:white:bluebar5";
113			gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
114		};
115
116		bluebar6 {
117			label = "bcm53xx:white:bluebar6";
118			gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
119		};
120
121		bluebar7 {
122			label = "bcm53xx:white:bluebar7";
123			gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>;
124		};
125
126		bluebar8 {
127			label = "bcm53xx:white:bluebar8";
128			gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
129		};
130	};
131
132	mdio-mux@18003000 {
133
134		/* BIT(9) = 1 => external mdio */
135		mdio@200 {
136			reg = <0x200>;
137			#address-cells = <1>;
138			#size-cells = <0>;
139
140			switch@0  {
141				compatible = "brcm,bcm53125";
142				#address-cells = <1>;
143				#size-cells = <0>;
144				reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
145				reset-names = "robo_reset";
146				reg = <0>;
147				dsa,member = <1 0>;
148				pinctrl-names = "default";
149				pinctrl-0 = <&pinmux_mdio>;
150
151				ports {
152					#address-cells = <1>;
153					#size-cells = <0>;
154
155					port@0 {
156						reg = <0>;
157						label = "lan1";
158					};
159
160					port@1 {
161						reg = <1>;
162						label = "lan5";
163					};
164
165					port@2 {
166						reg = <2>;
167						label = "lan2";
168					};
169
170					port@3 {
171						reg = <3>;
172						label = "lan6";
173					};
174
175					port@4 {
176						reg = <4>;
177						label = "lan3";
178					};
179
180					sw1_p8: port@8 {
181						reg = <8>;
182						ethernet = <&sw0_p0>;
183						label = "cpu";
184
185						fixed-link {
186							speed = <1000>;
187							full-duplex;
188						};
189					};
190				};
191			};
192		};
193	};
194};
195
196&usb2 {
197	vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
198};
199
200&usb3 {
201	vcc-gpio = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
202};
203
204&srab {
205	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
206	status = "okay";
207	dsa,member = <0 0>;
208
209	ports {
210		port@1 {
211			reg = <1>;
212			label = "lan7";
213		};
214
215		port@2 {
216			reg = <2>;
217			label = "lan4";
218		};
219
220		port@3 {
221			reg = <3>;
222			label = "lan8";
223		};
224
225		port@4 {
226			reg = <4>;
227			label = "wan";
228		};
229
230		port@5 {
231			reg = <5>;
232			ethernet = <&gmac0>;
233			label = "cpu";
234			status = "disabled";
235
236			fixed-link {
237				speed = <1000>;
238				full-duplex;
239			};
240		};
241
242		port@7 {
243			reg = <7>;
244			ethernet = <&gmac1>;
245			label = "cpu";
246			status = "disabled";
247
248			fixed-link {
249				speed = <1000>;
250				full-duplex;
251			};
252		};
253
254		port@8 {
255			reg = <8>;
256			ethernet = <&gmac2>;
257			label = "cpu";
258
259			fixed-link {
260				speed = <1000>;
261				full-duplex;
262			};
263		};
264
265		sw0_p0: port@0 {
266			reg = <0>;
267			label = "extsw";
268
269			fixed-link {
270				speed = <1000>;
271				full-duplex;
272			};
273		};
274	};
275};
276
277&usb3_phy {
278	status = "okay";
279};
280
281&nandcs {
282	partitions {
283		compatible = "linksys,ns-partitions";
284		#address-cells = <1>;
285		#size-cells = <1>;
286
287		partition@0 {
288			label = "boot";
289			reg = <0x0000000 0x0080000>;
290			read-only;
291		};
292
293		partition@80000 {
294			label = "nvram";
295			reg = <0x080000 0x0100000>;
296		};
297
298		partition@180000{
299			label = "devinfo";
300			reg = <0x0180000 0x080000>;
301		};
302
303		partition@200000 {
304			reg = <0x0200000 0x01d00000>;
305			compatible = "linksys,ns-firmware", "brcm,trx";
306		};
307
308		partition@1f00000 {
309			reg = <0x01f00000 0x01d00000>;
310			compatible = "linksys,ns-firmware", "brcm,trx";
311		};
312
313		partition@5200000 {
314			label = "system";
315			reg = <0x05200000 0x02e00000>;
316		};
317	};
318};
319