Merge tag 'pstore-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[sfrench/cifs-2.6.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 MiB */
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_1_phy: usb3_1-phy {
67                 compatible = "usb-nop-xceiv";
68                 vcc-supply = <&usb3_1_vbus>;
69                 #phy-cells = <0>;
70         };
71
72         usb3_1_vbus: usb3_1-vbus {
73                 compatible = "regulator-fixed";
74                 pinctrl-names = "default";
75                 pinctrl-0 = <&usb3_1_vbus_pins>;
76                 regulator-name = "usb3_1-vbus";
77                 regulator-min-microvolt = <5000000>;
78                 regulator-max-microvolt = <5000000>;
79                 enable-active-high;
80                 gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
81         };
82
83         gpio_keys: gpio-keys {
84                 compatible = "gpio-keys";
85                 pinctrl-0 = <&gpio_keys_pins>;
86                 pinctrl-names = "default";
87
88                 wps {
89                         label = "WPS";
90                         linux,code = <KEY_WPS_BUTTON>;
91                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
92                 };
93
94                 reset {
95                         label = "Factory Reset Button";
96                         linux,code = <KEY_RESTART>;
97                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
98                 };
99         };
100
101         gpio_leds: gpio-leds {
102                 compatible = "gpio-leds";
103                 pinctrl-0 = <&gpio_leds_pins>;
104                 pinctrl-names = "default";
105
106                 power {
107                         gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
108                         default-state = "on";
109                 };
110
111                 sata {
112                         gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
113                         default-state = "off";
114                         linux,default-trigger = "disk-activity";
115                 };
116         };
117 };
118
119 &ahci0 {
120         status = "okay";
121 };
122
123 &bm {
124         status = "okay";
125 };
126
127 &bm_bppi {
128         status = "okay";
129 };
130
131 &eth0 {
132         status = "okay";
133         phy-mode = "rgmii-id";
134         buffer-manager = <&bm>;
135         bm,pool-long = <0>;
136         bm,pool-short = <1>;
137         fixed-link {
138                 speed = <1000>;
139                 full-duplex;
140         };
141 };
142
143 &eth2 {
144         status = "okay";
145         phy-mode = "sgmii";
146         buffer-manager = <&bm>;
147         bm,pool-long = <2>;
148         bm,pool-short = <3>;
149         fixed-link {
150                 speed = <1000>;
151                 full-duplex;
152         };
153 };
154
155 &i2c0 {
156         pinctrl-names = "default";
157         pinctrl-0 = <&i2c0_pins>;
158         status = "okay";
159
160         tmp421@4c {
161                 compatible = "ti,tmp421";
162                 reg = <0x4c>;
163         };
164
165         expander0: pca9635@68 {
166                 #address-cells = <1>;
167                 #size-cells = <0>;
168                 compatible = "nxp,pca9635";
169                 reg = <0x68>;
170         };
171 };
172
173 &nand {
174         /* 128MiB or 256MiB */
175         status = "okay";
176         num-cs = <1>;
177         marvell,nand-keep-config;
178         marvell,nand-enable-arbiter;
179         nand-on-flash-bbt;
180 };
181
182 &mdio {
183         status = "okay";
184
185         switch@0 {
186                 compatible = "marvell,mv88e6085";
187                 #address-cells = <1>;
188                 #size-cells = <0>;
189                 reg = <0>;
190
191                 ports {
192                         #address-cells = <1>;
193                         #size-cells = <0>;
194
195                         port@0 {
196                                 reg = <0>;
197                                 label = "lan4";
198                         };
199
200                         port@1 {
201                                 reg = <1>;
202                                 label = "lan3";
203                         };
204
205                         port@2 {
206                                 reg = <2>;
207                                 label = "lan2";
208                         };
209
210                         port@3 {
211                                 reg = <3>;
212                                 label = "lan1";
213                         };
214
215                         port@4 {
216                                 reg = <4>;
217                                 label = "wan";
218                         };
219
220                         port@5 {
221                                 reg = <5>;
222                                 label = "cpu";
223                                 ethernet = <&eth2>;
224
225                                 fixed-link {
226                                         speed = <1000>;
227                                         full-duplex;
228                                 };
229                         };
230                 };
231         };
232 };
233
234 &pciec {
235         status = "okay";
236 };
237
238 &pcie1 {
239         /* Marvell 88W8864, 5GHz-only */
240         status = "okay";
241 };
242
243 &pcie2 {
244         /* Marvell 88W8864, 2GHz-only */
245         status = "okay";
246 };
247
248 &pinctrl {
249         gpio_keys_pins: gpio-keys-pins {
250                 /* mpp24: wps, mpp29: reset */
251                 marvell,pins = "mpp24", "mpp29";
252                 marvell,function = "gpio";
253         };
254
255         gpio_leds_pins: gpio-leds-pins {
256                 /* mpp54: sata, mpp55: power */
257                 marvell,pins = "mpp54", "mpp55";
258                 marvell,function = "gpio";
259         };
260
261         usb3_1_vbus_pins: usb3_1-vbus-pins {
262                 marvell,pins = "mpp50";
263                 marvell,function = "gpio";
264         };
265 };
266
267 &spi0 {
268         status = "disabled";
269 };
270
271 &uart0 {
272         /* J10: VCC, NC, RX, NC, TX, GND  */
273         status = "okay";
274 };
275
276 &usb0 {
277         /* USB part of the eSATA/USB 2.0 port */
278         status = "okay";
279 };
280
281 &usb3_1 {
282         status = "okay";
283         usb-phy = <&usb3_1_phy>;
284 };