1 From 4824140f4bd1caaf900215aabe27e4bdd1677704 Mon Sep 17 00:00:00 2001
2 From: Imre Kaloz <kaloz@openwrt.org>
3 Date: Mon, 16 Feb 2015 13:31:04 +0100
4 Subject: [PATCH] ARM: mvebu: add Linksys WRT1900AC (Mamba) support
6 The Linksys WRT1900AC (Mamba) is a router that has
8 - 2 mini-PCIe slots with Marvell 88W8864 radios
10 - 1 USB 2.0/eSATAp port
11 - 2 Ethernet interfaces connected to a 88E6172 switch (1x WAN + 4x LAN)
15 gregory.clement@free-electrons.com: - add ARM to the title
16 - fix the reference to CONFIG_DEBUG_MVEBU_UART0_ALTERNATE
17 - fix the unbalanced comment for the syscfg partition
19 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
20 Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
21 Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
23 arch/arm/boot/dts/Makefile | 1 +
24 arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 348 ++++++++++++++++++++++++++
25 2 files changed, 349 insertions(+)
26 create mode 100644 arch/arm/boot/dts/armada-xp-linksys-mamba.dts
28 --- a/arch/arm/boot/dts/Makefile
29 +++ b/arch/arm/boot/dts/Makefile
30 @@ -506,6 +506,7 @@ dtb-$(CONFIG_MACH_ARMADA_XP) += \
33 armada-xp-lenovo-ix4-300d.dtb \
34 + armada-xp-linksys-mamba.dtb \
35 armada-xp-matrix.dtb \
36 armada-xp-netgear-rn2120.dtb \
37 armada-xp-openblocks-ax3-4.dtb
39 +++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
42 + * Device Tree file for the Linksys WRT1900AC (Mamba).
44 + * Note: this board is shipped with a new generation boot loader that
45 + * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
46 + * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
49 + * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
51 + * Based on armada-xp-axpwifiap.dts:
53 + * Copyright (C) 2013 Marvell
55 + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
57 + * This file is dual-licensed: you can use it either under the terms
58 + * of the GPL or the X11 license, at your option. Note that this dual
59 + * licensing only applies to this file, and not this project as a
62 + * a) This file is licensed under the terms of the GNU General Public
63 + * License version 2. This program is licensed "as is" without
64 + * any warranty of any kind, whether express or implied.
66 + * Or, alternatively,
68 + * b) Permission is hereby granted, free of charge, to any person
69 + * obtaining a copy of this software and associated documentation
70 + * files (the "Software"), to deal in the Software without
71 + * restriction, including without limitation the rights to use,
72 + * copy, modify, merge, publish, distribute, sublicense, and/or
73 + * sell copies of the Software, and to permit persons to whom the
74 + * Software is furnished to do so, subject to the following
77 + * The above copyright notice and this permission notice shall be
78 + * included in all copies or substantial portions of the Software.
80 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
81 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
82 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
83 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
84 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
85 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
86 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
87 + * OTHER DEALINGS IN THE SOFTWARE.
91 +#include <dt-bindings/gpio/gpio.h>
92 +#include <dt-bindings/input/input.h>
93 +#include "armada-xp-mv78230.dtsi"
96 + model = "Linksys WRT1900AC";
97 + compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
98 + "marvell,armadaxp", "marvell,armada-370-xp";
101 + bootargs = "console=ttyS0,115200";
102 + stdout-path = &uart0;
106 + device_type = "memory";
107 + reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
111 + ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
112 + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
117 + /* Etron EJ168 USB 3.0 controller */
119 + /* Port 0, Lane 0 */
123 + /* First mini-PCIe port */
125 + /* Port 0, Lane 1 */
129 + /* Second mini-PCIe port */
131 + /* Port 0, Lane 3 */
138 + /* J10: VCC, NC, RX, NC, TX, GND */
149 + pinctrl-0 = <&ge0_rgmii_pins>;
150 + pinctrl-names = "default";
152 + phy-mode = "rgmii-id";
160 + pinctrl-0 = <&ge1_rgmii_pins>;
161 + pinctrl-names = "default";
163 + phy-mode = "rgmii-id";
170 + /* USB part of the eSATA/USB 2.0 port */
177 + clock-frequency = <100000>;
180 + compatible = "ti,tmp421";
185 + #address-cells = <1>;
188 + compatible = "ti,tlc59116";
192 + label = "mamba:amber:wan";
197 + label = "mamba:white:wan";
202 + label = "mamba:white:wlan_2g";
207 + label = "mamba:white:wlan_5g";
212 + label = "mamba:white:esata";
217 + label = "mamba:white:usb2";
222 + label = "mamba:white:usb3_1";
227 + label = "mamba:white:usb3_2";
232 + label = "mamba:white:wps";
237 + label = "mamba:amber:wps";
246 + marvell,nand-keep-config;
247 + marvell,nand-enable-arbiter;
249 + nand-ecc-strength = <4>;
250 + nand-ecc-step-size = <512>;
254 + reg = <0x0000000 0x100000>; /* 1MB */
260 + reg = <0x100000 0x40000>; /* 256KB */
265 + reg = <0x140000 0x40000>; /* 256KB */
270 + reg = <0x900000 0x100000>; /* 1MB */
274 + /* kernel1 overlaps with rootfs1 by design */
277 + reg = <0xa00000 0x2800000>; /* 40MB */
282 + reg = <0xd00000 0x2500000>; /* 37MB */
285 + /* kernel2 overlaps with rootfs2 by design */
286 + partition@3200000 {
288 + reg = <0x3200000 0x2800000>; /* 40MB */
291 + partition@3500000 {
293 + reg = <0x3500000 0x2500000>; /* 37MB */
297 + * 38MB, last MB is for the BBT, not writable
299 + partition@5a00000 {
301 + reg = <0x5a00000 0x2600000>;
305 + * Unused area between "s_env" and "devinfo".
306 + * Moved here because otherwise the renumbered
307 + * partitions would break the bootloader
308 + * supplied bootargs
311 + label = "unused_area";
312 + reg = <0x180000 0x780000>; /* 7.5MB */
320 + #address-cells = <1>;
322 + compatible = "everspin,mr25h256";
323 + reg = <0>; /* Chip select 0 */
324 + spi-max-frequency = <40000000>;
331 + compatible = "gpio-keys";
332 + #address-cells = <1>;
334 + pinctrl-0 = <&keys_pin>;
335 + pinctrl-names = "default";
339 + linux,code = <KEY_WPS_BUTTON>;
340 + gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
344 + label = "Factory Reset Button";
345 + linux,code = <KEY_RESTART>;
346 + gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
351 + compatible = "gpio-leds";
352 + pinctrl-0 = <&power_led_pin>;
353 + pinctrl-names = "default";
356 + label = "mamba:white:power";
357 + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
358 + default-state = "on";
363 + /* SUNON HA4010V4-0000-C99 */
364 + compatible = "gpio-fan";
365 + gpios = <&gpio0 24 0>;
367 + gpio-fan,speed-map = <0 0
374 + keys_pin: keys-pin {
375 + marvell,pins = "mpp32", "mpp33";
376 + marvell,function = "gpio";
379 + power_led_pin: power-led-pin {
380 + marvell,pins = "mpp40";
381 + marvell,function = "gpio";
384 + gpio_fan_pin: gpio-fan-pin {
385 + marvell,pins = "mpp24";
386 + marvell,function = "gpio";