a8b1643755fc20941ffc45369ed97f067b031adc
[openwrt/openwrt.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) 2013 Marvell
10 *
11 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18 /dts-v1/;
19 #include "armada-xp-mv78230.dtsi"
20
21 / {
22 model = "Linksys WRT1900AC (Mamba)";
23 compatible = "linksys,mamba", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
24
25 chosen {
26 bootargs = "console=ttyS0,115200 earlyprintk";
27 };
28
29 memory {
30 device_type = "memory";
31 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
32 };
33
34 soc {
35 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
36 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
37
38 pcie-controller {
39 status = "okay";
40
41 /* Etron EJ168 USB 3.0 controller */
42 pcie@1,0 {
43 /* Port 0, Lane 0 */
44 status = "okay";
45 };
46
47 /* First mini-PCIe port */
48 pcie@2,0 {
49 /* Port 0, Lane 1 */
50 status = "okay";
51 };
52
53 /* Second mini-PCIe port */
54 pcie@3,0 {
55 /* Port 0, Lane 3 */
56 status = "okay";
57 };
58 };
59
60 internal-regs {
61 pinctrl {
62 pinctrl-0 = <&pmx_phy_int>;
63 pinctrl-names = "default";
64
65 pmx_ge0: pmx-ge0 {
66 marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
67 "mpp4", "mpp5", "mpp6", "mpp7",
68 "mpp8", "mpp9", "mpp10", "mpp11";
69 marvell,function = "ge0";
70 };
71
72 pmx_ge1: pmx-ge1 {
73 marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15",
74 "mpp16", "mpp17", "mpp18", "mpp19",
75 "mpp20", "mpp21", "mpp22", "mpp23";
76 marvell,function = "ge1";
77 };
78
79 pmx_keys: pmx-keys {
80 marvell,pins = "mpp33";
81 marvell,function = "gpio";
82 };
83
84 pmx_spi: pmx-spi {
85 marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39";
86 marvell,function = "spi";
87 };
88
89 pmx_phy_int: pmx-phy-int {
90 marvell,pins = "mpp32";
91 marvell,function = "gpio";
92 };
93
94 power_led_pin: power-led-pin {
95 marvell,pins = "mpp40";
96 marvell,function = "gpio";
97 };
98
99 };
100
101 serial@12000 {
102 clock-frequency = <250000000>;
103 status = "okay";
104 };
105
106 serial@12100 {
107 clock-frequency = <250000000>;
108 status = "okay";
109 };
110
111 sata@a0000 {
112 nr-ports = <1>;
113 status = "okay";
114 };
115
116 mdio {
117 disabled;
118 };
119
120 ethernet@70000 {
121 pinctrl-0 = <&pmx_ge0>;
122 pinctrl-names = "default";
123 status = "okay";
124 phy-mode = "rgmii-id";
125 fixed-link {
126 speed = <1000>;
127 full-duplex;
128 };
129 };
130
131 ethernet@74000 {
132 pinctrl-0 = <&pmx_ge1>;
133 pinctrl-names = "default";
134 status = "okay";
135 phy-mode = "rgmii-id";
136 fixed-link {
137 speed = <1000>;
138 full-duplex;
139 };
140 };
141
142 /* USB part of the eSATA/USB 2.0 port */
143 usb@50000 {
144 status = "okay";
145 };
146
147 i2c@11000 {
148 status = "okay";
149 clock-frequency = <100000>;
150
151 tlc59116@68 {
152 #gpio-cells = <2>;
153 compatible = "gpio,tlc59116";
154 reg = <0x68>;
155 gpio-controller;
156 };
157 };
158
159 nand@d0000 {
160 status = "okay";
161 num-cs = <1>;
162 marvell,nand-keep-config;
163 marvell,nand-enable-arbiter;
164 nand-on-flash-bbt;
165 nand-ecc-strength = <4>;
166 nand-ecc-step-size = <512>;
167
168
169 partition@0 {
170 label = "u-boot";
171 reg = <0x0000000 0x100000>; /* 1MB */
172 read-only;
173 };
174
175 partition@100000 {
176 label = "u_env"; //u-boot-env?
177 reg = <0x100000 0x40000>; /* 256KB */
178 read-only;
179 };
180
181 partition@140000 {
182 label = "s_env";
183 reg = <0x140000 0x40000>; /* 256KB */
184 read-only;
185 };
186
187 partition@900000 {
188 label = "devinfo";
189 reg = <0x900000 0x100000>; /* 1MB */
190 };
191
192 partition@a00000 {
193 label = "kernel";
194 reg = <0xa00000 0x2800000>; /* 40MB */
195 };
196
197 partition@d00000 {
198 label = "rootfs";
199 reg = <0xd00000 0x2500000>; /* 37MB */
200 };
201
202 partition@3200000 {
203 label = "alt_kernel";
204 reg = <0x3200000 0x2800000>; /* 40MB */
205 };
206
207 partition@3500000 {
208 label = "alt_rootfs";
209 reg = <0x3500000 0x2500000>; /* 37MB */
210 };
211
212 /* Last MB is for the BBT, i.e. not writable */
213 partition@5a00000 {
214 label = "syscfg";
215 reg = <0x5a00000 0x2600000>; /* ?MB */
216 };
217 };
218
219 spi0: spi@10600 {
220 status = "okay";
221 pinctrl-0 = <&pmx_spi>;
222 pinctrl-names = "default";
223
224 spi-flash@0 {
225 #address-cells = <1>;
226 #size-cells = <1>;
227 compatible = "mr25h256";
228 reg = <0>; /* Chip select 0 */
229 spi-max-frequency = <108000000>;
230 };
231 };
232 };
233 };
234
235 gpio_keys {
236 compatible = "gpio-keys";
237 #address-cells = <1>;
238 #size-cells = <0>;
239 pinctrl-0 = <&pmx_keys>;
240 pinctrl-names = "default";
241
242 button@1 {
243 label = "Factory Reset Button";
244 linux,code = <141>; /* KEY_SETUP */
245 gpios = <&gpio1 1 1>;
246 };
247 };
248
249 gpio-leds {
250 compatible = "gpio-leds";
251 pinctrl-0 = <&power_led_pin>;
252 pinctrl-names = "default";
253
254 power {
255 label = "mamba:white:power";
256 gpios = <&gpio1 8 0>;
257 default-state = "on";
258 };
259 };
260 };