summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/kirkwood-dir665.dts
blob: 4d2b15d6244ad4ee38fbd881f336f059a66a3d05 (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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
/*
 * Copyright (C) 2014 Claudio Leite <leitec@staticky.com>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "D-Link DIR-665";
	compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x8000000>; /* 128 MB */
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-0 =< &pmx_led_usb
				     &pmx_led_internet_blue
				     &pmx_led_internet_amber
				     &pmx_led_5g &pmx_led_status_blue
				     &pmx_led_wps &pmx_led_status_amber
				     &pmx_led_24g
				     &pmx_btn_restart &pmx_btn_wps>;
			pinctrl-names = "default";

			pmx_led_usb: pmx-led-usb {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};
			pmx_led_internet_blue: pmx-led-internet-blue {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};
			pmx_led_internet_amber: pmx-led-internet-amber {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};
			pmx_led_5g: pmx-led-5g {
				marvell,pins = "mpp44";
				marvell,function = "gpio";
			};
			pmx_led_status_blue: pmx-led-status-blue {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};
			pmx_led_wps: pmx-led-wps {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
			pmx_led_status_amber: pmx-led-status-amber {
				marvell,pins = "mpp48";
				marvell,function = "gpio";
			};
			pmx_led_24g: pmx-led-24g {
				marvell,pins = "mpp49";
				marvell,function = "gpio";
			};
			pmx_btn_restart: pmx-btn-restart {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
			pmx_btn_wps: pmx-btn-wps {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};
		};

		spi@10600 {
			status = "okay";
			m25p80@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				reg = <0>;

				partition@0 {
					label = "uboot";
					reg = <0x0 0x30000>;
					read-only;
				};

				partition@30000 {
					label = "nvram";
					reg = <0x30000 0x10000>;
					read-only;
				};

				partition@40000 {
					label = "kernel";
					reg = <0x40000 0x180000>;
				};

				partition@1c0000 {
					label = "rootfs";
					reg = <0x1c0000 0xe00000>;
				};

				cal_data: partition@fc0000 {
					label = "cal_data";
					reg = <0xfc0000 0x10000>;
					read-only;
				};

				partition@fd0000 {
					label = "lang_pack";
					reg = <0xfd0000 0x30000>;
					read-only;
				};
			};
		};

		serial@12000 {
			status = "okay";
		};

		i2c@11000 {
			status = "okay";
		};

		ehci@50000 {
			status = "okay";
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		blue-usb {
			label = "dir665:blue:usb";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
		blue-internet {
			/* Can only be turned on if the Internet
			 * Ethernet port has Link
			 */
			label = "dir665:blue:internet";
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};
		amber-internet {
			label = "dir665:amber:internet";
			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
		};
		blue-wifi5g {
			label = "dir665:blue:5g";
			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
		};
		blue-status {
			label = "dir665:blue:status";
			gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
		};
		blue-wps {
			label = "dir665:blue:wps";
			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
		};
		amber-status {
			label = "dir665:amber:status";
			gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
		};
		blue-24g {
			label = "dir665:blue:24g";
			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
		};
		wps {
			label = "wps";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
		};
	};

	dsa {
		status = "disabled";

		compatible = "marvell,dsa";
		#address-cells = <2>;
		#size-cells = <0>;

		dsa,ethernet = <&eth0port>;
		dsa,mii-bus = <&mdio>;

		switch@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0 0>;	/* MDIO address 0, switch 0 in tree */

			port@0 {
				reg = <0>;
				label = "lan4";
			};

			port@1 {
			       reg = <1>;
			       label = "lan3";
			};

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

			port@3 {
			       reg = <3>;
			       label = "lan1";
			};

			port@4 {
				reg = <4>;
				label = "wan";
			};

			port@6 {
			       reg = <6>;
			       label = "cpu";
			};
		};
	};
};

&mdio {
	status = "okay";

	switch@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;

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

			port@0 {
				reg = <0>;
				label = "lan4";
			};

			port@1 {
			       reg = <1>;
			       label = "lan3";
			};

			port@2 {
			       reg = <2>;
			       label = "lan2";
			};

			port@3 {
			       reg = <3>;
			       label = "lan1";
			};

			port@4 {
				reg = <4>;
				label = "wan";
			};

			port@6 {
				reg = <6>;
				label = "cpu";
				ethernet = <&eth0port>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
 * fixed speed and duplex. */
&eth0 {
	status = "okay";

	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

/* eth1 is connected to the switch as well. However DSA only supports a
 * single CPU port. So leave this port disabled to avoid confusion. */

&eth1 {
	status = "disabled";
};

/* There is no battery on the boards, so the RTC does not keep time
 * when there is no power, making it useless. */
&rtc {
	status = "disabled";
};

&pciec {
        status = "okay";
};

&pcie0 {
	status = "okay";
};