Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: mvebu: add support for the new Armada 385 based Linksys boards

This patch adds support for the Linksys WRT1200AC (Caiman) and
the Linksys WRT1900AC v2 (Cobra).

Both boards have:

- 2 Marvell 88W8864 radios
- 1 USB 3.0 port
- 1 USB 2.0/eSATAp port
- 2 Ethernet interfaces connected to a 88E6176 switch (1x WAN + 4x LAN)
- 128MB NAND flash
- 512MB RAM

gregory.clement@free-electrons.com: use serial0:115200n8 in
stdout-path and remove the bootargs part in the chosen node

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Imre Kaloz and committed by
Gregory CLEMENT
3abdd583 973ed083

+562
+2
arch/arm/boot/dts/Makefile
··· 633 633 armada-375-db.dtb 634 634 dtb-$(CONFIG_MACH_ARMADA_38X) += \ 635 635 armada-385-db-ap.dtb \ 636 + armada-385-linksys-caiman.dtb \ 637 + armada-385-linksys-cobra.dtb \ 636 638 armada-388-db.dtb \ 637 639 armada-388-gp.dtb \ 638 640 armada-388-rd.dtb
+114
arch/arm/boot/dts/armada-385-linksys-caiman.dts
··· 1 + /* 2 + * Device Tree include for the Linksys WRT1200AC (Caiman) 3 + * 4 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org> 5 + * 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is licensed under the terms of the GNU General Public 13 + * License version 2. This program is licensed "as is" without 14 + * any warranty of any kind, whether express or implied. 15 + * 16 + * Or, alternatively, 17 + * 18 + * b) Permission is hereby granted, free of charge, to any person 19 + * obtaining a copy of this software and associated documentation 20 + * files (the "Software"), to deal in the Software without 21 + * restriction, including without limitation the rights to use, 22 + * copy, modify, merge, publish, distribute, sublicense, and/or 23 + * sell copies of the Software, and to permit persons to whom the 24 + * Software is furnished to do so, subject to the following 25 + * conditions: 26 + * 27 + * The above copyright notice and this permission notice shall be 28 + * included in all copies or substantial portions of the Software. 29 + * 30 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 31 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 32 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 33 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 34 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 35 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 36 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 37 + * OTHER DEALINGS IN THE SOFTWARE. 38 + */ 39 + 40 + /dts-v1/; 41 + #include "armada-385-linksys.dtsi" 42 + 43 + / { 44 + model = "Linksys WRT1200AC"; 45 + compatible = "linksys,caiman", "linksys,armada385", "marvell,armada385", 46 + "marvell,armada380"; 47 + 48 + soc { 49 + internal-regs{ 50 + i2c@11000 { 51 + 52 + pca9635@68 { 53 + #address-cells = <1>; 54 + #size-cells = <0>; 55 + 56 + wan_amber@0 { 57 + label = "caiman:amber:wan"; 58 + reg = <0x0>; 59 + }; 60 + 61 + wan_white@1 { 62 + label = "caiman:white:wan"; 63 + reg = <0x1>; 64 + }; 65 + 66 + wlan_2g@2 { 67 + label = "caiman:white:wlan_2g"; 68 + reg = <0x2>; 69 + }; 70 + 71 + wlan_5g@3 { 72 + label = "caiman:white:wlan_5g"; 73 + reg = <0x3>; 74 + }; 75 + 76 + usb2@5 { 77 + label = "caiman:white:usb2"; 78 + reg = <0x5>; 79 + }; 80 + 81 + usb3_1@6 { 82 + label = "caiman:white:usb3_1"; 83 + reg = <0x6>; 84 + }; 85 + 86 + usb3_2@7 { 87 + label = "caiman:white:usb3_2"; 88 + reg = <0x7>; 89 + }; 90 + 91 + wps_white@8 { 92 + label = "caiman:white:wps"; 93 + reg = <0x8>; 94 + }; 95 + 96 + wps_amber@9 { 97 + label = "caiman:amber:wps"; 98 + reg = <0x9>; 99 + }; 100 + }; 101 + }; 102 + }; 103 + }; 104 + 105 + gpio-leds { 106 + power { 107 + label = "caiman:white:power"; 108 + }; 109 + 110 + sata { 111 + label = "caiman:white:sata"; 112 + }; 113 + }; 114 + };
+114
arch/arm/boot/dts/armada-385-linksys-cobra.dts
··· 1 + /* 2 + * Device Tree file for the Linksys WRT1900ACv2 (Cobra) 3 + * 4 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org> 5 + * 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is licensed under the terms of the GNU General Public 13 + * License version 2. This program is licensed "as is" without 14 + * any warranty of any kind, whether express or implied. 15 + * 16 + * Or, alternatively, 17 + * 18 + * b) Permission is hereby granted, free of charge, to any person 19 + * obtaining a copy of this software and associated documentation 20 + * files (the "Software"), to deal in the Software without 21 + * restriction, including without limitation the rights to use, 22 + * copy, modify, merge, publish, distribute, sublicense, and/or 23 + * sell copies of the Software, and to permit persons to whom the 24 + * Software is furnished to do so, subject to the following 25 + * conditions: 26 + * 27 + * The above copyright notice and this permission notice shall be 28 + * included in all copies or substantial portions of the Software. 29 + * 30 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 31 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 32 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 33 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 34 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 35 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 36 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 37 + * OTHER DEALINGS IN THE SOFTWARE. 38 + */ 39 + 40 + /dts-v1/; 41 + #include "armada-385-linksys.dtsi" 42 + 43 + / { 44 + model = "Linksys WRT1900ACv2"; 45 + compatible = "linksys,cobra", "linksys,armada385", "marvell,armada385", 46 + "marvell,armada380"; 47 + 48 + soc { 49 + internal-regs{ 50 + i2c@11000 { 51 + 52 + pca9635@68 { 53 + #address-cells = <1>; 54 + #size-cells = <0>; 55 + 56 + wan_amber@0 { 57 + label = "cobra:amber:wan"; 58 + reg = <0x0>; 59 + }; 60 + 61 + wan_white@1 { 62 + label = "cobra:white:wan"; 63 + reg = <0x1>; 64 + }; 65 + 66 + wlan_2g@2 { 67 + label = "cobra:white:wlan_2g"; 68 + reg = <0x2>; 69 + }; 70 + 71 + wlan_5g@3 { 72 + label = "cobra:white:wlan_5g"; 73 + reg = <0x3>; 74 + }; 75 + 76 + usb2@5 { 77 + label = "cobra:white:usb2"; 78 + reg = <0x5>; 79 + }; 80 + 81 + usb3_1@6 { 82 + label = "cobra:white:usb3_1"; 83 + reg = <0x6>; 84 + }; 85 + 86 + usb3_2@7 { 87 + label = "cobra:white:usb3_2"; 88 + reg = <0x7>; 89 + }; 90 + 91 + wps_white@8 { 92 + label = "cobra:white:wps"; 93 + reg = <0x8>; 94 + }; 95 + 96 + wps_amber@9 { 97 + label = "cobra:amber:wps"; 98 + reg = <0x9>; 99 + }; 100 + }; 101 + }; 102 + }; 103 + }; 104 + 105 + gpio-leds { 106 + power { 107 + label = "cobra:white:power"; 108 + }; 109 + 110 + sata { 111 + label = "cobra:white:sata"; 112 + }; 113 + }; 114 + };
+332
arch/arm/boot/dts/armada-385-linksys.dtsi
··· 1 + /* 2 + * Device Tree include file for Armada 385 based Linksys boards 3 + * 4 + * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org> 5 + * 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is licensed under the terms of the GNU General Public 13 + * License version 2. This program is licensed "as is" without 14 + * any warranty of any kind, whether express or implied. 15 + * 16 + * Or, alternatively, 17 + * 18 + * b) Permission is hereby granted, free of charge, to any person 19 + * obtaining a copy of this software and associated documentation 20 + * files (the "Software"), to deal in the Software without 21 + * restriction, including without limitation the rights to use, 22 + * copy, modify, merge, publish, distribute, sublicense, and/or 23 + * sell copies of the Software, and to permit persons to whom the 24 + * Software is furnished to do so, subject to the following 25 + * conditions: 26 + * 27 + * The above copyright notice and this permission notice shall be 28 + * included in all copies or substantial portions of the Software. 29 + * 30 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 31 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 32 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 33 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 34 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 35 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 36 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 37 + * OTHER DEALINGS IN THE SOFTWARE. 38 + */ 39 + 40 + #include <dt-bindings/gpio/gpio.h> 41 + #include <dt-bindings/input/input.h> 42 + #include "armada-385.dtsi" 43 + 44 + / { 45 + model = "Linksys boards based on Armada 385"; 46 + compatible = "linksys,armada385", "marvell,armada385", 47 + "marvell,armada380"; 48 + 49 + chosen { 50 + stdout-path = "serial0:115200n8"; 51 + }; 52 + 53 + memory { 54 + device_type = "memory"; 55 + reg = <0x00000000 0x20000000>; /* 512 MB */ 56 + }; 57 + 58 + soc { 59 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 60 + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; 61 + 62 + internal-regs { 63 + 64 + spi@10600 { 65 + status = "disabled"; 66 + }; 67 + 68 + i2c@11000 { 69 + pinctrl-names = "default"; 70 + pinctrl-0 = <&i2c0_pins>; 71 + status = "okay"; 72 + 73 + tmp421@4c { 74 + compatible = "ti,tmp421"; 75 + reg = <0x4c>; 76 + }; 77 + 78 + pca9635@68 { 79 + #address-cells = <1>; 80 + #size-cells = <0>; 81 + compatible = "nxp,pca9635"; 82 + reg = <0x68>; 83 + }; 84 + }; 85 + 86 + /* J10: VCC, NC, RX, NC, TX, GND */ 87 + serial@12000 { 88 + status = "okay"; 89 + }; 90 + 91 + ethernet@70000 { 92 + status = "okay"; 93 + phy-mode = "rgmii-id"; 94 + fixed-link { 95 + speed = <1000>; 96 + full-duplex; 97 + }; 98 + }; 99 + 100 + ethernet@34000 { 101 + status = "okay"; 102 + phy-mode = "sgmii"; 103 + fixed-link { 104 + speed = <1000>; 105 + full-duplex; 106 + }; 107 + }; 108 + 109 + mdio { 110 + status = "okay"; 111 + }; 112 + 113 + sata@a8000 { 114 + status = "okay"; 115 + }; 116 + 117 + /* USB part of the eSATA/USB 2.0 port */ 118 + usb@50000 { 119 + status = "okay"; 120 + }; 121 + 122 + usb3@f8000 { 123 + status = "okay"; 124 + usb-phy = <&usb3_phy>; 125 + }; 126 + 127 + flash@d0000 { 128 + status = "okay"; 129 + num-cs = <1>; 130 + marvell,nand-keep-config; 131 + marvell,nand-enable-arbiter; 132 + nand-on-flash-bbt; 133 + 134 + partition@0 { 135 + label = "u-boot"; 136 + reg = <0x0000000 0x200000>; /* 2MB */ 137 + read-only; 138 + }; 139 + 140 + partition@100000 { 141 + label = "u_env"; 142 + reg = <0x200000 0x40000>; /* 256KB */ 143 + }; 144 + 145 + partition@140000 { 146 + label = "s_env"; 147 + reg = <0x240000 0x40000>; /* 256KB */ 148 + }; 149 + 150 + partition@900000 { 151 + label = "devinfo"; 152 + reg = <0x900000 0x100000>; /* 1MB */ 153 + read-only; 154 + }; 155 + 156 + /* kernel1 overlaps with rootfs1 by design */ 157 + partition@a00000 { 158 + label = "kernel1"; 159 + reg = <0xa00000 0x2800000>; /* 40MB */ 160 + }; 161 + 162 + partition@1000000 { 163 + label = "rootfs1"; 164 + reg = <0x1000000 0x2200000>; /* 34MB */ 165 + }; 166 + 167 + /* kernel2 overlaps with rootfs2 by design */ 168 + partition@3200000 { 169 + label = "kernel2"; 170 + reg = <0x3200000 0x2800000>; /* 40MB */ 171 + }; 172 + 173 + partition@3800000 { 174 + label = "rootfs2"; 175 + reg = <0x3800000 0x2200000>; /* 34MB */ 176 + }; 177 + 178 + /* 179 + * 38MB, last MB is for the BBT, not writable 180 + */ 181 + partition@5a00000 { 182 + label = "syscfg"; 183 + reg = <0x5a00000 0x2600000>; 184 + }; 185 + 186 + /* 187 + * Unused area between "s_env" and "devinfo". 188 + * Moved here because otherwise the renumbered 189 + * partitions would break the bootloader 190 + * supplied bootargs 191 + */ 192 + partition@180000 { 193 + label = "unused_area"; 194 + reg = <0x280000 0x680000>; /* 6.5MB */ 195 + }; 196 + }; 197 + }; 198 + 199 + pcie-controller { 200 + status = "okay"; 201 + 202 + pcie@1,0 { 203 + /* Marvell 88W8864, 5GHz-only */ 204 + status = "okay"; 205 + }; 206 + 207 + pcie@2,0 { 208 + /* Marvell 88W8864, 2GHz-only */ 209 + status = "okay"; 210 + }; 211 + }; 212 + }; 213 + 214 + usb3_phy: usb3_phy { 215 + compatible = "usb-nop-xceiv"; 216 + vcc-supply = <&reg_xhci0_vbus>; 217 + }; 218 + 219 + reg_xhci0_vbus: xhci0-vbus { 220 + compatible = "regulator-fixed"; 221 + pinctrl-names = "default"; 222 + pinctrl-0 = <&xhci0_vbus_pins>; 223 + regulator-name = "xhci0-vbus"; 224 + regulator-min-microvolt = <5000000>; 225 + regulator-max-microvolt = <5000000>; 226 + enable-active-high; 227 + gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; 228 + }; 229 + 230 + gpio_keys { 231 + compatible = "gpio-keys"; 232 + #address-cells = <1>; 233 + #size-cells = <0>; 234 + pinctrl-0 = <&keys_pin>; 235 + pinctrl-names = "default"; 236 + 237 + button@1 { 238 + label = "WPS"; 239 + linux,code = <KEY_WPS_BUTTON>; 240 + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; 241 + }; 242 + 243 + button@2 { 244 + label = "Factory Reset Button"; 245 + linux,code = <KEY_RESTART>; 246 + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 247 + }; 248 + }; 249 + 250 + gpio-leds { 251 + compatible = "gpio-leds"; 252 + pinctrl-0 = <&power_led_pin &sata_led_pin>; 253 + pinctrl-names = "default"; 254 + 255 + power { 256 + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; 257 + default-state = "on"; 258 + }; 259 + 260 + sata { 261 + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; 262 + default-state = "off"; 263 + }; 264 + }; 265 + 266 + dsa@0 { 267 + compatible = "marvell,dsa"; 268 + #address-cells = <2>; 269 + #size-cells = <0>; 270 + 271 + dsa,ethernet = <&eth2>; 272 + dsa,mii-bus = <&mdio>; 273 + 274 + switch@0 { 275 + #address-cells = <1>; 276 + #size-cells = <0>; 277 + reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */ 278 + 279 + port@0 { 280 + reg = <0>; 281 + label = "lan4"; 282 + }; 283 + 284 + port@1 { 285 + reg = <1>; 286 + label = "lan3"; 287 + }; 288 + 289 + port@2 { 290 + reg = <2>; 291 + label = "lan2"; 292 + }; 293 + 294 + port@3 { 295 + reg = <3>; 296 + label = "lan1"; 297 + }; 298 + 299 + port@4 { 300 + reg = <4>; 301 + label = "wan"; 302 + }; 303 + 304 + port@5 { 305 + reg = <5>; 306 + label = "cpu"; 307 + }; 308 + }; 309 + }; 310 + }; 311 + 312 + &pinctrl { 313 + keys_pin: keys-pin { 314 + marvell,pins = "mpp24", "mpp47"; 315 + marvell,function = "gpio"; 316 + }; 317 + 318 + power_led_pin: power-led-pin { 319 + marvell,pins = "mpp55"; 320 + marvell,function = "gpio"; 321 + }; 322 + 323 + sata_led_pin: sata-led-pin { 324 + marvell,pins = "mpp54"; 325 + marvell,function = "gpio"; 326 + }; 327 + 328 + xhci0_vbus_pins: xhci0-vbus-pins { 329 + marvell,pins = "mpp50"; 330 + marvell,function = "gpio"; 331 + }; 332 + };