Linux Audio

Check our new training course

Loading...
v5.4
  1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2/*
  3 * Device Tree file for the Linksys WRT1900AC (Mamba).
  4 *
  5 * Note: this board is shipped with a new generation boot loader that
  6 * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
  7 * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
  8 * used.
  9 *
 10 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
 11 *
 12 * Based on armada-xp-axpwifiap.dts:
 13 *
 14 *     Copyright (C) 2013 Marvell
 15 *
 16 *     Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 17 */
 18
 19/dts-v1/;
 20#include <dt-bindings/gpio/gpio.h>
 21#include <dt-bindings/input/input.h>
 22#include "armada-xp-mv78230.dtsi"
 23
 24/ {
 25	model = "Linksys WRT1900AC";
 26	compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
 27		     "marvell,armadaxp", "marvell,armada-370-xp";
 28
 29	chosen {
 30		bootargs = "console=ttyS0,115200";
 31		stdout-path = &uart0;
 32	};
 33
 34	memory@0 {
 35		device_type = "memory";
 36		reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
 37	};
 38
 39	soc {
 40		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
 41			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
 42			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
 43			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
 44			  MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 45
 46		internal-regs {
 47
 48			rtc@10300 {
 49				/* No crystal connected to the internal RTC */
 50				status = "disabled";
 51			};
 52
 53			/* J10: VCC, NC, RX, NC, TX, GND  */
 54			serial@12000 {
 55				status = "okay";
 56			};
 57
 58			sata@a0000 {
 59				nr-ports = <1>;
 60				status = "okay";
 61			};
 62
 63			ethernet@70000 {
 64				pinctrl-0 = <&ge0_rgmii_pins>;
 65				pinctrl-names = "default";
 66				status = "okay";
 67				phy-mode = "rgmii-id";
 68				buffer-manager = <&bm>;
 69				bm,pool-long = <0>;
 70				bm,pool-short = <1>;
 71				fixed-link {
 72					speed = <1000>;
 73					full-duplex;
 74				};
 75			};
 76
 77			ethernet@74000 {
 78				pinctrl-0 = <&ge1_rgmii_pins>;
 79				pinctrl-names = "default";
 80				status = "okay";
 81				phy-mode = "rgmii-id";
 82				buffer-manager = <&bm>;
 83				bm,pool-long = <2>;
 84				bm,pool-short = <3>;
 85				fixed-link {
 86					speed = <1000>;
 87					full-duplex;
 88				};
 89			};
 90
 91			/* USB part of the eSATA/USB 2.0 port */
 92			usb@50000 {
 93				status = "okay";
 94			};
 95
 96			i2c@11000 {
 97				status = "okay";
 98				clock-frequency = <100000>;
 99
100				tmp421@4c {
101					compatible = "ti,tmp421";
102					reg = <0x4c>;
103				};
104
105				tlc59116@68 {
106					#address-cells = <1>;
107					#size-cells = <0>;
108					#gpio-cells = <2>;
109					compatible = "ti,tlc59116";
110					reg = <0x68>;
111
112					wan_amber@0 {
113						label = "mamba:amber:wan";
114						reg = <0x0>;
115					};
116
117					wan_white@1 {
118						label = "mamba:white:wan";
119						reg = <0x1>;
120					};
121
122					wlan_2g@2 {
123						label = "mamba:white:wlan_2g";
124						reg = <0x2>;
125					};
126
127					wlan_5g@3 {
128						label = "mamba:white:wlan_5g";
129						reg = <0x3>;
130					};
131
132					esata@4 {
133						label = "mamba:white:esata";
134						reg = <0x4>;
135						linux,default-trigger = "disk-activity";
136					};
137
138					usb2@5 {
139						label = "mamba:white:usb2";
140						reg = <0x5>;
141					};
142
143					usb3_1@6 {
144						label = "mamba:white:usb3_1";
145						reg = <0x6>;
146					};
147
148					usb3_2@7 {
149						label = "mamba:white:usb3_2";
150						reg = <0x7>;
151					};
152
153					wps_white@8 {
154						label = "mamba:white:wps";
155						reg = <0x8>;
156					};
157
158					wps_amber@9 {
159						label = "mamba:amber:wps";
160						reg = <0x9>;
161					};
162				};
163			};
164
165			bm@c8000 {
166				status = "okay";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167			};
168		};
169
170		bm-bppi {
171			status = "okay";
 
 
 
 
 
 
 
 
 
172		};
173	};
174
175	gpio_keys {
176		compatible = "gpio-keys";
177		#address-cells = <1>;
178		#size-cells = <0>;
179		pinctrl-0 = <&keys_pin>;
180		pinctrl-names = "default";
181
182		wps {
183			label = "WPS";
184			linux,code = <KEY_WPS_BUTTON>;
185			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
186		};
187
188		reset {
189			label = "Factory Reset Button";
190			linux,code = <KEY_RESTART>;
191			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
192		};
193	};
194
195	gpio-leds {
196		compatible = "gpio-leds";
197		pinctrl-0 = <&power_led_pin>;
198		pinctrl-names = "default";
199
200		power {
201			label = "mamba:white:power";
202			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
203			default-state = "on";
204		};
205	};
206
207	pwm_fan {
208		/* SUNON HA4010V4-0000-C99 */
 
 
209
210		compatible = "pwm-fan";
211		pwms = <&gpio0 24 4000>;
212	};
213};
214
215&pciec {
216	status = "okay";
217
218	/* Etron EJ168 USB 3.0 controller */
219	pcie@1,0 {
220		/* Port 0, Lane 0 */
221		status = "okay";
222	};
223
224	/* First mini-PCIe port */
225	pcie@2,0 {
226		/* Port 0, Lane 1 */
227		status = "okay";
228	};
229
230	/* Second mini-PCIe port */
231	pcie@3,0 {
232		/* Port 0, Lane 3 */
233		status = "okay";
234	};
235};
236
237&pinctrl {
238
239	keys_pin: keys-pin {
240		marvell,pins = "mpp32", "mpp33";
241		marvell,function = "gpio";
242	};
243
244	power_led_pin: power-led-pin {
245		marvell,pins = "mpp40";
246		marvell,function = "gpio";
247	};
248
249	gpio_fan_pin: gpio-fan-pin {
250		marvell,pins = "mpp24";
251		marvell,function = "gpio";
252	};
253};
254
255&spi0 {
256	status = "okay";
257
258	spi-flash@0 {
259		#address-cells = <1>;
260		#size-cells = <1>;
261		compatible = "everspin,mr25h256";
262		reg = <0>; /* Chip select 0 */
263		spi-max-frequency = <40000000>;
264	};
265};
266
267&mdio {
268	status = "okay";
269
270	switch@0 {
271		compatible = "marvell,mv88e6085";
272		#address-cells = <1>;
273		#size-cells = <0>;
274		reg = <0>;
275
276		ports {
 
 
 
277			#address-cells = <1>;
278			#size-cells = <0>;
 
279
280			port@0 {
281				reg = <0>;
282				label = "lan4";
283			};
284
285			port@1 {
286				reg = <1>;
287				label = "lan3";
288			};
289
290			port@2 {
291				reg = <2>;
292				label = "lan2";
293			};
294
295			port@3 {
296				reg = <3>;
297				label = "lan1";
298			};
299
300			port@4 {
301				reg = <4>;
302				label = "internet";
303			};
304
305			port@5 {
306				reg = <5>;
307				label = "cpu";
308				ethernet = <&eth0>;
309				fixed-link {
310					speed = <1000>;
311					full-duplex;
312				};
313			};
314		};
315	};
316};
317
318&nand_controller {
319	status = "okay";
320
321	nand@0 {
322		reg = <0>;
323		label = "pxa3xx_nand-0";
324		nand-rb = <0>;
325		marvell,nand-keep-config;
326		nand-on-flash-bbt;
327		nand-ecc-strength = <4>;
328		nand-ecc-step-size = <512>;
329
330		partitions {
331			compatible = "fixed-partitions";
332			#address-cells = <1>;
333			#size-cells = <1>;
334
335			partition@0 {
336				label = "u-boot";
337				reg = <0x0000000 0x100000>;  /* 1MB */
338				read-only;
339			};
340
341			partition@100000 {
342				label = "u_env";
343				reg = <0x100000 0x40000>;    /* 256KB */
344			};
345
346			partition@140000 {
347				label = "s_env";
348				reg = <0x140000 0x40000>;    /* 256KB */
349			};
350
351			partition@900000 {
352				label = "devinfo";
353				reg = <0x900000 0x100000>;   /* 1MB */
354				read-only;
355			};
356
357			/* kernel1 overlaps with rootfs1 by design */
358			partition@a00000 {
359				label = "kernel1";
360				reg = <0xa00000 0x2800000>;  /* 40MB */
361			};
362
363			partition@d00000 {
364				label = "rootfs1";
365				reg = <0xd00000 0x2500000>;  /* 37MB */
366			};
367
368			/* kernel2 overlaps with rootfs2 by design */
369			partition@3200000 {
370				label = "kernel2";
371				reg = <0x3200000 0x2800000>; /* 40MB */
372			};
373
374			partition@3500000 {
375				label = "rootfs2";
376				reg = <0x3500000 0x2500000>; /* 37MB */
377			};
378
379			/*
380			 * 38MB, last MB is for the BBT, not writable
381			 */
382			partition@5a00000 {
383				label = "syscfg";
384				reg = <0x5a00000 0x2600000>;
385			};
386
387			/*
388			 * Unused area between "s_env" and "devinfo".
389			 * Moved here because otherwise the renumbered
390			 * partitions would break the bootloader
391			 * supplied bootargs
392			 */
393			partition@180000 {
394				label = "unused_area";
395				reg = <0x180000 0x780000>;   /* 7.5MB */
396			};
397		};
398	};
399};
v4.6
 
  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_UART0_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";
 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			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
 74			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
 75
 76		pcie-controller {
 77			status = "okay";
 78
 79			/* Etron EJ168 USB 3.0 controller */
 80			pcie@1,0 {
 81				/* Port 0, Lane 0 */
 82				status = "okay";
 83			};
 84
 85			/* First mini-PCIe port */
 86			pcie@2,0 {
 87				/* Port 0, Lane 1 */
 88				status = "okay";
 89			};
 90
 91			/* Second mini-PCIe port */
 92			pcie@3,0 {
 93				/* Port 0, Lane 3 */
 94				status = "okay";
 95			};
 96		};
 97
 98		internal-regs {
 99
100			rtc@10300 {
101				/* No crystal connected to the internal RTC */
102				status = "disabled";
103			};
104
105			/* J10: VCC, NC, RX, NC, TX, GND  */
106			serial@12000 {
107				status = "okay";
108			};
109
110			sata@a0000 {
111				nr-ports = <1>;
112				status = "okay";
113			};
114
115			ethernet@70000 {
116				pinctrl-0 = <&ge0_rgmii_pins>;
117				pinctrl-names = "default";
118				status = "okay";
119				phy-mode = "rgmii-id";
 
 
 
120				fixed-link {
121					speed = <1000>;
122					full-duplex;
123				};
124			};
125
126			ethernet@74000 {
127				pinctrl-0 = <&ge1_rgmii_pins>;
128				pinctrl-names = "default";
129				status = "okay";
130				phy-mode = "rgmii-id";
 
 
 
131				fixed-link {
132					speed = <1000>;
133					full-duplex;
134				};
135			};
136
137			/* USB part of the eSATA/USB 2.0 port */
138			usb@50000 {
139				status = "okay";
140			};
141
142			i2c@11000 {
143				status = "okay";
144				clock-frequency = <100000>;
145
146				tmp421@4c {
147					compatible = "ti,tmp421";
148					reg = <0x4c>;
149				};
150
151				tlc59116@68 {
152					#address-cells = <1>;
153					#size-cells = <0>;
154					#gpio-cells = <2>;
155					compatible = "ti,tlc59116";
156					reg = <0x68>;
157
158					wan_amber@0 {
159						label = "mamba:amber:wan";
160						reg = <0x0>;
161					};
162
163					wan_white@1 {
164						label = "mamba:white:wan";
165						reg = <0x1>;
166					};
167
168					wlan_2g@2 {
169						label = "mamba:white:wlan_2g";
170						reg = <0x2>;
171					};
172
173					wlan_5g@3 {
174						label = "mamba:white:wlan_5g";
175						reg = <0x3>;
176					};
177
178					esata@4 {
179						label = "mamba:white:esata";
180						reg = <0x4>;
 
181					};
182
183					usb2@5 {
184						label = "mamba:white:usb2";
185						reg = <0x5>;
186					};
187
188					usb3_1@6 {
189						label = "mamba:white:usb3_1";
190						reg = <0x6>;
191					};
192
193					usb3_2@7 {
194						label = "mamba:white:usb3_2";
195						reg = <0x7>;
196					};
197
198					wps_white@8 {
199						label = "mamba:white:wps";
200						reg = <0x8>;
201					};
202
203					wps_amber@9 {
204						label = "mamba:amber:wps";
205						reg = <0x9>;
206					};
207				};
208			};
209
210			nand@d0000 {
211				status = "okay";
212				num-cs = <1>;
213				marvell,nand-keep-config;
214				marvell,nand-enable-arbiter;
215				nand-on-flash-bbt;
216				nand-ecc-strength = <4>;
217				nand-ecc-step-size = <512>;
218
219				partition@0 {
220					label = "u-boot";
221					reg = <0x0000000 0x100000>;  /* 1MB */
222					read-only;
223				};
224
225				partition@100000 {
226					label = "u_env";
227					reg = <0x100000 0x40000>;    /* 256KB */
228				};
229
230				partition@140000 {
231					label = "s_env";
232					reg = <0x140000 0x40000>;    /* 256KB */
233				};
234
235				partition@900000 {
236					label = "devinfo";
237					reg = <0x900000 0x100000>;   /* 1MB */
238					read-only;
239				};
240
241				/* kernel1 overlaps with rootfs1 by design */
242				partition@a00000 {
243					label = "kernel1";
244					reg = <0xa00000 0x2800000>;  /* 40MB */
245				};
246
247				partition@d00000 {
248					label = "rootfs1";
249					reg = <0xd00000 0x2500000>;  /* 37MB */
250				};
251
252				/* kernel2 overlaps with rootfs2 by design */
253				partition@3200000 {
254					label = "kernel2";
255					reg = <0x3200000 0x2800000>; /* 40MB */
256				};
257
258				partition@3500000 {
259					label = "rootfs2";
260					reg = <0x3500000 0x2500000>; /* 37MB */
261				};
262
263				/*
264				 * 38MB, last MB is for the BBT, not writable
265				 */
266				partition@5a00000 {
267					label = "syscfg";
268					reg = <0x5a00000 0x2600000>;
269				};
270
271				/*
272				 * Unused area between "s_env" and "devinfo".
273				 * Moved here because otherwise the renumbered
274				 * partitions would break the bootloader
275				 * supplied bootargs
276				 */
277				partition@180000 {
278					label = "unused_area";
279					reg = <0x180000 0x780000>;   /* 7.5MB */
280				};
281			};
 
282
283			spi0: spi@10600 {
284				status = "okay";
285
286				spi-flash@0 {
287					#address-cells = <1>;
288					#size-cells = <1>;
289					compatible = "everspin,mr25h256";
290					reg = <0>; /* Chip select 0 */
291					spi-max-frequency = <40000000>;
292				};
293			};
294		};
295	};
296
297	gpio_keys {
298		compatible = "gpio-keys";
299		#address-cells = <1>;
300		#size-cells = <0>;
301		pinctrl-0 = <&keys_pin>;
302		pinctrl-names = "default";
303
304		button@1 {
305			label = "WPS";
306			linux,code = <KEY_WPS_BUTTON>;
307			gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
308		};
309
310		button@2 {
311			label = "Factory Reset Button";
312			linux,code = <KEY_RESTART>;
313			gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
314		};
315	};
316
317	gpio-leds {
318		compatible = "gpio-leds";
319		pinctrl-0 = <&power_led_pin>;
320		pinctrl-names = "default";
321
322		power {
323			label = "mamba:white:power";
324			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
325			default-state = "on";
326		};
327	};
328
329	gpio_fan {
330		/* SUNON HA4010V4-0000-C99 */
331		compatible = "gpio-fan";
332		gpios = <&gpio0 24 0>;
333
334		gpio-fan,speed-map = <0    0
335				      4500 1>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336	};
337
338	dsa@0 {
339		compatible = "marvell,dsa";
340		#address-cells = <2>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341		#size-cells = <0>;
 
342
343		dsa,ethernet = <&eth0>;
344		dsa,mii-bus = <&mdio>;
345
346		switch@0 {
347			#address-cells = <1>;
348			#size-cells = <0>;
349			reg = <0x0 0>;	/* MDIO address 0, switch 0 in tree */
350
351			port@0 {
352				reg = <0>;
353				label = "lan4";
354			};
355
356			port@1 {
357				reg = <1>;
358				label = "lan3";
359			};
360
361			port@2 {
362				reg = <2>;
363				label = "lan2";
364			};
365
366			port@3 {
367				reg = <3>;
368				label = "lan1";
369			};
370
371			port@4 {
372				reg = <4>;
373				label = "internet";
374			};
375
376			port@5 {
377				reg = <5>;
378				label = "cpu";
 
 
 
 
 
379			};
380		};
381	};
382};
383
384&pinctrl {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
386	keys_pin: keys-pin {
387		marvell,pins = "mpp32", "mpp33";
388		marvell,function = "gpio";
389	};
390
391	power_led_pin: power-led-pin {
392		marvell,pins = "mpp40";
393		marvell,function = "gpio";
394	};
 
 
 
395
396	gpio_fan_pin: gpio-fan-pin {
397		marvell,pins = "mpp24";
398		marvell,function = "gpio";
 
 
 
 
 
 
 
 
399	};
400};