]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/armada-xp-linksys-mamba.dts
Merge tag 'renesas-fixes4-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / arch / arm / boot / dts / armada-xp-linksys-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_UART0_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";
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@0 {
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                           MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
74                           MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
75                           MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
76
77                 internal-regs {
78
79                         rtc@10300 {
80                                 /* No crystal connected to the internal RTC */
81                                 status = "disabled";
82                         };
83
84                         /* J10: VCC, NC, RX, NC, TX, GND  */
85                         serial@12000 {
86                                 status = "okay";
87                         };
88
89                         sata@a0000 {
90                                 nr-ports = <1>;
91                                 status = "okay";
92                         };
93
94                         ethernet@70000 {
95                                 pinctrl-0 = <&ge0_rgmii_pins>;
96                                 pinctrl-names = "default";
97                                 status = "okay";
98                                 phy-mode = "rgmii-id";
99                                 buffer-manager = <&bm>;
100                                 bm,pool-long = <0>;
101                                 bm,pool-short = <1>;
102                                 fixed-link {
103                                         speed = <1000>;
104                                         full-duplex;
105                                 };
106                         };
107
108                         ethernet@74000 {
109                                 pinctrl-0 = <&ge1_rgmii_pins>;
110                                 pinctrl-names = "default";
111                                 status = "okay";
112                                 phy-mode = "rgmii-id";
113                                 buffer-manager = <&bm>;
114                                 bm,pool-long = <2>;
115                                 bm,pool-short = <3>;
116                                 fixed-link {
117                                         speed = <1000>;
118                                         full-duplex;
119                                 };
120                         };
121
122                         /* USB part of the eSATA/USB 2.0 port */
123                         usb@50000 {
124                                 status = "okay";
125                         };
126
127                         i2c@11000 {
128                                 status = "okay";
129                                 clock-frequency = <100000>;
130
131                                 tmp421@4c {
132                                         compatible = "ti,tmp421";
133                                         reg = <0x4c>;
134                                 };
135
136                                 tlc59116@68 {
137                                         #address-cells = <1>;
138                                         #size-cells = <0>;
139                                         #gpio-cells = <2>;
140                                         compatible = "ti,tlc59116";
141                                         reg = <0x68>;
142
143                                         wan_amber@0 {
144                                                 label = "mamba:amber:wan";
145                                                 reg = <0x0>;
146                                         };
147
148                                         wan_white@1 {
149                                                 label = "mamba:white:wan";
150                                                 reg = <0x1>;
151                                         };
152
153                                         wlan_2g@2 {
154                                                 label = "mamba:white:wlan_2g";
155                                                 reg = <0x2>;
156                                         };
157
158                                         wlan_5g@3 {
159                                                 label = "mamba:white:wlan_5g";
160                                                 reg = <0x3>;
161                                         };
162
163                                         esata@4 {
164                                                 label = "mamba:white:esata";
165                                                 reg = <0x4>;
166                                                 linux,default-trigger = "disk-activity";
167                                         };
168
169                                         usb2@5 {
170                                                 label = "mamba:white:usb2";
171                                                 reg = <0x5>;
172                                         };
173
174                                         usb3_1@6 {
175                                                 label = "mamba:white:usb3_1";
176                                                 reg = <0x6>;
177                                         };
178
179                                         usb3_2@7 {
180                                                 label = "mamba:white:usb3_2";
181                                                 reg = <0x7>;
182                                         };
183
184                                         wps_white@8 {
185                                                 label = "mamba:white:wps";
186                                                 reg = <0x8>;
187                                         };
188
189                                         wps_amber@9 {
190                                                 label = "mamba:amber:wps";
191                                                 reg = <0x9>;
192                                         };
193                                 };
194                         };
195
196                         bm@c8000 {
197                                 status = "okay";
198                         };
199
200                         nand@d0000 {
201                                 status = "okay";
202                                 num-cs = <1>;
203                                 marvell,nand-keep-config;
204                                 marvell,nand-enable-arbiter;
205                                 nand-on-flash-bbt;
206                                 nand-ecc-strength = <4>;
207                                 nand-ecc-step-size = <512>;
208
209                                 partition@0 {
210                                         label = "u-boot";
211                                         reg = <0x0000000 0x100000>;  /* 1MB */
212                                         read-only;
213                                 };
214
215                                 partition@100000 {
216                                         label = "u_env";
217                                         reg = <0x100000 0x40000>;    /* 256KB */
218                                 };
219
220                                 partition@140000 {
221                                         label = "s_env";
222                                         reg = <0x140000 0x40000>;    /* 256KB */
223                                 };
224
225                                 partition@900000 {
226                                         label = "devinfo";
227                                         reg = <0x900000 0x100000>;   /* 1MB */
228                                         read-only;
229                                 };
230
231                                 /* kernel1 overlaps with rootfs1 by design */
232                                 partition@a00000 {
233                                         label = "kernel1";
234                                         reg = <0xa00000 0x2800000>;  /* 40MB */
235                                 };
236
237                                 partition@d00000 {
238                                         label = "rootfs1";
239                                         reg = <0xd00000 0x2500000>;  /* 37MB */
240                                 };
241
242                                 /* kernel2 overlaps with rootfs2 by design */
243                                 partition@3200000 {
244                                         label = "kernel2";
245                                         reg = <0x3200000 0x2800000>; /* 40MB */
246                                 };
247
248                                 partition@3500000 {
249                                         label = "rootfs2";
250                                         reg = <0x3500000 0x2500000>; /* 37MB */
251                                 };
252
253                                 /*
254                                  * 38MB, last MB is for the BBT, not writable
255                                  */
256                                 partition@5a00000 {
257                                         label = "syscfg";
258                                         reg = <0x5a00000 0x2600000>;
259                                 };
260
261                                 /*
262                                  * Unused area between "s_env" and "devinfo".
263                                  * Moved here because otherwise the renumbered
264                                  * partitions would break the bootloader
265                                  * supplied bootargs
266                                  */
267                                 partition@180000 {
268                                         label = "unused_area";
269                                         reg = <0x180000 0x780000>;   /* 7.5MB */
270                                 };
271                         };
272                 };
273
274                 bm-bppi {
275                         status = "okay";
276                 };
277         };
278
279         gpio_keys {
280                 compatible = "gpio-keys";
281                 #address-cells = <1>;
282                 #size-cells = <0>;
283                 pinctrl-0 = <&keys_pin>;
284                 pinctrl-names = "default";
285
286                 wps {
287                         label = "WPS";
288                         linux,code = <KEY_WPS_BUTTON>;
289                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
290                 };
291
292                 reset {
293                         label = "Factory Reset Button";
294                         linux,code = <KEY_RESTART>;
295                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
296                 };
297         };
298
299         gpio-leds {
300                 compatible = "gpio-leds";
301                 pinctrl-0 = <&power_led_pin>;
302                 pinctrl-names = "default";
303
304                 power {
305                         label = "mamba:white:power";
306                         gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
307                         default-state = "on";
308                 };
309         };
310
311         pwm_fan {
312                 /* SUNON HA4010V4-0000-C99 */
313
314                 compatible = "pwm-fan";
315                 pwms = <&gpio0 24 4000>;
316         };
317
318         dsa {
319                 status = "disabled";
320
321                 compatible = "marvell,dsa";
322                 #address-cells = <2>;
323                 #size-cells = <0>;
324
325                 dsa,ethernet = <&eth0>;
326                 dsa,mii-bus = <&mdio>;
327
328                 switch@0 {
329                         #address-cells = <1>;
330                         #size-cells = <0>;
331                         reg = <0x0 0>;  /* MDIO address 0, switch 0 in tree */
332
333                         port@0 {
334                                 reg = <0>;
335                                 label = "lan4";
336                         };
337
338                         port@1 {
339                                 reg = <1>;
340                                 label = "lan3";
341                         };
342
343                         port@2 {
344                                 reg = <2>;
345                                 label = "lan2";
346                         };
347
348                         port@3 {
349                                 reg = <3>;
350                                 label = "lan1";
351                         };
352
353                         port@4 {
354                                 reg = <4>;
355                                 label = "internet";
356                         };
357
358                         port@5 {
359                                 reg = <5>;
360                                 label = "cpu";
361                         };
362                 };
363         };
364 };
365
366 &pciec {
367         status = "okay";
368
369         /* Etron EJ168 USB 3.0 controller */
370         pcie@1,0 {
371                 /* Port 0, Lane 0 */
372                 status = "okay";
373         };
374
375         /* First mini-PCIe port */
376         pcie@2,0 {
377                 /* Port 0, Lane 1 */
378                 status = "okay";
379         };
380
381         /* Second mini-PCIe port */
382         pcie@3,0 {
383                 /* Port 0, Lane 3 */
384                 status = "okay";
385         };
386 };
387
388 &pinctrl {
389
390         keys_pin: keys-pin {
391                 marvell,pins = "mpp32", "mpp33";
392                 marvell,function = "gpio";
393         };
394
395         power_led_pin: power-led-pin {
396                 marvell,pins = "mpp40";
397                 marvell,function = "gpio";
398         };
399
400         gpio_fan_pin: gpio-fan-pin {
401                 marvell,pins = "mpp24";
402                 marvell,function = "gpio";
403         };
404 };
405
406 &spi0 {
407         status = "okay";
408
409         spi-flash@0 {
410                 #address-cells = <1>;
411                 #size-cells = <1>;
412                 compatible = "everspin,mr25h256";
413                 reg = <0>; /* Chip select 0 */
414                 spi-max-frequency = <40000000>;
415         };
416 };
417
418 &mdio {
419         status = "okay";
420
421         switch@0 {
422                 compatible = "marvell,mv88e6085";
423                 #address-cells = <1>;
424                 #size-cells = <0>;
425                 reg = <0>;
426
427                 ports {
428                         #address-cells = <1>;
429                         #size-cells = <0>;
430
431                         port@0 {
432                                 reg = <0>;
433                                 label = "lan4";
434                         };
435
436                         port@1 {
437                                 reg = <1>;
438                                 label = "lan3";
439                         };
440
441                         port@2 {
442                                 reg = <2>;
443                                 label = "lan2";
444                         };
445
446                         port@3 {
447                                 reg = <3>;
448                                 label = "lan1";
449                         };
450
451                         port@4 {
452                                 reg = <4>;
453                                 label = "internet";
454                         };
455
456                         port@5 {
457                                 reg = <5>;
458                                 label = "cpu";
459                                 ethernet = <&eth0>;
460                                 fixed-link {
461                                         speed = <1000>;
462                                         full-duplex;
463                                 };
464                         };
465                 };
466         };
467 };