Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / target / linux / mvebu / files / 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                 bootargs = "console=ttyS0,115200";
51                 stdout-path = &uart0;
52         };
53
54         memory {
55                 device_type = "memory";
56                 reg = <0x00000000 0x20000000>; /* 512 MB */
57         };
58
59         soc {
60                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
61                           MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
62
63                 internal-regs {
64
65                         spi@10600 {
66                                 status = "disabled";
67                         };
68
69                         i2c@11000 {
70                                 pinctrl-names = "default";
71                                 pinctrl-0 = <&i2c0_pins>;
72                                 status = "okay";
73
74                                 tmp421@4c {
75                                         compatible = "ti,tmp421";
76                                         reg = <0x4c>;
77                                 };
78
79                                 pca9635@68 {
80                                         #address-cells = <1>;
81                                         #size-cells = <0>;
82                                         compatible = "nxp,pca9635";
83                                         reg = <0x68>;
84                                 };
85                         };
86
87                         /* J10: VCC, NC, RX, NC, TX, GND  */
88                         serial@12000 {
89                                 status = "okay";
90                         };
91
92                         ethernet@70000 {
93                                 status = "okay";
94                                 phy-mode = "rgmii-id";
95                                 fixed-link {
96                                         speed = <1000>;
97                                         full-duplex;
98                                 };
99                         };
100
101                         ethernet@34000 {
102                                 status = "okay";
103                                 phy-mode = "sgmii";
104                                 fixed-link {
105                                         speed = <1000>;
106                                         full-duplex;
107                                 };
108                         };
109
110                         mdio {
111                                 status = "okay";
112                         };
113
114                         sata@a8000 {
115                                 status = "okay";
116                         };
117
118                         /* USB part of the eSATA/USB 2.0 port */
119                         usb@58000 {
120                                 status = "okay";
121                         };
122
123                         usb3@f8000 {
124                                 status = "okay";
125                                 usb-phy = <&usb3_phy>;
126                         };
127
128                         flash@d0000 {
129                                 status = "okay";
130                                 num-cs = <1>;
131                                 marvell,nand-keep-config;
132                                 marvell,nand-enable-arbiter;
133                                 nand-on-flash-bbt;
134
135                                 partition@0 {
136                                         label = "u-boot";
137                                         reg = <0x0000000 0x200000>;  /* 2MB */
138                                         read-only;
139                                 };
140
141                                 partition@100000 {
142                                         label = "u_env";
143                                         reg = <0x200000 0x40000>;    /* 256KB */
144                                 };
145
146                                 partition@140000 {
147                                         label = "s_env";
148                                         reg = <0x240000 0x40000>;    /* 256KB */
149                                 };
150
151                                 partition@900000 {
152                                         label = "devinfo";
153                                         reg = <0x900000 0x100000>;   /* 1MB */
154                                         read-only;
155                                 };
156
157                                 /* kernel1 overlaps with rootfs1 by design */
158                                 partition@a00000 {
159                                         label = "kernel1";
160                                         reg = <0xa00000 0x2800000>;  /* 40MB */
161                                 };
162
163                                 partition@1000000 {
164                                         label = "rootfs1";
165                                         reg = <0x1000000 0x2200000>;  /* 34MB */
166                                 };
167
168                                 /* kernel2 overlaps with rootfs2 by design */
169                                 partition@3200000 {
170                                         label = "kernel2";
171                                         reg = <0x3200000 0x2800000>; /* 40MB */
172                                 };
173
174                                 partition@3800000 {
175                                         label = "rootfs2";
176                                         reg = <0x3800000 0x2200000>; /* 34MB */
177                                 };
178
179                                 /*
180                                  * 38MB, last MB is for the BBT, not writable
181                                  */
182                                 partition@5a00000 {
183                                         label = "syscfg";
184                                         reg = <0x5a00000 0x2600000>;
185                                 };
186
187                                 /*
188                                  * Unused area between "s_env" and "devinfo".
189                                  * Moved here because otherwise the renumbered
190                                  * partitions would break the bootloader
191                                  * supplied bootargs
192                                  */
193                                 partition@180000 {
194                                         label = "unused_area";
195                                         reg = <0x280000 0x680000>;   /* 6.5MB */
196                                 };
197                         };
198
199                 };
200
201                 pcie-controller {
202                         status = "okay";
203
204                         pcie@1,0 {
205                                 /* Port 0, Lane 0 */
206                                 status = "okay";
207                         };
208
209                         pcie@2,0 {
210                                 /* Port 0, Lane 0 */
211                                 status = "okay";
212                         };
213                 };
214         };
215
216         usb3_phy: usb3_phy {
217                 compatible = "usb-nop-xceiv";
218                 vcc-supply = <&reg_xhci0_vbus>;
219         };
220
221         reg_xhci0_vbus: xhci0-vbus {
222                 compatible = "regulator-fixed";
223                 pinctrl-names = "default";
224                 pinctrl-0 = <&xhci0_vbus_pins>;
225                 regulator-name = "xhci0-vbus";
226                 regulator-min-microvolt = <5000000>;
227                 regulator-max-microvolt = <5000000>;
228                 enable-active-high;
229                 gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
230         };
231
232         gpio_keys {
233                 compatible = "gpio-keys";
234                 #address-cells = <1>;
235                 #size-cells = <0>;
236                 pinctrl-0 = <&keys_pin>;
237                 pinctrl-names = "default";
238
239                 button@1 {
240                         label = "WPS";
241                         linux,code = <KEY_WPS_BUTTON>;
242                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
243                 };
244
245                 button@2 {
246                         label = "Factory Reset Button";
247                         linux,code = <KEY_RESTART>;
248                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
249                 };
250         };
251
252         gpio-leds {
253                 compatible = "gpio-leds";
254                 pinctrl-0 = <&power_led_pin &sata_led_pin>;
255                 pinctrl-names = "default";
256
257                 power {
258                         gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
259                         default-state = "on";
260                 };
261
262                 sata {
263                         gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
264                         default-state = "off";
265                 };
266         };
267
268         mvsw61xx {
269                 #address-cells = <1>;
270                 #size-cells = <0>;
271                 compatible = "marvell,88e6176";
272                 status = "okay";
273                 reg = <0x10>;
274
275                 mii-bus = <&mdio>;
276                 cpu-port-0 = <5>;
277                 cpu-port-1 = <6>;
278         };
279 };
280
281 &pinctrl {
282         keys_pin: keys-pin {
283                 marvell,pins = "mpp24", "mpp29";
284                 marvell,function = "gpio";
285         };
286
287         power_led_pin: power-led-pin {
288                 marvell,pins = "mpp55";
289                 marvell,function = "gpio";
290         };
291
292         sata_led_pin: sata-led-pin {
293                 marvell,pins = "mpp54";
294                 marvell,function = "gpio";
295         };
296
297         xhci0_vbus_pins: xhci0-vbus-pins {
298                 marvell,pins = "mpp50";
299                 marvell,function = "gpio";
300         };
301 };