Loading...
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2014 Claudio Leite <leitec@staticky.com>
4 *
5 */
6
7/dts-v1/;
8
9#include "kirkwood.dtsi"
10#include "kirkwood-6281.dtsi"
11
12/ {
13 model = "D-Link DIR-665";
14 compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood";
15
16 memory {
17 device_type = "memory";
18 reg = <0x00000000 0x8000000>; /* 128 MB */
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200n8 earlyprintk";
23 stdout-path = &uart0;
24 };
25
26 ocp@f1000000 {
27 pinctrl: pin-controller@10000 {
28 pinctrl-0 =< &pmx_led_usb
29 &pmx_led_internet_blue
30 &pmx_led_internet_amber
31 &pmx_led_5g &pmx_led_status_blue
32 &pmx_led_wps &pmx_led_status_amber
33 &pmx_led_24g
34 &pmx_btn_restart &pmx_btn_wps>;
35 pinctrl-names = "default";
36
37 pmx_led_usb: pmx-led-usb {
38 marvell,pins = "mpp12";
39 marvell,function = "gpio";
40 };
41 pmx_led_internet_blue: pmx-led-internet-blue {
42 marvell,pins = "mpp42";
43 marvell,function = "gpio";
44 };
45 pmx_led_internet_amber: pmx-led-internet-amber {
46 marvell,pins = "mpp43";
47 marvell,function = "gpio";
48 };
49 pmx_led_5g: pmx-led-5g {
50 marvell,pins = "mpp44";
51 marvell,function = "gpio";
52 };
53 pmx_led_status_blue: pmx-led-status-blue {
54 marvell,pins = "mpp45";
55 marvell,function = "gpio";
56 };
57 pmx_led_wps: pmx-led-wps {
58 marvell,pins = "mpp47";
59 marvell,function = "gpio";
60 };
61 pmx_led_status_amber: pmx-led-status-amber {
62 marvell,pins = "mpp48";
63 marvell,function = "gpio";
64 };
65 pmx_led_24g: pmx-led-24g {
66 marvell,pins = "mpp49";
67 marvell,function = "gpio";
68 };
69 pmx_btn_restart: pmx-btn-restart {
70 marvell,pins = "mpp28";
71 marvell,function = "gpio";
72 };
73 pmx_btn_wps: pmx-btn-wps {
74 marvell,pins = "mpp46";
75 marvell,function = "gpio";
76 };
77 };
78
79 spi@10600 {
80 status = "okay";
81 flash@0 {
82 #address-cells = <1>;
83 #size-cells = <1>;
84 compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
85 spi-max-frequency = <50000000>;
86 reg = <0>;
87
88 partition@0 {
89 label = "uboot";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "nvram";
96 reg = <0x30000 0x10000>;
97 read-only;
98 };
99
100 partition@40000 {
101 label = "kernel";
102 reg = <0x40000 0x180000>;
103 };
104
105 partition@1c0000 {
106 label = "rootfs";
107 reg = <0x1c0000 0xe00000>;
108 };
109
110 cal_data: partition@fc0000 {
111 label = "cal_data";
112 reg = <0xfc0000 0x10000>;
113 read-only;
114 };
115
116 partition@fd0000 {
117 label = "lang_pack";
118 reg = <0xfd0000 0x30000>;
119 read-only;
120 };
121 };
122 };
123
124 serial@12000 {
125 status = "okay";
126 };
127
128 i2c@11000 {
129 status = "okay";
130 };
131
132 ehci@50000 {
133 status = "okay";
134 };
135 };
136
137 gpio-leds {
138 compatible = "gpio-leds";
139
140 blue-usb {
141 label = "dir665:blue:usb";
142 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
143 };
144 blue-internet {
145 /* Can only be turned on if the Internet
146 * Ethernet port has Link
147 */
148 label = "dir665:blue:internet";
149 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
150 };
151 amber-internet {
152 label = "dir665:amber:internet";
153 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
154 };
155 blue-wifi5g {
156 label = "dir665:blue:5g";
157 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
158 };
159 blue-status {
160 label = "dir665:blue:status";
161 gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
162 };
163 blue-wps {
164 label = "dir665:blue:wps";
165 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
166 };
167 amber-status {
168 label = "dir665:amber:status";
169 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
170 };
171 blue-24g {
172 label = "dir665:blue:24g";
173 gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
174 };
175 };
176
177 gpio-keys {
178 compatible = "gpio-keys";
179 #address-cells = <1>;
180 #size-cells = <0>;
181
182 reset {
183 label = "reset";
184 linux,code = <KEY_RESTART>;
185 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
186 };
187 wps {
188 label = "wps";
189 linux,code = <KEY_WPS_BUTTON>;
190 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
191 };
192 };
193};
194
195&mdio {
196 status = "okay";
197
198 switch@0 {
199 compatible = "marvell,mv88e6085";
200 #address-cells = <1>;
201 #size-cells = <0>;
202 reg = <0>;
203
204 ports {
205 #address-cells = <1>;
206 #size-cells = <0>;
207
208 port@0 {
209 reg = <0>;
210 label = "lan4";
211 };
212
213 port@1 {
214 reg = <1>;
215 label = "lan3";
216 };
217
218 port@2 {
219 reg = <2>;
220 label = "lan2";
221 };
222
223 port@3 {
224 reg = <3>;
225 label = "lan1";
226 };
227
228 port@4 {
229 reg = <4>;
230 label = "wan";
231 };
232
233 port@6 {
234 reg = <6>;
235 label = "cpu";
236 ethernet = <ð0port>;
237 fixed-link {
238 speed = <1000>;
239 full-duplex;
240 };
241 };
242 };
243 };
244};
245
246/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
247 * fixed speed and duplex. */
248ð0 {
249 status = "okay";
250
251 ethernet0-port@0 {
252 speed = <1000>;
253 duplex = <1>;
254 };
255};
256
257/* eth1 is connected to the switch as well. However DSA only supports a
258 * single CPU port. So leave this port disabled to avoid confusion. */
259
260ð1 {
261 status = "disabled";
262};
263
264/* There is no battery on the boards, so the RTC does not keep time
265 * when there is no power, making it useless. */
266&rtc {
267 status = "disabled";
268};
269
270&pciec {
271 status = "okay";
272};
273
274&pcie0 {
275 status = "okay";
276};
1/*
2 * Copyright (C) 2014 Claudio Leite <leitec@staticky.com>
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9/dts-v1/;
10
11#include "kirkwood.dtsi"
12#include "kirkwood-6281.dtsi"
13
14/ {
15 model = "D-Link DIR-665";
16 compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood";
17
18 memory {
19 device_type = "memory";
20 reg = <0x00000000 0x8000000>; /* 128 MB */
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200n8 earlyprintk";
25 stdout-path = &uart0;
26 };
27
28 ocp@f1000000 {
29 pinctrl: pin-controller@10000 {
30 pinctrl-0 =< &pmx_led_usb
31 &pmx_led_internet_blue
32 &pmx_led_internet_amber
33 &pmx_led_5g &pmx_led_status_blue
34 &pmx_led_wps &pmx_led_status_amber
35 &pmx_led_24g
36 &pmx_btn_restart &pmx_btn_wps>;
37 pinctrl-names = "default";
38
39 pmx_led_usb: pmx-led-usb {
40 marvell,pins = "mpp12";
41 marvell,function = "gpio";
42 };
43 pmx_led_internet_blue: pmx-led-internet-blue {
44 marvell,pins = "mpp42";
45 marvell,function = "gpio";
46 };
47 pmx_led_internet_amber: pmx-led-internet-amber {
48 marvell,pins = "mpp43";
49 marvell,function = "gpio";
50 };
51 pmx_led_5g: pmx-led-5g {
52 marvell,pins = "mpp44";
53 marvell,function = "gpio";
54 };
55 pmx_led_status_blue: pmx-led-status-blue {
56 marvell,pins = "mpp45";
57 marvell,function = "gpio";
58 };
59 pmx_led_wps: pmx-led-wps {
60 marvell,pins = "mpp47";
61 marvell,function = "gpio";
62 };
63 pmx_led_status_amber: pmx-led-status-amber {
64 marvell,pins = "mpp48";
65 marvell,function = "gpio";
66 };
67 pmx_led_24g: pmx-led-24g {
68 marvell,pins = "mpp49";
69 marvell,function = "gpio";
70 };
71 pmx_btn_restart: pmx-btn-restart {
72 marvell,pins = "mpp28";
73 marvell,function = "gpio";
74 };
75 pmx_btn_wps: pmx-btn-wps {
76 marvell,pins = "mpp46";
77 marvell,function = "gpio";
78 };
79 };
80
81 spi@10600 {
82 status = "okay";
83 m25p80@0 {
84 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
87 spi-max-frequency = <50000000>;
88 reg = <0>;
89
90 partition@0 {
91 label = "uboot";
92 reg = <0x0 0x30000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "nvram";
98 reg = <0x30000 0x10000>;
99 read-only;
100 };
101
102 partition@40000 {
103 label = "kernel";
104 reg = <0x40000 0x180000>;
105 };
106
107 partition@1c0000 {
108 label = "rootfs";
109 reg = <0x1c0000 0xe00000>;
110 };
111
112 cal_data: partition@fc0000 {
113 label = "cal_data";
114 reg = <0xfc0000 0x10000>;
115 read-only;
116 };
117
118 partition@fd0000 {
119 label = "lang_pack";
120 reg = <0xfd0000 0x30000>;
121 read-only;
122 };
123 };
124 };
125
126 serial@12000 {
127 status = "okay";
128 };
129
130 i2c@11000 {
131 status = "okay";
132 };
133
134 ehci@50000 {
135 status = "okay";
136 };
137 };
138
139 gpio-leds {
140 compatible = "gpio-leds";
141
142 blue-usb {
143 label = "dir665:blue:usb";
144 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
145 };
146 blue-internet {
147 /* Can only be turned on if the Internet
148 * Ethernet port has Link
149 */
150 label = "dir665:blue:internet";
151 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
152 };
153 amber-internet {
154 label = "dir665:amber:internet";
155 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
156 };
157 blue-wifi5g {
158 label = "dir665:blue:5g";
159 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
160 };
161 blue-status {
162 label = "dir665:blue:status";
163 gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
164 };
165 blue-wps {
166 label = "dir665:blue:wps";
167 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
168 };
169 amber-status {
170 label = "dir665:amber:status";
171 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
172 };
173 blue-24g {
174 label = "dir665:blue:24g";
175 gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
176 };
177 };
178
179 gpio-keys {
180 compatible = "gpio-keys";
181 #address-cells = <1>;
182 #size-cells = <0>;
183
184 reset {
185 label = "reset";
186 linux,code = <KEY_RESTART>;
187 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
188 };
189 wps {
190 label = "wps";
191 linux,code = <KEY_WPS_BUTTON>;
192 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
193 };
194 };
195
196 dsa {
197 compatible = "marvell,dsa";
198 #address-cells = <2>;
199 #size-cells = <0>;
200
201 dsa,ethernet = <ð0port>;
202 dsa,mii-bus = <&mdio>;
203
204 switch@0 {
205 #address-cells = <1>;
206 #size-cells = <0>;
207 reg = <0 0>; /* MDIO address 0, switch 0 in tree */
208
209 port@0 {
210 reg = <0>;
211 label = "lan4";
212 };
213
214 port@1 {
215 reg = <1>;
216 label = "lan3";
217 };
218
219 port@2 {
220 reg = <2>;
221 label = "lan2";
222 };
223
224 port@3 {
225 reg = <3>;
226 label = "lan1";
227 };
228
229 port@4 {
230 reg = <4>;
231 label = "wan";
232 };
233
234 port@6 {
235 reg = <6>;
236 label = "cpu";
237 };
238 };
239 };
240};
241
242&mdio {
243 status = "okay";
244};
245
246/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
247 * fixed speed and duplex. */
248ð0 {
249 status = "okay";
250
251 ethernet0-port@0 {
252 speed = <1000>;
253 duplex = <1>;
254 };
255};
256
257/* eth1 is connected to the switch as well. However DSA only supports a
258 * single CPU port. So leave this port disabled to avoid confusion. */
259
260ð1 {
261 status = "disabled";
262};
263
264/* There is no battery on the boards, so the RTC does not keep time
265 * when there is no power, making it useless. */
266&rtc {
267 status = "disabled";
268};
269
270&pciec {
271 status = "okay";
272};
273
274&pcie0 {
275 status = "okay";
276};