summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/intel-ixp42x-freecom-fsg-3.dts
blob: b740403b05a92906f64eba56e663713c2648de85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
// SPDX-License-Identifier: ISC
/*
 * Device Tree file for the Freecom FSG-3 router.
 * This machine is based on IXP425.
 * This device tree is inspired by the board file by Rod Whitby.
 */

/dts-v1/;

#include "intel-ixp42x.dtsi"
#include <dt-bindings/input/input.h>

/ {
	model = "Freecom FSG-3";
	compatible = "freecom,fsg-3", "intel,ixp42x";
	#address-cells = <1>;
	#size-cells = <1>;

	memory@0 {
		/* 64 MB memory */
		device_type = "memory";
		reg = <0x00000000 0x4000000>;
	};

	chosen {
		/* Boot from the first partition on the hard drive */
		bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootfstype=ext4 rootwait";
		stdout-path = "uart0:115200n8";
	};

	aliases {
		serial0 = &uart0;
	};

	gpio_keys {
		compatible = "gpio-keys";

		button-sync {
			wakeup-source;
			/* Closest approximation of what the key should do */
			linux,code = <KEY_CONNECT>;
			label = "sync";
			gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
		};
		button-reset {
			wakeup-source;
			linux,code = <KEY_ESC>;
			label = "reset";
			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
		};
		button-usb {
			wakeup-source;
			/* Unplug USB, closest approximation of what the key should do */
			linux,code = <KEY_EJECTCD>;
			label = "usb";
			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
		};
	};

	i2c {
		compatible = "i2c-gpio";
		sda-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		scl-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		#address-cells = <1>;
		#size-cells = <0>;

		hwmon@28 {
			/*
			 * Temperature sensor and fan control chip.
			 *
			 * TODO: create a proper device tree binding for
			 * the sensor and temperature zone and create a
			 * zone with fan control.
			 */
			compatible = "winbond,w83781d";
			reg = <0x28>;
		};
		rtc@6f {
			compatible = "isil,isl1208";
			reg = <0x6f>;
		};
	};

	soc {
		bus@c4000000 {
			flash@0,0 {
				compatible = "intel,ixp4xx-flash", "cfi-flash";
				bank-width = <2>;
				/* Enable writes on the expansion bus */
				intel,ixp4xx-eb-write-enable = <1>;
				/* 4 MB of Flash mapped in at CS0 */
				reg = <0 0x00000000 0x400000>;

				partitions {
					compatible = "redboot-fis";
					/* Eraseblock at 0x3e0000 */
					fis-index-block = <0x1f>;
				};
			};

			/* Small syscon with some LEDs at CS2 */
			syscon@2,0 {
				compatible = "freecom,fsg-cs2-system-controller", "syscon";
				reg = <2 0x0 0x200>;
				reg-io-width = <2>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <2 0x0 0x0 0x200>;

				led@0,0 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x01>;
					label = "fsg:blue:wlan";
					linux,default-trigger = "wlan";
					default-state = "on";
				};
				led@0,1 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x02>;
					label = "fsg:blue:wan";
					linux,default-trigger = "";
					default-state = "on";
				};
				led@0,2 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x04>;
					label = "fsg:blue:sata";
					linux,default-trigger = "";
					default-state = "on";
				};
				led@0,3 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x04>;
					label = "fsg:blue:usb";
					linux,default-trigger = "";
					default-state = "on";
				};
				led@0,4 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x08>;
					label = "fsg:blue:sync";
					linux,default-trigger = "";
					default-state = "on";
				};
				led@0,5 {
					compatible = "register-bit-led";
					reg = <0x00 0x02>;
					mask = <0x10>;
					label = "fsg:blue:ring";
					linux,default-trigger = "";
					default-state = "on";
				};
			};
		};

		pci@c0000000 {
			status = "ok";

			/*
			 * Written based on the FSG-3 PCI boardfile.
			 * We have slots 12, 13 & 14 (IDSEL) with one IRQ each.
			 */
			#interrupt-cells = <1>;
			interrupt-map-mask = <0xf800 0 0 7>;
			interrupt-map =
			/* IDSEL 12 */
			<0x6000 0 0 1 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 12 is irq 5 */
			<0x6000 0 0 2 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 12 is irq 5 */
			<0x6000 0 0 3 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 12 is irq 5 */
			<0x6000 0 0 4 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 12 is irq 5 */
			/* IDSEL 13 */
			<0x6800 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 13 is irq 7 */
			<0x6800 0 0 2 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 13 is irq 7 */
			<0x6800 0 0 3 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 13 is irq 7 */
			<0x6800 0 0 4 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 13 is irq 7 */
			/* IDSEL 14 */
			<0x7000 0 0 1 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 6 */
			<0x7000 0 0 2 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 14 is irq 6 */
			<0x7000 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 14 is irq 6 */
			<0x7000 0 0 4 &gpio0 6 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 14 is irq 6 */
		};

		/* EthB */
		ethernet@c8009000 {
			status = "ok";
			queue-rx = <&qmgr 3>;
			queue-txready = <&qmgr 20>;
			phy-mode = "rgmii";
			phy-handle = <&phy5>;

			mdio {
				#address-cells = <1>;
				#size-cells = <0>;

				phy4: ethernet-phy@4 {
					reg = <4>;
				};

				phy5: ethernet-phy@5 {
					reg = <5>;
				};
			};
		};

		/* EthC */
		ethernet@c800a000 {
			status = "ok";
			queue-rx = <&qmgr 4>;
			queue-txready = <&qmgr 21>;
			phy-mode = "rgmii";
			phy-handle = <&phy4>;
		};
	};
};