mvebu: add the new tlc59116 driver and migrate the Mamba to it
[librecmc/librecmc.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 licensed under the terms of the GNU General Public
18  * License version 2.  This program is licensed "as is" without any
19  * warranty of any kind, whether express or implied.
20  */
21
22 /dts-v1/;
23 #include <dt-bindings/gpio/gpio.h>
24 #include <dt-bindings/input/input.h>
25 #include "armada-xp-mv78230.dtsi"
26
27 / {
28         model = "Linksys WRT1900AC (Mamba)";
29         compatible = "linksys,mamba", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
30
31         chosen {
32                 bootargs = "console=ttyS0,115200 earlyprintk";
33         };
34
35         memory {
36                 device_type = "memory";
37                 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
38         };
39
40         soc {
41                 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
42                           MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
43
44                 pcie-controller {
45                         status = "okay";
46
47                         /* Etron EJ168 USB 3.0 controller */
48                         pcie@1,0 {
49                                 /* Port 0, Lane 0 */
50                                 status = "okay";
51                         };
52
53                         /* First mini-PCIe port */
54                         pcie@2,0 {
55                                 /* Port 0, Lane 1 */
56                                 status = "okay";
57                         };
58
59                         /* Second mini-PCIe port */
60                         pcie@3,0 {
61                                 /* Port 0, Lane 3 */
62                                 status = "okay";
63                         };
64                 };
65
66                 internal-regs {
67                         pinctrl {
68                                 pmx_ge0: pmx-ge0 {
69                                         marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
70                                                        "mpp4", "mpp5", "mpp6", "mpp7",
71                                                        "mpp8", "mpp9", "mpp10", "mpp11";
72                                         marvell,function = "ge0";
73                                 };
74
75                                 pmx_ge1: pmx-ge1 {
76                                         marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15",
77                                                        "mpp16", "mpp17", "mpp18", "mpp19",
78                                                        "mpp20", "mpp21", "mpp22", "mpp23";
79                                         marvell,function = "ge1";
80                                 };
81
82                                 pmx_keys: pmx-keys {
83                                         marvell,pins = "mpp32", "mpp33";
84                                         marvell,function = "gpio";
85                                 };
86
87                                 pmx_spi: pmx-spi {
88                                         marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39";
89                                         marvell,function = "spi";
90                                 };
91
92                                 power_led_pin: power-led-pin {
93                                         marvell,pins = "mpp40";
94                                         marvell,function = "gpio";
95                                 };
96
97                                 gpio_fan_pin: gpio-fan-pin {
98                                         marvell,pins = "mpp24";
99                                         marvell,function = "gpio";
100                                 };
101
102                         };
103
104                         serial@12000 {
105                                 clock-frequency = <250000000>;
106                                 status = "okay";
107                         };
108
109                         serial@12100 {
110                                 clock-frequency = <250000000>;
111                                 status = "okay";
112                         };
113
114                         sata@a0000 {
115                                 nr-ports = <1>;
116                                 status = "okay";
117                         };
118
119                         ethernet@70000 {
120                                 pinctrl-0 = <&pmx_ge0>;
121                                 pinctrl-names = "default";
122                                 status = "okay";
123                                 phy-mode = "rgmii-id";
124                                 fixed-link {
125                                         speed = <1000>;
126                                         full-duplex;
127                                 };
128                         };
129
130                         ethernet@74000 {
131                                 pinctrl-0 = <&pmx_ge1>;
132                                 pinctrl-names = "default";
133                                 status = "okay";
134                                 phy-mode = "rgmii-id";
135                                 fixed-link {
136                                         speed = <1000>;
137                                         full-duplex;
138                                 };
139                         };
140
141                         /* USB part of the eSATA/USB 2.0 port */
142                         usb@50000 {
143                                 status = "okay";
144                         };
145
146                         i2c@11000 {
147                                 status = "okay";
148                                 clock-frequency = <100000>;
149
150                                 tmp421@4c {
151                                         compatible = "ti,tmp421";
152                                         reg = <0x4c>;
153                                 };
154
155                                 tlc59116@68 {
156                                         #address-cells = <1>;
157                                         #size-cells = <0>;
158                                         #gpio-cells = <2>;
159                                         compatible = "ti,tlc59116";
160                                         reg = <0x68>;
161
162                                         wan_amber@0 {
163                                                 label = "mamba:amber:wan";
164                                                         reg = <0x0>;
165                                         };
166
167                                         wan_white@1 {
168                                                 label = "mamba:white:wan";
169                                                         reg = <0x1>;
170                                         };
171
172                                         wlan_2g@2 {
173                                                 label = "mamba:white:wlan_2g";
174                                                         reg = <0x2>;
175                                         };
176
177                                         wlan_5g@3 {
178                                                 label = "mamba:white:wlan_5g";
179                                                         reg = <0x3>;
180                                         };
181
182                                         esata@4 {
183                                                 label = "mamba:white:esata";
184                                                         reg = <0x4>;
185                                         };
186
187                                         usb2@5 {
188                                                 label = "mamba:white:usb2";
189                                                         reg = <0x5>;
190                                         };
191
192                                         usb3_1@6 {
193                                                 label = "mamba:white:usb3_1";
194                                                         reg = <0x6>;
195                                         };
196
197                                         usb3_2@7 {
198                                                 label = "mamba:white:usb3_2";
199                                                         reg = <0x7>;
200                                         };
201
202                                         wps_white@8 {
203                                                 label = "mamba:white:wps";
204                                                         reg = <0x8>;
205                                         };
206
207                                         wps_amber@9 {
208                                                 label = "mamba:amber:wps";
209                                                         reg = <0x9>;
210                                         };
211                                 };
212                         };
213
214                         nand@d0000 {
215                                 status = "okay";
216                                 num-cs = <1>;
217                                 marvell,nand-keep-config;
218                                 marvell,nand-enable-arbiter;
219                                 nand-on-flash-bbt;
220                                 nand-ecc-strength = <4>;
221                                 nand-ecc-step-size = <512>;
222
223
224                                 partition@0 {
225                                         label = "u-boot";
226                                         reg = <0x0000000 0x100000>;  /* 1MB */
227                                         read-only;
228                                 };
229
230                                 partition@100000 {
231                                         label = "u_env";
232                                         reg = <0x100000 0x40000>;    /* 256KB */
233                                 };
234
235                                 partition@140000 {
236                                         label = "s_env";
237                                         reg = <0x140000 0x40000>;    /* 256KB */
238                                 };
239
240                                 partition@900000 {
241                                         label = "devinfo";
242                                         reg = <0x900000 0x100000>;    /* 1MB */
243                                         read-only;
244                                 };
245
246                                 partition@a00000 {
247                                         label = "kernel1";
248                                         reg = <0xa00000 0x2800000>;    /* 3MB */
249                                 };
250
251                                 partition@d00000 {
252                                         label = "rootfs1";
253                                         reg = <0xd00000 0x2500000>;    /* 37MB */
254                                 };
255
256                                 partition@3200000 {
257                                         label = "kernel2";
258                                         reg = <0x3200000 0x2800000>;    /* 3MB */
259                                 };
260
261                                 partition@3500000 {
262                                         label = "rootfs2";
263                                         reg = <0x3500000 0x2500000>;    /* 37MB */
264                                 };
265
266                                 /* Last MB is for the BBT, i.e. not writable */
267                                 partition@5a00000 {
268                                         label = "syscfg";
269                                         reg = <0x5a00000 0x2600000>;    /* 38MB */
270                                 };
271                         };
272
273                         spi0: spi@10600 {
274                                 status = "okay";
275                                 pinctrl-0 = <&pmx_spi>;
276                                 pinctrl-names = "default";
277
278                                 spi-flash@0 {
279                                         #address-cells = <1>;
280                                         #size-cells = <1>;
281                                         compatible = "mr25h256";
282                                         reg = <0>; /* Chip select 0 */
283                                         spi-max-frequency = <108000000>;
284                                 };
285                         };
286                 };
287         };
288
289         gpio_keys {
290                 compatible = "gpio-keys";
291                 #address-cells = <1>;
292                 #size-cells = <0>;
293                 pinctrl-0 = <&pmx_keys>;
294                 pinctrl-names = "default";
295
296                 button@1 {
297                         label = "WPS";
298                         linux,code = <KEY_WPS_BUTTON>;
299                         gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
300                 };
301
302                 button@2 {
303                         label = "Factory Reset Button";
304                         linux,code = <KEY_RESTART>;
305                         gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
306                 };
307         };
308
309         gpio-leds {
310                 compatible = "gpio-leds";
311                 pinctrl-0 = <&power_led_pin>;
312                 pinctrl-names = "default";
313
314                 power {
315                         label = "mamba:white:power";
316                         gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
317                         default-state = "on";
318                 };
319         };
320
321         gpio_fan {
322                 /* SUNON HA4010V4-0000-C99 */
323                 compatible = "gpio-fan";
324                 gpios = <&gpio0 24 0>;
325
326                 gpio-fan,speed-map = <0    0
327                                       4500 1>;
328         };
329
330         mvsw61xx {
331                 compatible = "marvell,88e6172";
332                 status = "okay";
333                 reg = <0x10>;
334
335                 mii-bus = <&mdio>;
336                 cpu-port-0 = <5>;
337                 cpu-port-1 = <6>;
338         };
339
340 };