15dc5f445e3ac09c31f67c5758ecc0a3d4f74a4f
[openwrt/staging/noltari.git] / target / linux / qoriq / files / arch / powerpc / boot / dts / fsl / watchguard-firebox-m300.dts
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
2 /*
3 * WatchGuard Firebox M300 Device Tree Source
4 * Based on t2081qds.dts from Linux 5.10
5 *
6 * Copyright 2013 - 2015 Freescale Semiconductor Inc.
7 * Copyright 2020 - 2021 Stijn Tintel <stijn@linux-ipv6.be>
8 */
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12
13 /include/ "t208xsi-pre.dtsi"
14 /include/ "t208xqds.dtsi"
15
16 / {
17 model = "WatchGuard Firebox M300";
18 compatible = "watchguard,firebox-m300", "fsl,T2081QDS";
19
20 interrupt-parent = <&mpic>;
21
22 aliases {
23 /delete-property/ ethernet0;
24 /delete-property/ ethernet1;
25 /delete-property/ ethernet2;
26 /delete-property/ ethernet3;
27 /delete-property/ ethernet4;
28 /delete-property/ ethernet5;
29 /delete-property/ ethernet6;
30 /delete-property/ ethernet7;
31
32 ethernet0 = &enet7;
33 ethernet1 = &enet0;
34 ethernet2 = &enet1;
35 ethernet3 = &enet2;
36 ethernet4 = &enet3;
37
38 led-boot = &led_shield;
39 led-failsafe = &led_shield;
40 led-running = &led_shield;
41 led-upgrade = &led_shield;
42 };
43 };
44
45 &soc {
46 // Include first to make this the first interface
47 /include/ "qoriq-fman3-0-10g-1.dtsi"
48 };
49
50 // mdio-mux under &boardctrl + its aliases removed. causes crash:
51 // Oops: Machine check, sig: 7 [#1]
52
53 /include/ "t2081si-post.dtsi"
54
55 // add stuff below the include to make sure we override whatever is there
56
57 &enet0 {
58 phy-connection-type = "sgmii";
59 phy-handle = <&phy1>;
60 };
61
62 &enet1 {
63 phy-connection-type = "sgmii";
64 phy-handle = <&phy2>;
65 };
66
67 &enet2 {
68 phy-connection-type = "rgmii";
69
70 fixed-link {
71 speed = <1000>;
72 full-duplex;
73 };
74 };
75
76 &enet3 {
77 phy-connection-type = "rgmii";
78
79 fixed-link {
80 speed = <1000>;
81 full-duplex;
82 };
83 };
84
85 &enet4 {
86 status = "disabled";
87 };
88
89 &enet5 {
90 status = "disabled";
91 };
92
93 &enet6 {
94 status = "disabled";
95 };
96
97 &enet7 {
98 phy-connection-type = "sgmii";
99 phy-handle = <&phy0>;
100 };
101
102 &ifc {
103 ranges = <0x00 0x00 0x0f 0xefc00000 0x400000>;
104
105 nor@0,0 {
106 reg = <0x00 0x00 0x400000>;
107
108 partition@0{
109 reg = <0x0 0x10000>;
110 label = "qoriq-rcw";
111 read-only;
112 };
113
114 partition@10000 {
115 reg = <0x10000 0x20000>;
116 label = "wg_cfg0";
117 read-only;
118 };
119
120 partition@30000 {
121 reg = <0x30000 0x10000>;
122 label = "wg_cfg1";
123 read-only;
124 };
125
126 partition@40000 {
127 reg = <0x40000 0x10000>;
128 label = "wg_mfg_data";
129 read-only;
130 };
131
132 partition@50000 {
133 reg = <0x50000 0xb0000>;
134 label = "wg_bootopt_data_and_reserved";
135 read-only;
136 };
137
138 partition@100000 {
139 reg = <0x100000 0xb0000>;
140 label = "wg_extra_reserved_1";
141 read-only;
142 };
143
144 partition@1B0000 {
145 reg = <0x1b0000 0xb0000>;
146 label = "wg_extra_reserved_2";
147 read-only;
148 };
149
150 partition@260000 {
151 reg = <0x260000 0xc0000>;
152 label = "wg_u-boot_failsafe";
153 read-only;
154 };
155
156 partition@320000 {
157 reg = <0x320000 0x10000>;
158 label = "qoriq-fman";
159 read-only;
160 };
161
162 partition@330000 {
163 reg = <0x330000 0x10000>;
164 label = "u-boot-env";
165 };
166
167 partition@340000 {
168 reg = <0x340000 0xc0000>;
169 label = "u-boot";
170 read-only;
171 };
172 };
173
174 nand@2,0 {
175 status = "disabled";
176 };
177 };
178
179 &mdio0 {
180 // m300 ethernet port 0
181 phy0: ethernet-phy@0 {
182 reg = <0x00>;
183 };
184
185 // m300 ethernet port 1
186 phy1: ethernet-phy@1 {
187 reg = <0x01>;
188 };
189
190 phy2: ethernet-phy@2 {
191 reg = <0x02>;
192 };
193
194 phy3: ethernet-phy@3 {
195 reg = <0x03>;
196 };
197
198 switch0: switch@10 {
199 compatible = "marvell,mv88e6085";
200 reg = <0x10>;
201
202 mdio {
203 #address-cells = <1>;
204 #size-cells = <0>;
205
206 switch0phy0: switch0phy0@0 {
207 reg = <0x00>;
208 interrupt-parent = <&switch0>;
209 };
210
211 switch0phy1: switch0phy1@1 {
212 reg = <0x01>;
213 interrupt-parent = <&switch0>;
214 };
215
216 switch0phy2: switch0phy2@2 {
217 reg = <0x02>;
218 interrupt-parent = <&switch0>;
219 };
220
221 switch0phy3: switch0phy3@3 {
222 reg = <0x03>;
223 interrupt-parent = <&switch0>;
224 };
225
226 switch0phy4: switch0phy4@4 {
227 reg = <0x04>;
228 interrupt-parent = <&switch0>;
229 };
230 };
231
232 ports {
233 #address-cells = <1>;
234 #size-cells = <0>;
235
236 port@0 {
237 reg = <0>;
238 label = "sweth3";
239 phy-handle = <&switch0phy0>;
240 };
241
242 port@1 {
243 reg = <1>;
244 label = "sweth4";
245 phy-handle = <&switch0phy1>;
246 };
247
248 port@2 {
249 reg = <2>;
250 label = "sweth5";
251 phy-handle = <&switch0phy2>;
252 };
253
254 port@3 {
255 reg = <3>;
256 label = "sweth6";
257 phy-handle = <&switch0phy3>;
258 };
259
260 port@4 {
261 reg = <4>;
262 label = "sweth7";
263 phy-handle = <&switch0phy4>;
264 };
265
266 // OEM bootlog suggests multiple ports are attached to switch
267 // Keep this until OEM supplies GPL sources
268 port@5 {
269 status = "disabled";
270
271 reg = "<5>";
272 label = "cpu";
273 ethernet = <&enet2>;
274 phy-mode = "rgmii-id";
275
276 fixed-link {
277 speed = <1000>;
278 full-duplex;
279 };
280 };
281
282 port@6 {
283 reg = <6>;
284 label = "cpu";
285 ethernet = <&enet3>;
286 phy-mode = "rgmii-id";
287
288 fixed-link {
289 speed = <1000>;
290 full-duplex;
291 };
292 };
293 };
294 };
295 };
296
297 &soc {
298 i2c@118000 {
299 tpm@29 {
300 compatible = "tpm,tpm_i2c_atmel";
301 reg = <0x29>;
302 };
303 hwmon@2c {
304 compatible = "winbond,w83793";
305 reg = <0x2c>;
306 };
307 hwmon@2d {
308 compatible = "winbond,w83793";
309 reg = <0x2d>;
310 };
311 rtc@32 {
312 compatible = "ricoh,rs5c372a";
313 reg = <0x32>;
314 };
315 pca9547@77 {
316 status = "disabled";
317 };
318 };
319
320 spi@110000 {
321 // DTS decompiled from OEM DTB contains flash@0 but doesn't work
322 // spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
323 // disable for now
324 flash@0 {
325 status = "disabled";
326 };
327
328 flash@1 {
329 status = "disabled";
330 };
331
332 flash@2 {
333 status = "disabled";
334 };
335 };
336
337 keys {
338 compatible = "gpio-keys";
339
340 reset {
341 linux,code = <KEY_RESTART>;
342 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
343 debounce-interval = <60>;
344 };
345 };
346
347 leds {
348 compatible = "gpio-leds";
349
350 shield-red {
351 label = "red:shield";
352 gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
353 };
354
355 led_shield: shield-green {
356 label = "green:shield";
357 gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
358 };
359 };
360 };