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