Linux Audio

Check our new training course

Loading...
v4.17
  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			nand@d0000 {
170				status = "okay";
171				num-cs = <1>;
172				marvell,nand-keep-config;
173				marvell,nand-enable-arbiter;
174				nand-on-flash-bbt;
175				nand-ecc-strength = <4>;
176				nand-ecc-step-size = <512>;
177
178				partition@0 {
179					label = "u-boot";
180					reg = <0x0000000 0x100000>;  /* 1MB */
181					read-only;
182				};
183
184				partition@100000 {
185					label = "u_env";
186					reg = <0x100000 0x40000>;    /* 256KB */
187				};
188
189				partition@140000 {
190					label = "s_env";
191					reg = <0x140000 0x40000>;    /* 256KB */
192				};
193
194				partition@900000 {
195					label = "devinfo";
196					reg = <0x900000 0x100000>;   /* 1MB */
197					read-only;
198				};
199
200				/* kernel1 overlaps with rootfs1 by design */
201				partition@a00000 {
202					label = "kernel1";
203					reg = <0xa00000 0x2800000>;  /* 40MB */
204				};
205
206				partition@d00000 {
207					label = "rootfs1";
208					reg = <0xd00000 0x2500000>;  /* 37MB */
209				};
210
211				/* kernel2 overlaps with rootfs2 by design */
212				partition@3200000 {
213					label = "kernel2";
214					reg = <0x3200000 0x2800000>; /* 40MB */
215				};
216
217				partition@3500000 {
218					label = "rootfs2";
219					reg = <0x3500000 0x2500000>; /* 37MB */
220				};
221
222				/*
223				 * 38MB, last MB is for the BBT, not writable
224				 */
225				partition@5a00000 {
226					label = "syscfg";
227					reg = <0x5a00000 0x2600000>;
228				};
229
230				/*
231				 * Unused area between "s_env" and "devinfo".
232				 * Moved here because otherwise the renumbered
233				 * partitions would break the bootloader
234				 * supplied bootargs
235				 */
236				partition@180000 {
237					label = "unused_area";
238					reg = <0x180000 0x780000>;   /* 7.5MB */
239				};
240			};
241		};
242
243		bm-bppi {
244			status = "okay";
245		};
246	};
247
248	gpio_keys {
249		compatible = "gpio-keys";
250		#address-cells = <1>;
251		#size-cells = <0>;
252		pinctrl-0 = <&keys_pin>;
253		pinctrl-names = "default";
254
255		wps {
256			label = "WPS";
257			linux,code = <KEY_WPS_BUTTON>;
258			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
259		};
260
261		reset {
262			label = "Factory Reset Button";
263			linux,code = <KEY_RESTART>;
264			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
265		};
266	};
267
268	gpio-leds {
269		compatible = "gpio-leds";
270		pinctrl-0 = <&power_led_pin>;
271		pinctrl-names = "default";
272
273		power {
274			label = "mamba:white:power";
275			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
276			default-state = "on";
277		};
278	};
279
280	pwm_fan {
281		/* SUNON HA4010V4-0000-C99 */
 
 
282
283		compatible = "pwm-fan";
284		pwms = <&gpio0 24 4000>;
285	};
286
287	dsa {
288		status = "disabled";
289
290		compatible = "marvell,dsa";
291		#address-cells = <2>;
292		#size-cells = <0>;
293
294		dsa,ethernet = <&eth0>;
295		dsa,mii-bus = <&mdio>;
296
297		switch@0 {
298			#address-cells = <1>;
299			#size-cells = <0>;
300			reg = <0x0 0>;	/* MDIO address 0, switch 0 in tree */
301
302			port@0 {
303				reg = <0>;
304				label = "lan4";
305			};
306
307			port@1 {
308				reg = <1>;
309				label = "lan3";
310			};
311
312			port@2 {
313				reg = <2>;
314				label = "lan2";
315			};
316
317			port@3 {
318				reg = <3>;
319				label = "lan1";
320			};
321
322			port@4 {
323				reg = <4>;
324				label = "internet";
325			};
326
327			port@5 {
328				reg = <5>;
329				label = "cpu";
330			};
331		};
332	};
333};
334
335&pciec {
336	status = "okay";
337
338	/* Etron EJ168 USB 3.0 controller */
339	pcie@1,0 {
340		/* Port 0, Lane 0 */
341		status = "okay";
342	};
343
344	/* First mini-PCIe port */
345	pcie@2,0 {
346		/* Port 0, Lane 1 */
347		status = "okay";
348	};
349
350	/* Second mini-PCIe port */
351	pcie@3,0 {
352		/* Port 0, Lane 3 */
353		status = "okay";
354	};
355};
356
357&pinctrl {
358
359	keys_pin: keys-pin {
360		marvell,pins = "mpp32", "mpp33";
361		marvell,function = "gpio";
362	};
363
364	power_led_pin: power-led-pin {
365		marvell,pins = "mpp40";
366		marvell,function = "gpio";
367	};
368
369	gpio_fan_pin: gpio-fan-pin {
370		marvell,pins = "mpp24";
371		marvell,function = "gpio";
372	};
373};
374
375&spi0 {
376	status = "okay";
377
378	spi-flash@0 {
379		#address-cells = <1>;
380		#size-cells = <1>;
381		compatible = "everspin,mr25h256";
382		reg = <0>; /* Chip select 0 */
383		spi-max-frequency = <40000000>;
384	};
385};
386
387&mdio {
388	status = "okay";
389
390	switch@0 {
391		compatible = "marvell,mv88e6085";
392		#address-cells = <1>;
393		#size-cells = <0>;
394		reg = <0>;
395
396		ports {
397			#address-cells = <1>;
398			#size-cells = <0>;
399
400			port@0 {
401				reg = <0>;
402				label = "lan4";
403			};
404
405			port@1 {
406				reg = <1>;
407				label = "lan3";
408			};
409
410			port@2 {
411				reg = <2>;
412				label = "lan2";
413			};
414
415			port@3 {
416				reg = <3>;
417				label = "lan1";
418			};
419
420			port@4 {
421				reg = <4>;
422				label = "internet";
423			};
424
425			port@5 {
426				reg = <5>;
427				label = "cpu";
428				ethernet = <&eth0>;
429				fixed-link {
430					speed = <1000>;
431					full-duplex;
432				};
433			};
434		};
435	};
436};
v4.10.11
 
  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@0 {
 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		internal-regs {
 77
 78			rtc@10300 {
 79				/* No crystal connected to the internal RTC */
 80				status = "disabled";
 81			};
 82
 83			/* J10: VCC, NC, RX, NC, TX, GND  */
 84			serial@12000 {
 85				status = "okay";
 86			};
 87
 88			sata@a0000 {
 89				nr-ports = <1>;
 90				status = "okay";
 91			};
 92
 93			ethernet@70000 {
 94				pinctrl-0 = <&ge0_rgmii_pins>;
 95				pinctrl-names = "default";
 96				status = "okay";
 97				phy-mode = "rgmii-id";
 
 
 
 98				fixed-link {
 99					speed = <1000>;
100					full-duplex;
101				};
102			};
103
104			ethernet@74000 {
105				pinctrl-0 = <&ge1_rgmii_pins>;
106				pinctrl-names = "default";
107				status = "okay";
108				phy-mode = "rgmii-id";
 
 
 
109				fixed-link {
110					speed = <1000>;
111					full-duplex;
112				};
113			};
114
115			/* USB part of the eSATA/USB 2.0 port */
116			usb@50000 {
117				status = "okay";
118			};
119
120			i2c@11000 {
121				status = "okay";
122				clock-frequency = <100000>;
123
124				tmp421@4c {
125					compatible = "ti,tmp421";
126					reg = <0x4c>;
127				};
128
129				tlc59116@68 {
130					#address-cells = <1>;
131					#size-cells = <0>;
132					#gpio-cells = <2>;
133					compatible = "ti,tlc59116";
134					reg = <0x68>;
135
136					wan_amber@0 {
137						label = "mamba:amber:wan";
138						reg = <0x0>;
139					};
140
141					wan_white@1 {
142						label = "mamba:white:wan";
143						reg = <0x1>;
144					};
145
146					wlan_2g@2 {
147						label = "mamba:white:wlan_2g";
148						reg = <0x2>;
149					};
150
151					wlan_5g@3 {
152						label = "mamba:white:wlan_5g";
153						reg = <0x3>;
154					};
155
156					esata@4 {
157						label = "mamba:white:esata";
158						reg = <0x4>;
 
159					};
160
161					usb2@5 {
162						label = "mamba:white:usb2";
163						reg = <0x5>;
164					};
165
166					usb3_1@6 {
167						label = "mamba:white:usb3_1";
168						reg = <0x6>;
169					};
170
171					usb3_2@7 {
172						label = "mamba:white:usb3_2";
173						reg = <0x7>;
174					};
175
176					wps_white@8 {
177						label = "mamba:white:wps";
178						reg = <0x8>;
179					};
180
181					wps_amber@9 {
182						label = "mamba:amber:wps";
183						reg = <0x9>;
184					};
185				};
186			};
187
 
 
 
 
188			nand@d0000 {
189				status = "okay";
190				num-cs = <1>;
191				marvell,nand-keep-config;
192				marvell,nand-enable-arbiter;
193				nand-on-flash-bbt;
194				nand-ecc-strength = <4>;
195				nand-ecc-step-size = <512>;
196
197				partition@0 {
198					label = "u-boot";
199					reg = <0x0000000 0x100000>;  /* 1MB */
200					read-only;
201				};
202
203				partition@100000 {
204					label = "u_env";
205					reg = <0x100000 0x40000>;    /* 256KB */
206				};
207
208				partition@140000 {
209					label = "s_env";
210					reg = <0x140000 0x40000>;    /* 256KB */
211				};
212
213				partition@900000 {
214					label = "devinfo";
215					reg = <0x900000 0x100000>;   /* 1MB */
216					read-only;
217				};
218
219				/* kernel1 overlaps with rootfs1 by design */
220				partition@a00000 {
221					label = "kernel1";
222					reg = <0xa00000 0x2800000>;  /* 40MB */
223				};
224
225				partition@d00000 {
226					label = "rootfs1";
227					reg = <0xd00000 0x2500000>;  /* 37MB */
228				};
229
230				/* kernel2 overlaps with rootfs2 by design */
231				partition@3200000 {
232					label = "kernel2";
233					reg = <0x3200000 0x2800000>; /* 40MB */
234				};
235
236				partition@3500000 {
237					label = "rootfs2";
238					reg = <0x3500000 0x2500000>; /* 37MB */
239				};
240
241				/*
242				 * 38MB, last MB is for the BBT, not writable
243				 */
244				partition@5a00000 {
245					label = "syscfg";
246					reg = <0x5a00000 0x2600000>;
247				};
248
249				/*
250				 * Unused area between "s_env" and "devinfo".
251				 * Moved here because otherwise the renumbered
252				 * partitions would break the bootloader
253				 * supplied bootargs
254				 */
255				partition@180000 {
256					label = "unused_area";
257					reg = <0x180000 0x780000>;   /* 7.5MB */
258				};
259			};
260		};
 
 
 
 
261	};
262
263	gpio_keys {
264		compatible = "gpio-keys";
265		#address-cells = <1>;
266		#size-cells = <0>;
267		pinctrl-0 = <&keys_pin>;
268		pinctrl-names = "default";
269
270		wps {
271			label = "WPS";
272			linux,code = <KEY_WPS_BUTTON>;
273			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
274		};
275
276		reset {
277			label = "Factory Reset Button";
278			linux,code = <KEY_RESTART>;
279			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
280		};
281	};
282
283	gpio-leds {
284		compatible = "gpio-leds";
285		pinctrl-0 = <&power_led_pin>;
286		pinctrl-names = "default";
287
288		power {
289			label = "mamba:white:power";
290			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
291			default-state = "on";
292		};
293	};
294
295	gpio_fan {
296		/* SUNON HA4010V4-0000-C99 */
297		compatible = "gpio-fan";
298		gpios = <&gpio0 24 0>;
299
300		gpio-fan,speed-map = <0    0
301				      4500 1>;
302	};
303
304	dsa {
 
 
305		compatible = "marvell,dsa";
306		#address-cells = <2>;
307		#size-cells = <0>;
308
309		dsa,ethernet = <&eth0>;
310		dsa,mii-bus = <&mdio>;
311
312		switch@0 {
313			#address-cells = <1>;
314			#size-cells = <0>;
315			reg = <0x0 0>;	/* MDIO address 0, switch 0 in tree */
316
317			port@0 {
318				reg = <0>;
319				label = "lan4";
320			};
321
322			port@1 {
323				reg = <1>;
324				label = "lan3";
325			};
326
327			port@2 {
328				reg = <2>;
329				label = "lan2";
330			};
331
332			port@3 {
333				reg = <3>;
334				label = "lan1";
335			};
336
337			port@4 {
338				reg = <4>;
339				label = "internet";
340			};
341
342			port@5 {
343				reg = <5>;
344				label = "cpu";
345			};
346		};
347	};
348};
349
350&pciec {
351	status = "okay";
352
353	/* Etron EJ168 USB 3.0 controller */
354	pcie@1,0 {
355		/* Port 0, Lane 0 */
356		status = "okay";
357	};
358
359	/* First mini-PCIe port */
360	pcie@2,0 {
361		/* Port 0, Lane 1 */
362		status = "okay";
363	};
364
365	/* Second mini-PCIe port */
366	pcie@3,0 {
367		/* Port 0, Lane 3 */
368		status = "okay";
369	};
370};
371
372&pinctrl {
373
374	keys_pin: keys-pin {
375		marvell,pins = "mpp32", "mpp33";
376		marvell,function = "gpio";
377	};
378
379	power_led_pin: power-led-pin {
380		marvell,pins = "mpp40";
381		marvell,function = "gpio";
382	};
383
384	gpio_fan_pin: gpio-fan-pin {
385		marvell,pins = "mpp24";
386		marvell,function = "gpio";
387	};
388};
389
390&spi0 {
391	status = "okay";
392
393	spi-flash@0 {
394		#address-cells = <1>;
395		#size-cells = <1>;
396		compatible = "everspin,mr25h256";
397		reg = <0>; /* Chip select 0 */
398		spi-max-frequency = <40000000>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399	};
400};