1 From 3abdd583312a2830129dc42e1e3d98368a8fda47 Mon Sep 17 00:00:00 2001
2 From: Imre Kaloz <kaloz@openwrt.org>
3 Date: Wed, 20 May 2015 23:14:16 +0200
4 Subject: ARM: mvebu: add support for the new Armada 385 based Linksys boards
6 This patch adds support for the Linksys WRT1200AC (Caiman) and
7 the Linksys WRT1900AC v2 (Cobra).
11 - 2 Marvell 88W8864 radios
13 - 1 USB 2.0/eSATAp port
14 - 2 Ethernet interfaces connected to a 88E6176 switch (1x WAN + 4x LAN)
18 gregory.clement@free-electrons.com: use serial0:115200n8 in
19 stdout-path and remove the bootargs part in the chosen node
21 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
22 Acked-by: Andrew Lunn <andrew@lunn.ch>
23 Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
25 arch/arm/boot/dts/Makefile | 2 +
26 arch/arm/boot/dts/armada-385-linksys-caiman.dts | 114 ++++++++
27 arch/arm/boot/dts/armada-385-linksys-cobra.dts | 114 ++++++++
28 arch/arm/boot/dts/armada-385-linksys.dtsi | 332 ++++++++++++++++++++++++
29 4 files changed, 562 insertions(+)
30 create mode 100644 arch/arm/boot/dts/armada-385-linksys-caiman.dts
31 create mode 100644 arch/arm/boot/dts/armada-385-linksys-cobra.dts
32 create mode 100644 arch/arm/boot/dts/armada-385-linksys.dtsi
34 --- a/arch/arm/boot/dts/Makefile
35 +++ b/arch/arm/boot/dts/Makefile
36 @@ -633,6 +633,8 @@ dtb-$(CONFIG_MACH_ARMADA_375) += \
38 dtb-$(CONFIG_MACH_ARMADA_38X) += \
39 armada-385-db-ap.dtb \
40 + armada-385-linksys-caiman.dtb \
41 + armada-385-linksys-cobra.dtb \
46 +++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
49 + * Device Tree include for the Linksys WRT1200AC (Caiman)
51 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org>
54 + * This file is dual-licensed: you can use it either under the terms
55 + * of the GPL or the X11 license, at your option. Note that this dual
56 + * licensing only applies to this file, and not this project as a
59 + * a) This file is licensed under the terms of the GNU General Public
60 + * License version 2. This program is licensed "as is" without
61 + * any warranty of any kind, whether express or implied.
63 + * Or, alternatively,
65 + * b) Permission is hereby granted, free of charge, to any person
66 + * obtaining a copy of this software and associated documentation
67 + * files (the "Software"), to deal in the Software without
68 + * restriction, including without limitation the rights to use,
69 + * copy, modify, merge, publish, distribute, sublicense, and/or
70 + * sell copies of the Software, and to permit persons to whom the
71 + * Software is furnished to do so, subject to the following
74 + * The above copyright notice and this permission notice shall be
75 + * included in all copies or substantial portions of the Software.
77 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
78 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
79 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
80 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
81 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
82 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
83 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
84 + * OTHER DEALINGS IN THE SOFTWARE.
88 +#include "armada-385-linksys.dtsi"
91 + model = "Linksys WRT1200AC";
92 + compatible = "linksys,caiman", "linksys,armada385", "marvell,armada385",
93 + "marvell,armada380";
100 + #address-cells = <1>;
104 + label = "caiman:amber:wan";
109 + label = "caiman:white:wan";
114 + label = "caiman:white:wlan_2g";
119 + label = "caiman:white:wlan_5g";
124 + label = "caiman:white:usb2";
129 + label = "caiman:white:usb3_1";
134 + label = "caiman:white:usb3_2";
139 + label = "caiman:white:wps";
144 + label = "caiman:amber:wps";
154 + label = "caiman:white:power";
158 + label = "caiman:white:sata";
163 +++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
166 + * Device Tree file for the Linksys WRT1900ACv2 (Cobra)
168 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org>
171 + * This file is dual-licensed: you can use it either under the terms
172 + * of the GPL or the X11 license, at your option. Note that this dual
173 + * licensing only applies to this file, and not this project as a
176 + * a) This file is licensed under the terms of the GNU General Public
177 + * License version 2. This program is licensed "as is" without
178 + * any warranty of any kind, whether express or implied.
180 + * Or, alternatively,
182 + * b) Permission is hereby granted, free of charge, to any person
183 + * obtaining a copy of this software and associated documentation
184 + * files (the "Software"), to deal in the Software without
185 + * restriction, including without limitation the rights to use,
186 + * copy, modify, merge, publish, distribute, sublicense, and/or
187 + * sell copies of the Software, and to permit persons to whom the
188 + * Software is furnished to do so, subject to the following
191 + * The above copyright notice and this permission notice shall be
192 + * included in all copies or substantial portions of the Software.
194 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
195 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
196 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
197 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
198 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
199 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
200 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
201 + * OTHER DEALINGS IN THE SOFTWARE.
205 +#include "armada-385-linksys.dtsi"
208 + model = "Linksys WRT1900ACv2";
209 + compatible = "linksys,cobra", "linksys,armada385", "marvell,armada385",
210 + "marvell,armada380";
217 + #address-cells = <1>;
221 + label = "cobra:amber:wan";
226 + label = "cobra:white:wan";
231 + label = "cobra:white:wlan_2g";
236 + label = "cobra:white:wlan_5g";
241 + label = "cobra:white:usb2";
246 + label = "cobra:white:usb3_1";
251 + label = "cobra:white:usb3_2";
256 + label = "cobra:white:wps";
261 + label = "cobra:amber:wps";
271 + label = "cobra:white:power";
275 + label = "cobra:white:sata";
280 +++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
283 + * Device Tree include file for Armada 385 based Linksys boards
285 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org>
288 + * This file is dual-licensed: you can use it either under the terms
289 + * of the GPL or the X11 license, at your option. Note that this dual
290 + * licensing only applies to this file, and not this project as a
293 + * a) This file is licensed under the terms of the GNU General Public
294 + * License version 2. This program is licensed "as is" without
295 + * any warranty of any kind, whether express or implied.
297 + * Or, alternatively,
299 + * b) Permission is hereby granted, free of charge, to any person
300 + * obtaining a copy of this software and associated documentation
301 + * files (the "Software"), to deal in the Software without
302 + * restriction, including without limitation the rights to use,
303 + * copy, modify, merge, publish, distribute, sublicense, and/or
304 + * sell copies of the Software, and to permit persons to whom the
305 + * Software is furnished to do so, subject to the following
308 + * The above copyright notice and this permission notice shall be
309 + * included in all copies or substantial portions of the Software.
311 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
312 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
313 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
314 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
315 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
316 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
317 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
318 + * OTHER DEALINGS IN THE SOFTWARE.
321 +#include <dt-bindings/gpio/gpio.h>
322 +#include <dt-bindings/input/input.h>
323 +#include "armada-385.dtsi"
326 + model = "Linksys boards based on Armada 385";
327 + compatible = "linksys,armada385", "marvell,armada385",
328 + "marvell,armada380";
331 + stdout-path = "serial0:115200n8";
335 + device_type = "memory";
336 + reg = <0x00000000 0x20000000>; /* 512 MB */
340 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
341 + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
346 + status = "disabled";
350 + pinctrl-names = "default";
351 + pinctrl-0 = <&i2c0_pins>;
355 + compatible = "ti,tmp421";
360 + #address-cells = <1>;
362 + compatible = "nxp,pca9635";
367 + /* J10: VCC, NC, RX, NC, TX, GND */
374 + phy-mode = "rgmii-id";
383 + phy-mode = "sgmii";
398 + /* USB part of the eSATA/USB 2.0 port */
405 + usb-phy = <&usb3_phy>;
411 + marvell,nand-keep-config;
412 + marvell,nand-enable-arbiter;
417 + reg = <0x0000000 0x200000>; /* 2MB */
423 + reg = <0x200000 0x40000>; /* 256KB */
428 + reg = <0x240000 0x40000>; /* 256KB */
433 + reg = <0x900000 0x100000>; /* 1MB */
437 + /* kernel1 overlaps with rootfs1 by design */
440 + reg = <0xa00000 0x2800000>; /* 40MB */
443 + partition@1000000 {
445 + reg = <0x1000000 0x2200000>; /* 34MB */
448 + /* kernel2 overlaps with rootfs2 by design */
449 + partition@3200000 {
451 + reg = <0x3200000 0x2800000>; /* 40MB */
454 + partition@3800000 {
456 + reg = <0x3800000 0x2200000>; /* 34MB */
460 + * 38MB, last MB is for the BBT, not writable
462 + partition@5a00000 {
464 + reg = <0x5a00000 0x2600000>;
468 + * Unused area between "s_env" and "devinfo".
469 + * Moved here because otherwise the renumbered
470 + * partitions would break the bootloader
471 + * supplied bootargs
474 + label = "unused_area";
475 + reg = <0x280000 0x680000>; /* 6.5MB */
484 + /* Marvell 88W8864, 5GHz-only */
489 + /* Marvell 88W8864, 2GHz-only */
495 + usb3_phy: usb3_phy {
496 + compatible = "usb-nop-xceiv";
497 + vcc-supply = <®_xhci0_vbus>;
500 + reg_xhci0_vbus: xhci0-vbus {
501 + compatible = "regulator-fixed";
502 + pinctrl-names = "default";
503 + pinctrl-0 = <&xhci0_vbus_pins>;
504 + regulator-name = "xhci0-vbus";
505 + regulator-min-microvolt = <5000000>;
506 + regulator-max-microvolt = <5000000>;
507 + enable-active-high;
508 + gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
512 + compatible = "gpio-keys";
513 + #address-cells = <1>;
515 + pinctrl-0 = <&keys_pin>;
516 + pinctrl-names = "default";
520 + linux,code = <KEY_WPS_BUTTON>;
521 + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
525 + label = "Factory Reset Button";
526 + linux,code = <KEY_RESTART>;
527 + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
532 + compatible = "gpio-leds";
533 + pinctrl-0 = <&power_led_pin &sata_led_pin>;
534 + pinctrl-names = "default";
537 + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
538 + default-state = "on";
542 + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
543 + default-state = "off";
548 + compatible = "marvell,dsa";
549 + #address-cells = <2>;
552 + dsa,ethernet = <ð2>;
553 + dsa,mii-bus = <&mdio>;
556 + #address-cells = <1>;
558 + reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
594 + keys_pin: keys-pin {
595 + marvell,pins = "mpp24", "mpp47";
596 + marvell,function = "gpio";
599 + power_led_pin: power-led-pin {
600 + marvell,pins = "mpp55";
601 + marvell,function = "gpio";
604 + sata_led_pin: sata-led-pin {
605 + marvell,pins = "mpp54";
606 + marvell,function = "gpio";
609 + xhci0_vbus_pins: xhci0-vbus-pins {
610 + marvell,pins = "mpp50";
611 + marvell,function = "gpio";