bcm53xx: fix bcma gpio chip base
[openwrt/staging/mkresin.git] / target / linux / mvebu / files / arch / arm / boot / dts / armada-xp-mamba.dts
1 /*
2 * Device Tree file for the Linksys WRT1900AC (Mamba).
3 *
4 * Note: this board is shipped with a new generation boot loader that
5 * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
6 * is used, the CONFIG_DEBUG_MVEBU_UART_ALTERNATE option should be
7 * used.
8 *
9 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
10 *
11 * Based on armada-xp-axpwifiap.dts:
12 *
13 * Copyright (C) 2013 Marvell
14 *
15 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 *
17 * This file is dual-licensed: you can use it either under the terms
18 * of the GPL or the X11 license, at your option. Note that this dual
19 * licensing only applies to this file, and not this project as a
20 * whole.
21 *
22 * a) This file is licensed under the terms of the GNU General Public
23 * License version 2. This program is licensed "as is" without
24 * any warranty of any kind, whether express or implied.
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
48 */
49
50 /dts-v1/;
51 #include <dt-bindings/gpio/gpio.h>
52 #include <dt-bindings/input/input.h>
53 #include "armada-xp-mv78230.dtsi"
54
55 / {
56 model = "Linksys WRT1900AC (Mamba)";
57 compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
58 "marvell,armadaxp", "marvell,armada-370-xp";
59
60 chosen {
61 bootargs = "console=ttyS0,115200";
62 stdout-path = &uart0;
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
68 };
69
70 soc {
71 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
72 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
73
74 pcie-controller {
75 status = "okay";
76
77 /* Etron EJ168 USB 3.0 controller */
78 pcie@1,0 {
79 /* Port 0, Lane 0 */
80 status = "okay";
81 };
82
83 /* First mini-PCIe port */
84 pcie@2,0 {
85 /* Port 0, Lane 1 */
86 status = "okay";
87
88 mwlwifi {
89 marvell,5ghz = <0>;
90 marvell,chainmask = <4 4>;
91 marvell,powertable {
92 FCC =
93 <1 0 0x17 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>,
94 <2 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>,
95 <3 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>,
96 <4 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>,
97 <5 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>,
98 <6 0 0x17 0x16 0x16 0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0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>,
114 <9 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>,
115 <10 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>,
116 <11 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>,
117 <12 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>,
118 <13 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>;
119 };
120 };
121 };
122
123 /* Second mini-PCIe port */
124 pcie@3,0 {
125 /* Port 0, Lane 3 */
126 status = "okay";
127
128 mwlwifi {
129 marvell,2ghz = <0>;
130 marvell,chainmask = <4 4>;
131 marvell,powertable {
132 FCC =
133 <36 0 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>,
134 <40 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>,
135 <44 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>,
136 <48 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>,
137 <52 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>,
138 <56 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>,
139 <60 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>,
140 <64 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>,
141 <100 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
142 <104 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
143 <108 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
144 <112 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
145 <116 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
146 <120 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
147 <124 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
148 <128 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
149 <132 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
150 <136 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
151 <140 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>,
152 <149 0 0x16 0x16 0x16 0x16 0x14 0x14 0x14 0x14 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>,
153 <153 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>,
154 <157 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>,
155 <161 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>,
156 <165 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>;
157
158 ETSI =
159 <36 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
160 <40 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
161 <44 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
162 <48 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
163 <52 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
164 <56 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
165 <60 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>,
166 <64 0 0xc 0xc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
182 };
183
184 internal-regs {
185 serial@12000 {
186 status = "okay";
187 };
188
189 sata@a0000 {
190 nr-ports = <1>;
191 status = "okay";
192 };
193
194 ethernet@70000 {
195 pinctrl-0 = <&ge0_rgmii_pins>;
196 pinctrl-names = "default";
197 status = "okay";
198 phy-mode = "rgmii-id";
199 fixed-link {
200 speed = <1000>;
201 full-duplex;
202 };
203 };
204
205 ethernet@74000 {
206 pinctrl-0 = <&ge1_rgmii_pins>;
207 pinctrl-names = "default";
208 status = "okay";
209 phy-mode = "rgmii-id";
210 fixed-link {
211 speed = <1000>;
212 full-duplex;
213 };
214 };
215
216 /* USB part of the eSATA/USB 2.0 port */
217 usb@50000 {
218 status = "okay";
219 };
220
221 i2c@11000 {
222 status = "okay";
223 clock-frequency = <100000>;
224
225 tmp421@4c {
226 compatible = "ti,tmp421";
227 reg = <0x4c>;
228 };
229
230 tlc59116@68 {
231 #address-cells = <1>;
232 #size-cells = <0>;
233 #gpio-cells = <2>;
234 compatible = "ti,tlc59116";
235 reg = <0x68>;
236
237 wan_amber@0 {
238 label = "mamba:amber:wan";
239 reg = <0x0>;
240 };
241
242 wan_white@1 {
243 label = "mamba:white:wan";
244 reg = <0x1>;
245 };
246
247 wlan_2g@2 {
248 label = "mamba:white:wlan_2g";
249 reg = <0x2>;
250 };
251
252 wlan_5g@3 {
253 label = "mamba:white:wlan_5g";
254 reg = <0x3>;
255 };
256
257 esata@4 {
258 label = "mamba:white:esata";
259 reg = <0x4>;
260 };
261
262 usb2@5 {
263 label = "mamba:white:usb2";
264 reg = <0x5>;
265 };
266
267 usb3_1@6 {
268 label = "mamba:white:usb3_1";
269 reg = <0x6>;
270 };
271
272 usb3_2@7 {
273 label = "mamba:white:usb3_2";
274 reg = <0x7>;
275 };
276
277 wps_white@8 {
278 label = "mamba:white:wps";
279 reg = <0x8>;
280 };
281
282 wps_amber@9 {
283 label = "mamba:amber:wps";
284 reg = <0x9>;
285 };
286 };
287 };
288
289 nand@d0000 {
290 status = "okay";
291 num-cs = <1>;
292 marvell,nand-keep-config;
293 marvell,nand-enable-arbiter;
294 nand-on-flash-bbt;
295 nand-ecc-strength = <4>;
296 nand-ecc-step-size = <512>;
297
298 partition@0 {
299 label = "u-boot";
300 reg = <0x0000000 0x100000>; /* 1MB */
301 read-only;
302 };
303
304 partition@100000 {
305 label = "u_env";
306 reg = <0x100000 0x40000>; /* 256KB */
307 };
308
309 partition@140000 {
310 label = "s_env";
311 reg = <0x140000 0x40000>; /* 256KB */
312 };
313
314 partition@900000 {
315 label = "devinfo";
316 reg = <0x900000 0x100000>; /* 1MB */
317 read-only;
318 };
319
320 partition@a00000 {
321 label = "kernel1";
322 reg = <0xa00000 0x2800000>; /* 3MB + rootfs1 */
323 };
324
325 partition@d00000 {
326 label = "rootfs1";
327 reg = <0xd00000 0x2500000>; /* 37MB */
328 };
329
330 partition@3200000 {
331 label = "kernel2";
332 reg = <0x3200000 0x2800000>; /* 3MB + rootfs2 */
333 };
334
335 partition@3500000 {
336 label = "rootfs2";
337 reg = <0x3500000 0x2500000>; /* 37MB */
338 };
339
340 /* Last MB is for the BBT, i.e. not writable */
341 partition@5a00000 {
342 label = "syscfg";
343 reg = <0x5a00000 0x2600000>; /* 38MB */
344 };
345 };
346
347 spi0: spi@10600 {
348 status = "okay";
349
350 spi-flash@0 {
351 #address-cells = <1>;
352 #size-cells = <1>;
353 compatible = "everspin,mr25h256";
354 reg = <0>; /* Chip select 0 */
355 spi-max-frequency = <40000000>;
356 };
357 };
358 };
359 };
360
361 gpio_keys {
362 compatible = "gpio-keys";
363 #address-cells = <1>;
364 #size-cells = <0>;
365 pinctrl-0 = <&keys_pin>;
366 pinctrl-names = "default";
367
368 button@1 {
369 label = "WPS";
370 linux,code = <KEY_WPS_BUTTON>;
371 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
372 };
373
374 button@2 {
375 label = "Factory Reset Button";
376 linux,code = <KEY_RESTART>;
377 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
378 };
379 };
380
381 gpio-leds {
382 compatible = "gpio-leds";
383 pinctrl-0 = <&power_led_pin>;
384 pinctrl-names = "default";
385
386 power {
387 label = "mamba:white:power";
388 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
389 default-state = "on";
390 };
391 };
392
393 gpio_fan {
394 /* SUNON HA4010V4-0000-C99 */
395 compatible = "gpio-fan";
396 gpios = <&gpio0 24 0>;
397
398 gpio-fan,speed-map = <0 0
399 4500 1>;
400 };
401
402 mvsw61xx {
403 compatible = "marvell,88e6172";
404 status = "okay";
405 reg = <0x10>;
406
407 mii-bus = <&mdio>;
408 cpu-port-0 = <5>;
409 cpu-port-1 = <6>;
410 };
411 };
412
413 &pinctrl {
414
415 keys_pin: keys-pin {
416 marvell,pins = "mpp32", "mpp33";
417 marvell,function = "gpio";
418 };
419
420 power_led_pin: power-led-pin {
421 marvell,pins = "mpp40";
422 marvell,function = "gpio";
423 };
424
425 gpio_fan_pin: gpio-fan-pin {
426 marvell,pins = "mpp24";
427 marvell,function = "gpio";
428 };
429 };