xref: /linux/scripts/dtc/include-prefixes/arm/marvell/armada-xp-linksys-mamba.dts (revision 6e75ac5a824e1551764cd4bfce5ede3d5fafc407)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2724ba675SRob Herring/*
3724ba675SRob Herring * Device Tree file for the Linksys WRT1900AC (Mamba).
4724ba675SRob Herring *
5724ba675SRob Herring * Note: this board is shipped with a new generation boot loader that
6724ba675SRob Herring * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
7724ba675SRob Herring * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
8724ba675SRob Herring * used.
9724ba675SRob Herring *
10724ba675SRob Herring * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
11724ba675SRob Herring *
12724ba675SRob Herring * Based on armada-xp-axpwifiap.dts:
13724ba675SRob Herring *
14724ba675SRob Herring *     Copyright (C) 2013 Marvell
15724ba675SRob Herring *
16724ba675SRob Herring *     Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17724ba675SRob Herring */
18724ba675SRob Herring
19724ba675SRob Herring/dts-v1/;
20724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
21724ba675SRob Herring#include <dt-bindings/input/input.h>
22724ba675SRob Herring#include "armada-xp-mv78230.dtsi"
23724ba675SRob Herring
24724ba675SRob Herring/ {
25724ba675SRob Herring	model = "Linksys WRT1900AC";
26724ba675SRob Herring	compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
27724ba675SRob Herring		     "marvell,armadaxp", "marvell,armada-370-xp";
28724ba675SRob Herring
29724ba675SRob Herring	chosen {
30724ba675SRob Herring		bootargs = "console=ttyS0,115200";
31724ba675SRob Herring		stdout-path = &uart0;
32724ba675SRob Herring	};
33724ba675SRob Herring
34724ba675SRob Herring	memory@0 {
35724ba675SRob Herring		device_type = "memory";
36724ba675SRob Herring		reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
37724ba675SRob Herring	};
38724ba675SRob Herring
39724ba675SRob Herring	soc {
40724ba675SRob Herring		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
41724ba675SRob Herring			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
42724ba675SRob Herring			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
43724ba675SRob Herring			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
44724ba675SRob Herring			  MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
45724ba675SRob Herring
46724ba675SRob Herring		internal-regs {
47724ba675SRob Herring
48724ba675SRob Herring			rtc@10300 {
49724ba675SRob Herring				/* No crystal connected to the internal RTC */
50724ba675SRob Herring				status = "disabled";
51724ba675SRob Herring			};
52724ba675SRob Herring
53724ba675SRob Herring			/* J10: VCC, NC, RX, NC, TX, GND  */
54724ba675SRob Herring			serial@12000 {
55724ba675SRob Herring				status = "okay";
56724ba675SRob Herring			};
57724ba675SRob Herring
58724ba675SRob Herring			sata@a0000 {
59724ba675SRob Herring				nr-ports = <1>;
60724ba675SRob Herring				status = "okay";
61724ba675SRob Herring			};
62724ba675SRob Herring
63724ba675SRob Herring			ethernet@70000 {
64724ba675SRob Herring				pinctrl-0 = <&ge0_rgmii_pins>;
65724ba675SRob Herring				pinctrl-names = "default";
66724ba675SRob Herring				status = "okay";
67724ba675SRob Herring				phy-mode = "rgmii-id";
68724ba675SRob Herring				buffer-manager = <&bm>;
69724ba675SRob Herring				bm,pool-long = <0>;
70724ba675SRob Herring				bm,pool-short = <1>;
71724ba675SRob Herring				fixed-link {
72724ba675SRob Herring					speed = <1000>;
73724ba675SRob Herring					full-duplex;
74724ba675SRob Herring				};
75724ba675SRob Herring			};
76724ba675SRob Herring
77724ba675SRob Herring			ethernet@74000 {
78724ba675SRob Herring				pinctrl-0 = <&ge1_rgmii_pins>;
79724ba675SRob Herring				pinctrl-names = "default";
80724ba675SRob Herring				status = "okay";
81724ba675SRob Herring				phy-mode = "rgmii-id";
82724ba675SRob Herring				buffer-manager = <&bm>;
83724ba675SRob Herring				bm,pool-long = <2>;
84724ba675SRob Herring				bm,pool-short = <3>;
85724ba675SRob Herring				fixed-link {
86724ba675SRob Herring					speed = <1000>;
87724ba675SRob Herring					full-duplex;
88724ba675SRob Herring				};
89724ba675SRob Herring			};
90724ba675SRob Herring
91724ba675SRob Herring			/* USB part of the eSATA/USB 2.0 port */
92724ba675SRob Herring			usb@50000 {
93724ba675SRob Herring				status = "okay";
94724ba675SRob Herring			};
95724ba675SRob Herring
96724ba675SRob Herring			i2c@11000 {
97724ba675SRob Herring				status = "okay";
98724ba675SRob Herring				clock-frequency = <100000>;
99724ba675SRob Herring
100724ba675SRob Herring				tmp421@4c {
101724ba675SRob Herring					compatible = "ti,tmp421";
102724ba675SRob Herring					reg = <0x4c>;
103724ba675SRob Herring				};
104724ba675SRob Herring
105724ba675SRob Herring				tlc59116@68 {
106724ba675SRob Herring					#address-cells = <1>;
107724ba675SRob Herring					#size-cells = <0>;
108724ba675SRob Herring					#gpio-cells = <2>;
109724ba675SRob Herring					compatible = "ti,tlc59116";
110724ba675SRob Herring					reg = <0x68>;
111724ba675SRob Herring
112724ba675SRob Herring					wan_amber@0 {
113724ba675SRob Herring						label = "mamba:amber:wan";
114724ba675SRob Herring						reg = <0x0>;
115724ba675SRob Herring					};
116724ba675SRob Herring
117724ba675SRob Herring					wan_white@1 {
118724ba675SRob Herring						label = "mamba:white:wan";
119724ba675SRob Herring						reg = <0x1>;
120724ba675SRob Herring					};
121724ba675SRob Herring
122724ba675SRob Herring					wlan_2g@2 {
123724ba675SRob Herring						label = "mamba:white:wlan_2g";
124724ba675SRob Herring						reg = <0x2>;
125724ba675SRob Herring					};
126724ba675SRob Herring
127724ba675SRob Herring					wlan_5g@3 {
128724ba675SRob Herring						label = "mamba:white:wlan_5g";
129724ba675SRob Herring						reg = <0x3>;
130724ba675SRob Herring					};
131724ba675SRob Herring
132724ba675SRob Herring					esata@4 {
133724ba675SRob Herring						label = "mamba:white:esata";
134724ba675SRob Herring						reg = <0x4>;
135724ba675SRob Herring						linux,default-trigger = "disk-activity";
136724ba675SRob Herring					};
137724ba675SRob Herring
138724ba675SRob Herring					usb2@5 {
139724ba675SRob Herring						label = "mamba:white:usb2";
140724ba675SRob Herring						reg = <0x5>;
141724ba675SRob Herring					};
142724ba675SRob Herring
143724ba675SRob Herring					usb3_1@6 {
144724ba675SRob Herring						label = "mamba:white:usb3_1";
145724ba675SRob Herring						reg = <0x6>;
146724ba675SRob Herring					};
147724ba675SRob Herring
148724ba675SRob Herring					usb3_2@7 {
149724ba675SRob Herring						label = "mamba:white:usb3_2";
150724ba675SRob Herring						reg = <0x7>;
151724ba675SRob Herring					};
152724ba675SRob Herring
153724ba675SRob Herring					wps_white@8 {
154724ba675SRob Herring						label = "mamba:white:wps";
155724ba675SRob Herring						reg = <0x8>;
156724ba675SRob Herring					};
157724ba675SRob Herring
158724ba675SRob Herring					wps_amber@9 {
159724ba675SRob Herring						label = "mamba:amber:wps";
160724ba675SRob Herring						reg = <0x9>;
161724ba675SRob Herring					};
162724ba675SRob Herring				};
163724ba675SRob Herring			};
164724ba675SRob Herring
165724ba675SRob Herring			bm@c8000 {
166724ba675SRob Herring				status = "okay";
167724ba675SRob Herring			};
168724ba675SRob Herring		};
169724ba675SRob Herring
170724ba675SRob Herring		bm-bppi {
171724ba675SRob Herring			status = "okay";
172724ba675SRob Herring		};
173724ba675SRob Herring	};
174724ba675SRob Herring
175724ba675SRob Herring	gpio-keys {
176724ba675SRob Herring		compatible = "gpio-keys";
177724ba675SRob Herring		pinctrl-0 = <&keys_pin>;
178724ba675SRob Herring		pinctrl-names = "default";
179724ba675SRob Herring
180724ba675SRob Herring		button-wps {
181724ba675SRob Herring			label = "WPS";
182724ba675SRob Herring			linux,code = <KEY_WPS_BUTTON>;
183724ba675SRob Herring			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
184724ba675SRob Herring		};
185724ba675SRob Herring
186724ba675SRob Herring		button-reset {
187724ba675SRob Herring			label = "Factory Reset Button";
188724ba675SRob Herring			linux,code = <KEY_RESTART>;
189724ba675SRob Herring			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
190724ba675SRob Herring		};
191724ba675SRob Herring	};
192724ba675SRob Herring
193724ba675SRob Herring	gpio-leds {
194724ba675SRob Herring		compatible = "gpio-leds";
195724ba675SRob Herring		pinctrl-0 = <&power_led_pin>;
196724ba675SRob Herring		pinctrl-names = "default";
197724ba675SRob Herring
198724ba675SRob Herring		led-power {
199724ba675SRob Herring			label = "mamba:white:power";
200724ba675SRob Herring			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
201724ba675SRob Herring			default-state = "on";
202724ba675SRob Herring		};
203724ba675SRob Herring	};
204724ba675SRob Herring
205724ba675SRob Herring	pwm_fan {
206724ba675SRob Herring		/* SUNON HA4010V4-0000-C99 */
207724ba675SRob Herring
208724ba675SRob Herring		compatible = "pwm-fan";
209724ba675SRob Herring		pwms = <&gpio0 24 4000>;
210724ba675SRob Herring	};
211724ba675SRob Herring};
212724ba675SRob Herring
213724ba675SRob Herring&pciec {
214724ba675SRob Herring	status = "okay";
215724ba675SRob Herring
216724ba675SRob Herring	/* Etron EJ168 USB 3.0 controller */
217724ba675SRob Herring	pcie@1,0 {
218724ba675SRob Herring		/* Port 0, Lane 0 */
219724ba675SRob Herring		status = "okay";
220724ba675SRob Herring	};
221724ba675SRob Herring
222724ba675SRob Herring	/* First mini-PCIe port */
223724ba675SRob Herring	pcie@2,0 {
224724ba675SRob Herring		/* Port 0, Lane 1 */
225724ba675SRob Herring		status = "okay";
226724ba675SRob Herring	};
227724ba675SRob Herring
228724ba675SRob Herring	/* Second mini-PCIe port */
229724ba675SRob Herring	pcie@3,0 {
230724ba675SRob Herring		/* Port 0, Lane 3 */
231724ba675SRob Herring		status = "okay";
232724ba675SRob Herring	};
233724ba675SRob Herring};
234724ba675SRob Herring
235724ba675SRob Herring&pinctrl {
236724ba675SRob Herring
237724ba675SRob Herring	keys_pin: keys-pin {
238724ba675SRob Herring		marvell,pins = "mpp32", "mpp33";
239724ba675SRob Herring		marvell,function = "gpio";
240724ba675SRob Herring	};
241724ba675SRob Herring
242724ba675SRob Herring	power_led_pin: power-led-pin {
243724ba675SRob Herring		marvell,pins = "mpp40";
244724ba675SRob Herring		marvell,function = "gpio";
245724ba675SRob Herring	};
246724ba675SRob Herring
247724ba675SRob Herring	gpio_fan_pin: gpio-fan-pin {
248724ba675SRob Herring		marvell,pins = "mpp24";
249724ba675SRob Herring		marvell,function = "gpio";
250724ba675SRob Herring	};
251724ba675SRob Herring};
252724ba675SRob Herring
253724ba675SRob Herring&spi0 {
254724ba675SRob Herring	status = "okay";
255724ba675SRob Herring
256724ba675SRob Herring	flash@0 {
257724ba675SRob Herring		#address-cells = <1>;
258724ba675SRob Herring		#size-cells = <1>;
259724ba675SRob Herring		compatible = "everspin,mr25h256";
260724ba675SRob Herring		reg = <0>; /* Chip select 0 */
261724ba675SRob Herring		spi-max-frequency = <40000000>;
262724ba675SRob Herring	};
263724ba675SRob Herring};
264724ba675SRob Herring
265724ba675SRob Herring&mdio {
266724ba675SRob Herring	status = "okay";
267724ba675SRob Herring
268*6e75ac5aSLinus Walleij	ethernet-switch@0 {
269724ba675SRob Herring		compatible = "marvell,mv88e6085";
270724ba675SRob Herring		reg = <0>;
271724ba675SRob Herring
272*6e75ac5aSLinus Walleij		ethernet-ports {
273724ba675SRob Herring			#address-cells = <1>;
274724ba675SRob Herring			#size-cells = <0>;
275724ba675SRob Herring
276*6e75ac5aSLinus Walleij			ethernet-port@0 {
277724ba675SRob Herring				reg = <0>;
278724ba675SRob Herring				label = "lan4";
279724ba675SRob Herring			};
280724ba675SRob Herring
281*6e75ac5aSLinus Walleij			ethernet-port@1 {
282724ba675SRob Herring				reg = <1>;
283724ba675SRob Herring				label = "lan3";
284724ba675SRob Herring			};
285724ba675SRob Herring
286*6e75ac5aSLinus Walleij			ethernet-port@2 {
287724ba675SRob Herring				reg = <2>;
288724ba675SRob Herring				label = "lan2";
289724ba675SRob Herring			};
290724ba675SRob Herring
291*6e75ac5aSLinus Walleij			ethernet-port@3 {
292724ba675SRob Herring				reg = <3>;
293724ba675SRob Herring				label = "lan1";
294724ba675SRob Herring			};
295724ba675SRob Herring
296*6e75ac5aSLinus Walleij			ethernet-port@4 {
297724ba675SRob Herring				reg = <4>;
298724ba675SRob Herring				label = "internet";
299724ba675SRob Herring			};
300724ba675SRob Herring
301*6e75ac5aSLinus Walleij			ethernet-port@5 {
302724ba675SRob Herring				reg = <5>;
303724ba675SRob Herring				phy-mode = "rgmii-id";
304724ba675SRob Herring				ethernet = <&eth0>;
305724ba675SRob Herring				fixed-link {
306724ba675SRob Herring					speed = <1000>;
307724ba675SRob Herring					full-duplex;
308724ba675SRob Herring				};
309724ba675SRob Herring			};
310724ba675SRob Herring		};
311724ba675SRob Herring	};
312724ba675SRob Herring};
313724ba675SRob Herring
314724ba675SRob Herring&nand_controller {
315724ba675SRob Herring	status = "okay";
316724ba675SRob Herring
317724ba675SRob Herring	nand@0 {
318724ba675SRob Herring		reg = <0>;
319724ba675SRob Herring		label = "pxa3xx_nand-0";
320724ba675SRob Herring		nand-rb = <0>;
321724ba675SRob Herring		marvell,nand-keep-config;
322724ba675SRob Herring		nand-on-flash-bbt;
323724ba675SRob Herring		nand-ecc-strength = <4>;
324724ba675SRob Herring		nand-ecc-step-size = <512>;
325724ba675SRob Herring
326724ba675SRob Herring		partitions {
327724ba675SRob Herring			compatible = "fixed-partitions";
328724ba675SRob Herring			#address-cells = <1>;
329724ba675SRob Herring			#size-cells = <1>;
330724ba675SRob Herring
331724ba675SRob Herring			partition@0 {
332724ba675SRob Herring				label = "u-boot";
333724ba675SRob Herring				reg = <0x0000000 0x100000>;  /* 1MB */
334724ba675SRob Herring				read-only;
335724ba675SRob Herring			};
336724ba675SRob Herring
337724ba675SRob Herring			partition@100000 {
338724ba675SRob Herring				label = "u_env";
339724ba675SRob Herring				reg = <0x100000 0x40000>;    /* 256KB */
340724ba675SRob Herring			};
341724ba675SRob Herring
342724ba675SRob Herring			partition@140000 {
343724ba675SRob Herring				label = "s_env";
344724ba675SRob Herring				reg = <0x140000 0x40000>;    /* 256KB */
345724ba675SRob Herring			};
346724ba675SRob Herring
347724ba675SRob Herring			partition@900000 {
348724ba675SRob Herring				label = "devinfo";
349724ba675SRob Herring				reg = <0x900000 0x100000>;   /* 1MB */
350724ba675SRob Herring				read-only;
351724ba675SRob Herring			};
352724ba675SRob Herring
353724ba675SRob Herring			/* kernel1 overlaps with rootfs1 by design */
354724ba675SRob Herring			partition@a00000 {
355724ba675SRob Herring				label = "kernel1";
356724ba675SRob Herring				reg = <0xa00000 0x2800000>;  /* 40MB */
357724ba675SRob Herring			};
358724ba675SRob Herring
359724ba675SRob Herring			partition@d00000 {
360724ba675SRob Herring				label = "rootfs1";
361724ba675SRob Herring				reg = <0xd00000 0x2500000>;  /* 37MB */
362724ba675SRob Herring			};
363724ba675SRob Herring
364724ba675SRob Herring			/* kernel2 overlaps with rootfs2 by design */
365724ba675SRob Herring			partition@3200000 {
366724ba675SRob Herring				label = "kernel2";
367724ba675SRob Herring				reg = <0x3200000 0x2800000>; /* 40MB */
368724ba675SRob Herring			};
369724ba675SRob Herring
370724ba675SRob Herring			partition@3500000 {
371724ba675SRob Herring				label = "rootfs2";
372724ba675SRob Herring				reg = <0x3500000 0x2500000>; /* 37MB */
373724ba675SRob Herring			};
374724ba675SRob Herring
375724ba675SRob Herring			/*
376724ba675SRob Herring			 * 38MB, last MB is for the BBT, not writable
377724ba675SRob Herring			 */
378724ba675SRob Herring			partition@5a00000 {
379724ba675SRob Herring				label = "syscfg";
380724ba675SRob Herring				reg = <0x5a00000 0x2600000>;
381724ba675SRob Herring			};
382724ba675SRob Herring
383724ba675SRob Herring			/*
384724ba675SRob Herring			 * Unused area between "s_env" and "devinfo".
385724ba675SRob Herring			 * Moved here because otherwise the renumbered
386724ba675SRob Herring			 * partitions would break the bootloader
387724ba675SRob Herring			 * supplied bootargs
388724ba675SRob Herring			 */
389724ba675SRob Herring			partition@180000 {
390724ba675SRob Herring				label = "unused_area";
391724ba675SRob Herring				reg = <0x180000 0x780000>;   /* 7.5MB */
392724ba675SRob Herring			};
393724ba675SRob Herring		};
394724ba675SRob Herring	};
395724ba675SRob Herring};
396