mvebu: update mamba dts
[openwrt/svn-archive/archive.git] / target / linux / mvebu / files / arch / arm / boot / dts / armada-xp-mamba.dts
1 /*
2 * Device Tree file for the Linksys WRT1900AC (Mamba).
3 *
4 * Note: this board is shipped with a new generation boot loader that
5 * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
6 * is used, the CONFIG_DEBUG_MVEBU_UART_ALTERNATE option should be
7 * used.
8 *
9 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
10 *
11 * Based on armada-xp-axpwifiap.dts:
12 *
13 * Copyright (C) 2013 Marvell
14 *
15 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 *
17 * This file is dual-licensed: you can use it either under the terms
18 * of the GPL or the X11 license, at your option. Note that this dual
19 * licensing only applies to this file, and not this project as a
20 * whole.
21 *
22 * a) This file is licensed under the terms of the GNU General Public
23 * License version 2. This program is licensed "as is" without
24 * any warranty of any kind, whether express or implied.
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
48 */
49
50 /dts-v1/;
51 #include <dt-bindings/gpio/gpio.h>
52 #include <dt-bindings/input/input.h>
53 #include "armada-xp-mv78230.dtsi"
54
55 / {
56 model = "Linksys WRT1900AC (Mamba)";
57 compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
58 "marvell,armadaxp", "marvell,armada-370-xp";
59
60 chosen {
61 bootargs = "console=ttyS0,115200";
62 stdout-path = &uart0;
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
68 };
69
70 soc {
71 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
72 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
73
74 pcie-controller {
75 status = "okay";
76
77 /* Etron EJ168 USB 3.0 controller */
78 pcie@1,0 {
79 /* Port 0, Lane 0 */
80 status = "okay";
81 };
82
83 /* First mini-PCIe port */
84 pcie@2,0 {
85 /* Port 0, Lane 1 */
86 status = "okay";
87 };
88
89 /* Second mini-PCIe port */
90 pcie@3,0 {
91 /* Port 0, Lane 3 */
92 status = "okay";
93 };
94 };
95
96 internal-regs {
97 serial@12000 {
98 status = "okay";
99 };
100
101 sata@a0000 {
102 nr-ports = <1>;
103 status = "okay";
104 };
105
106 ethernet@70000 {
107 pinctrl-0 = <&ge0_rgmii_pins>;
108 pinctrl-names = "default";
109 status = "okay";
110 phy-mode = "rgmii-id";
111 fixed-link {
112 speed = <1000>;
113 full-duplex;
114 };
115 };
116
117 ethernet@74000 {
118 pinctrl-0 = <&ge1_rgmii_pins>;
119 pinctrl-names = "default";
120 status = "okay";
121 phy-mode = "rgmii-id";
122 fixed-link {
123 speed = <1000>;
124 full-duplex;
125 };
126 };
127
128 /* USB part of the eSATA/USB 2.0 port */
129 usb@50000 {
130 status = "okay";
131 };
132
133 i2c@11000 {
134 status = "okay";
135 clock-frequency = <100000>;
136
137 tmp421@4c {
138 compatible = "ti,tmp421";
139 reg = <0x4c>;
140 };
141
142 tlc59116@68 {
143 #address-cells = <1>;
144 #size-cells = <0>;
145 #gpio-cells = <2>;
146 compatible = "ti,tlc59116";
147 reg = <0x68>;
148
149 wan_amber@0 {
150 label = "mamba:amber:wan";
151 reg = <0x0>;
152 };
153
154 wan_white@1 {
155 label = "mamba:white:wan";
156 reg = <0x1>;
157 };
158
159 wlan_2g@2 {
160 label = "mamba:white:wlan_2g";
161 reg = <0x2>;
162 };
163
164 wlan_5g@3 {
165 label = "mamba:white:wlan_5g";
166 reg = <0x3>;
167 };
168
169 esata@4 {
170 label = "mamba:white:esata";
171 reg = <0x4>;
172 };
173
174 usb2@5 {
175 label = "mamba:white:usb2";
176 reg = <0x5>;
177 };
178
179 usb3_1@6 {
180 label = "mamba:white:usb3_1";
181 reg = <0x6>;
182 };
183
184 usb3_2@7 {
185 label = "mamba:white:usb3_2";
186 reg = <0x7>;
187 };
188
189 wps_white@8 {
190 label = "mamba:white:wps";
191 reg = <0x8>;
192 };
193
194 wps_amber@9 {
195 label = "mamba:amber:wps";
196 reg = <0x9>;
197 };
198 };
199 };
200
201 nand@d0000 {
202 status = "okay";
203 num-cs = <1>;
204 marvell,nand-keep-config;
205 marvell,nand-enable-arbiter;
206 nand-on-flash-bbt;
207 nand-ecc-strength = <4>;
208 nand-ecc-step-size = <512>;
209
210 partition@0 {
211 label = "u-boot";
212 reg = <0x0000000 0x100000>; /* 1MB */
213 read-only;
214 };
215
216 partition@100000 {
217 label = "u_env";
218 reg = <0x100000 0x40000>; /* 256KB */
219 };
220
221 partition@140000 {
222 label = "s_env";
223 reg = <0x140000 0x40000>; /* 256KB */
224 };
225
226 partition@900000 {
227 label = "devinfo";
228 reg = <0x900000 0x100000>; /* 1MB */
229 read-only;
230 };
231
232 partition@a00000 {
233 label = "kernel1";
234 reg = <0xa00000 0x2800000>; /* 3MB + rootfs1 */
235 };
236
237 partition@d00000 {
238 label = "rootfs1";
239 reg = <0xd00000 0x2500000>; /* 37MB */
240 };
241
242 partition@3200000 {
243 label = "kernel2";
244 reg = <0x3200000 0x2800000>; /* 3MB + rootfs2 */
245 };
246
247 partition@3500000 {
248 label = "rootfs2";
249 reg = <0x3500000 0x2500000>; /* 37MB */
250 };
251
252 /* Last MB is for the BBT, i.e. not writable */
253 partition@5a00000 {
254 label = "syscfg";
255 reg = <0x5a00000 0x2600000>; /* 38MB */
256 };
257 };
258
259 spi0: spi@10600 {
260 status = "okay";
261
262 spi-flash@0 {
263 #address-cells = <1>;
264 #size-cells = <1>;
265 compatible = "everspin,mr25h256";
266 reg = <0>; /* Chip select 0 */
267 spi-max-frequency = <40000000>;
268 };
269 };
270 };
271 };
272
273 gpio_keys {
274 compatible = "gpio-keys";
275 #address-cells = <1>;
276 #size-cells = <0>;
277 pinctrl-0 = <&keys_pin>;
278 pinctrl-names = "default";
279
280 button@1 {
281 label = "WPS";
282 linux,code = <KEY_WPS_BUTTON>;
283 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
284 };
285
286 button@2 {
287 label = "Factory Reset Button";
288 linux,code = <KEY_RESTART>;
289 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
290 };
291 };
292
293 gpio-leds {
294 compatible = "gpio-leds";
295 pinctrl-0 = <&power_led_pin>;
296 pinctrl-names = "default";
297
298 power {
299 label = "mamba:white:power";
300 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
301 default-state = "on";
302 };
303 };
304
305 gpio_fan {
306 /* SUNON HA4010V4-0000-C99 */
307 compatible = "gpio-fan";
308 gpios = <&gpio0 24 0>;
309
310 gpio-fan,speed-map = <0 0
311 4500 1>;
312 };
313
314 mvsw61xx {
315 compatible = "marvell,88e6172";
316 status = "okay";
317 reg = <0x10>;
318
319 mii-bus = <&mdio>;
320 cpu-port-0 = <5>;
321 cpu-port-1 = <6>;
322 };
323 };
324
325 &pinctrl {
326
327 keys_pin: keys-pin {
328 marvell,pins = "mpp32", "mpp33";
329 marvell,function = "gpio";
330 };
331
332 power_led_pin: power-led-pin {
333 marvell,pins = "mpp40";
334 marvell,function = "gpio";
335 };
336
337 gpio_fan_pin: gpio-fan-pin {
338 marvell,pins = "mpp24";
339 marvell,function = "gpio";
340 };
341 };