1// SPDX-License-Identifier: ISC
2/*
3 * Device Tree file for Linksys NSLU2
4 */
5
6/dts-v1/;
7
8#include "intel-ixp42x.dtsi"
9#include <dt-bindings/input/input.h>
10
11/ {
12	model = "Linksys NSLU2 (Network Storage Link for USB 2.0 Disk Drives)";
13	compatible = "linksys,nslu2", "intel,ixp42x";
14	#address-cells = <1>;
15	#size-cells = <1>;
16
17	memory@0 {
18		/* 32 MB SDRAM */
19		device_type = "memory";
20		reg = <0x00000000 0x2000000>;
21	};
22
23	chosen {
24		bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
25		stdout-path = "uart0:115200n8";
26	};
27
28	aliases {
29		serial0 = &uart0;
30	};
31
32	leds {
33		compatible = "gpio-leds";
34		led-status {
35			label = "nslu2:red:status";
36			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
37			default-state = "on";
38			linux,default-trigger = "heartbeat";
39		};
40		led-ready {
41			label = "nslu2:green:ready";
42			gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
43			default-state = "on";
44		};
45		led-disk-1 {
46			label = "nslu2:green:disk-1";
47			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
48			default-state = "off";
49		};
50		led-disk-2 {
51			label = "nslu2:green:disk-2";
52			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
53			default-state = "off";
54		};
55	};
56
57	gpio_keys {
58		compatible = "gpio-keys";
59
60		button-power {
61			wakeup-source;
62			linux,code = <KEY_POWER>;
63			label = "power";
64			gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
65		};
66		button-reset {
67			wakeup-source;
68			linux,code = <KEY_ESC>;
69			label = "reset";
70			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
71		};
72	};
73
74	i2c {
75		compatible = "i2c-gpio";
76		sda-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
77		scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
78		#address-cells = <1>;
79		#size-cells = <0>;
80
81		rtc@6f {
82			compatible = "xicor,x1205";
83			reg = <0x6f>;
84		};
85	};
86
87	gpio-poweroff {
88		compatible = "gpio-poweroff";
89		gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
90		timeout-ms = <5000>;
91	};
92
93	/* The first 16MB region on the expansion bus */
94	flash@50000000 {
95		compatible = "intel,ixp4xx-flash", "cfi-flash";
96		bank-width = <2>;
97		/*
98		 * 8 MB of Flash in 0x20000 byte blocks
99		 * mapped in at 0x50000000
100		 */
101		reg = <0x50000000 0x800000>;
102
103		partitions {
104			compatible = "redboot-fis";
105			/* Eraseblock at 0x7e0000 */
106			fis-index-block = <0x3f>;
107		};
108	};
109};
110