]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/arm/boot/dts/armada-385-linksys.dtsi
481e4a36e26beb42ef3931cbb9753332edb0ad87
[mirror_ubuntu-artful-kernel.git] / 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 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
62 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
63 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
64 };
65
66 usb3_phy: usb3_phy {
67 compatible = "usb-nop-xceiv";
68 vcc-supply = <&reg_xhci0_vbus>;
69 };
70
71 reg_xhci0_vbus: xhci0-vbus {
72 compatible = "regulator-fixed";
73 pinctrl-names = "default";
74 pinctrl-0 = <&xhci0_vbus_pins>;
75 regulator-name = "xhci0-vbus";
76 regulator-min-microvolt = <5000000>;
77 regulator-max-microvolt = <5000000>;
78 enable-active-high;
79 gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
80 };
81
82 gpio_keys {
83 compatible = "gpio-keys";
84 #address-cells = <1>;
85 #size-cells = <0>;
86 pinctrl-0 = <&keys_pin>;
87 pinctrl-names = "default";
88
89 button@1 {
90 label = "WPS";
91 linux,code = <KEY_WPS_BUTTON>;
92 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
93 };
94
95 button@2 {
96 label = "Factory Reset Button";
97 linux,code = <KEY_RESTART>;
98 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
99 };
100 };
101
102 gpio-leds {
103 compatible = "gpio-leds";
104 pinctrl-0 = <&power_led_pin &sata_led_pin>;
105 pinctrl-names = "default";
106
107 power {
108 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
109 default-state = "on";
110 };
111
112 sata {
113 gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
114 default-state = "off";
115 linux,default-trigger = "disk-activity";
116 };
117 };
118
119 dsa@0 {
120 status = "disabled";
121
122 compatible = "marvell,dsa";
123 #address-cells = <2>;
124 #size-cells = <0>;
125
126 dsa,ethernet = <&eth2>;
127 dsa,mii-bus = <&mdio>;
128
129 switch@0 {
130 #address-cells = <1>;
131 #size-cells = <0>;
132 reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
133
134 port@0 {
135 reg = <0>;
136 label = "lan4";
137 };
138
139 port@1 {
140 reg = <1>;
141 label = "lan3";
142 };
143
144 port@2 {
145 reg = <2>;
146 label = "lan2";
147 };
148
149 port@3 {
150 reg = <3>;
151 label = "lan1";
152 };
153
154 port@4 {
155 reg = <4>;
156 label = "wan";
157 };
158
159 port@5 {
160 reg = <5>;
161 label = "cpu";
162 };
163 };
164 };
165 };
166
167 &ahci0 {
168 status = "okay";
169 };
170
171 &bm {
172 status = "okay";
173 };
174
175 &bm_bppi {
176 status = "okay";
177 };
178
179 &eth0 {
180 status = "okay";
181 phy-mode = "rgmii-id";
182 buffer-manager = <&bm>;
183 bm,pool-long = <2>;
184 bm,pool-short = <3>;
185 fixed-link {
186 speed = <1000>;
187 full-duplex;
188 };
189 };
190
191 &eth2 {
192 status = "okay";
193 phy-mode = "sgmii";
194 buffer-manager = <&bm>;
195 bm,pool-long = <0>;
196 bm,pool-short = <1>;
197 fixed-link {
198 speed = <1000>;
199 full-duplex;
200 };
201 };
202
203 &i2c0 {
204 pinctrl-names = "default";
205 pinctrl-0 = <&i2c0_pins>;
206 status = "okay";
207
208 tmp421@4c {
209 compatible = "ti,tmp421";
210 reg = <0x4c>;
211 };
212
213 pca9635@68 {
214 #address-cells = <1>;
215 #size-cells = <0>;
216 compatible = "nxp,pca9635";
217 reg = <0x68>;
218 };
219 };
220
221 &nand {
222 status = "okay";
223 num-cs = <1>;
224 marvell,nand-keep-config;
225 marvell,nand-enable-arbiter;
226 nand-on-flash-bbt;
227
228 partition@0 {
229 label = "u-boot";
230 reg = <0x0000000 0x200000>; /* 2MB */
231 read-only;
232 };
233
234 partition@100000 {
235 label = "u_env";
236 reg = <0x200000 0x40000>; /* 256KB */
237 };
238
239 partition@140000 {
240 label = "s_env";
241 reg = <0x240000 0x40000>; /* 256KB */
242 };
243
244 partition@900000 {
245 label = "devinfo";
246 reg = <0x900000 0x100000>; /* 1MB */
247 read-only;
248 };
249
250 /* kernel1 overlaps with rootfs1 by design */
251 partition@a00000 {
252 label = "kernel1";
253 reg = <0xa00000 0x2800000>; /* 40MB */
254 };
255
256 partition@1000000 {
257 label = "rootfs1";
258 reg = <0x1000000 0x2200000>; /* 34MB */
259 };
260
261 /* kernel2 overlaps with rootfs2 by design */
262 partition@3200000 {
263 label = "kernel2";
264 reg = <0x3200000 0x2800000>; /* 40MB */
265 };
266
267 partition@3800000 {
268 label = "rootfs2";
269 reg = <0x3800000 0x2200000>; /* 34MB */
270 };
271
272 /*
273 * 38MB, last MB is for the BBT, not writable
274 */
275 partition@5a00000 {
276 label = "syscfg";
277 reg = <0x5a00000 0x2600000>;
278 };
279
280 /*
281 * Unused area between "s_env" and "devinfo".
282 * Moved here because otherwise the renumbered
283 * partitions would break the bootloader
284 * supplied bootargs
285 */
286 partition@180000 {
287 label = "unused_area";
288 reg = <0x280000 0x680000>; /* 6.5MB */
289 };
290 };
291
292 &mdio {
293 status = "okay";
294
295 switch@0 {
296 compatible = "marvell,mv88e6085";
297 #address-cells = <1>;
298 #size-cells = <0>;
299 reg = <0>;
300
301 ports {
302 #address-cells = <1>;
303 #size-cells = <0>;
304
305 port@0 {
306 reg = <0>;
307 label = "lan4";
308 };
309
310 port@1 {
311 reg = <1>;
312 label = "lan3";
313 };
314
315 port@2 {
316 reg = <2>;
317 label = "lan2";
318 };
319
320 port@3 {
321 reg = <3>;
322 label = "lan1";
323 };
324
325 port@4 {
326 reg = <4>;
327 label = "wan";
328 };
329
330 port@5 {
331 reg = <5>;
332 label = "cpu";
333 ethernet = <&eth2>;
334
335 fixed-link {
336 speed = <1000>;
337 full-duplex;
338 };
339 };
340 };
341 };
342 };
343
344 &pciec {
345 status = "okay";
346 };
347
348 &pcie1 {
349 /* Marvell 88W8864, 5GHz-only */
350 status = "okay";
351 };
352
353 &pcie2 {
354 /* Marvell 88W8864, 2GHz-only */
355 status = "okay";
356 };
357
358 &pinctrl {
359 keys_pin: keys-pin {
360 marvell,pins = "mpp24", "mpp29";
361 marvell,function = "gpio";
362 };
363
364 power_led_pin: power-led-pin {
365 marvell,pins = "mpp55";
366 marvell,function = "gpio";
367 };
368
369 sata_led_pin: sata-led-pin {
370 marvell,pins = "mpp54";
371 marvell,function = "gpio";
372 };
373
374 xhci0_vbus_pins: xhci0-vbus-pins {
375 marvell,pins = "mpp50";
376 marvell,function = "gpio";
377 };
378 };
379
380 &spi0 {
381 status = "disabled";
382 };
383
384 &uart0 {
385 /* J10: VCC, NC, RX, NC, TX, GND */
386 status = "okay";
387 };
388
389 &usb0 {
390 /* USB part of the eSATA/USB 2.0 port */
391 status = "okay";
392 };
393
394 &usb3_1 {
395 status = "okay";
396 usb-phy = <&usb3_phy>;
397 };