280266305130364275604d6f528b6a4ad3c7a114
[openwrt/staging/mkresin.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_buffalo_wbmr-300hpd.dts
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7 compatible = "buffalo,wbmr-300hpd", "lantiq,xway", "lantiq,vr9";
8 model = "Buffalo WBMR-300HPD";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_g;
16 led-failsafe = &diag_r;
17 led-running = &power_g;
18 led-upgrade = &power_g;
19
20 led-dsl = &dsl;
21 led-internet = &router_g;
22 led-wifi = &wifi_g;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x4000000>;
28 };
29
30 gpio_poweroff {
31 compatible = "gpio-poweroff";
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
33 };
34
35 keys {
36 compatible = "gpio-keys-polled";
37 poll-interval = <100>;
38
39 power {
40 label = "power";
41 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_POWER>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56
57 auto {
58 label = "auto";
59 gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
60 linux,code = <BTN_0>;
61 linux,input-type = <EV_SW>;
62 };
63
64 router {
65 label = "router";
66 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
67 linux,code = <BTN_1>;
68 linux,input-type = <EV_SW>;
69 };
70 };
71
72 leds {
73 compatible = "gpio-leds";
74
75 diag_r: diag_r {
76 label = "red:diag";
77 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
78 default_state = "off";
79 };
80
81 wifi_g: wifi_g {
82 label = "green:wifi";
83 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
84 };
85
86 dsl: dsl {
87 label = "dsl";
88 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
89 };
90
91 router_y: router_y {
92 label = "yellow:router";
93 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
94 };
95
96 wifi_y: wifi_y {
97 label = "yellow:wifi";
98 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
99 };
100
101 lan1: lan1 {
102 label = "green:lan1";
103 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
104 };
105
106 wan: wan {
107 label = "green:wan";
108 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
109 };
110
111 lan3: lan3 {
112 label = "green:lan3";
113 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
114 };
115
116 lan2: lan2 {
117 label = "green:lan2";
118 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
119 };
120
121 internet_g: internet_g {
122 label = "green:internet";
123 gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
124 };
125
126 internet_y: internet_y {
127 label = "yellow:internet";
128 gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
129 };
130
131 router_g: router_g {
132 label = "green:router";
133 gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
134 };
135
136 power_g: power_g {
137 label = "green:power";
138 gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
139 };
140 };
141
142 usb_vbus: regulator-usb-vbus {
143 compatible = "regulator-fixed";
144
145 regulator-name = "USB_VBUS";
146
147 regulator-min-microvolt = <5000000>;
148 regulator-max-microvolt = <5000000>;
149
150 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
151 enable-active-high;
152 };
153 };
154
155 &eth0 {
156 lan: interface@0 {
157 compatible = "lantiq,xrx200-pdi";
158 #address-cells = <1>;
159 #size-cells = <0>;
160 reg = <0>;
161 lantiq,switch;
162
163 ethernet@2 {
164 compatible = "lantiq,xrx200-pdi-port";
165 reg = <2>;
166 phy-mode = "mii";
167 phy-handle = <&phy11>;
168 };
169 ethernet@3 {
170 compatible = "lantiq,xrx200-pdi-port";
171 reg = <3>;
172 phy-mode = "mii";
173 phy-handle = <&phy12>;
174 };
175 ethernet@4 {
176 compatible = "lantiq,xrx200-pdi-port";
177 reg = <4>;
178 phy-mode = "mii";
179 phy-handle = <&phy13>;
180 };
181 ethernet@5 {
182 compatible = "lantiq,xrx200-pdi-port";
183 reg = <5>;
184 phy-mode = "mii";
185 phy-handle = <&phy14>;
186 };
187 };
188
189 mdio {
190 #address-cells = <1>;
191 #size-cells = <0>;
192 compatible = "lantiq,xrx200-mdio";
193
194 phy11: ethernet-phy@11 {
195 reg = <0x11>;
196 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
197 };
198 phy12: ethernet-phy@12 {
199 reg = <0x12>;
200 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
201 };
202 phy13: ethernet-phy@13 {
203 reg = <0x13>;
204 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
205 };
206 phy14: ethernet-phy@14 {
207 reg = <0x14>;
208 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
209 };
210 };
211 };
212
213 &gphy0 {
214 lantiq,gphy-mode = <GPHY_MODE_FE>;
215 };
216
217 &gphy1 {
218 lantiq,gphy-mode = <GPHY_MODE_FE>;
219 };
220
221 &gpio {
222 pinctrl-names = "default";
223 pinctrl-0 = <&state_default>;
224
225 state_default: pinmux {
226 phy-rst {
227 lantiq,pins = "io42";
228 lantiq,pull = <0>;
229 lantiq,open-drain = <0>;
230 lantiq,output = <1>;
231 };
232 pcie-rst {
233 lantiq,pins = "io38";
234 lantiq,pull = <0>;
235 lantiq,output = <1>;
236 };
237 };
238 };
239
240 &spi {
241 status = "okay";
242
243 flash@4 {
244 compatible = "jedec,spi-nor";
245 reg = <4>;
246 spi-max-frequency = <20000000>;
247
248 partitions {
249 #address-cells = <1>;
250 #size-cells = <1>;
251
252 partition@0 {
253 reg = <0x0 0x10000>;
254 label = "u-boot";
255 read-only;
256 };
257
258 partition@10000 {
259 reg = <0x10000 0x10000>;
260 label = "gphyfirmware";
261 read-only;
262 };
263
264 partition@20000 {
265 reg = <0x20000 0x80000>;
266 label = "dsl_fw";
267 };
268
269 partition@de0000 {
270 reg = <0xa0000 0xf40000>;
271 label = "firmware";
272 };
273
274 partition@fe0000 {
275 reg = <0xfe0000 0x10000>;
276 label = "sysconfig";
277 read-only;
278 };
279
280 partition@ff0000 {
281 reg = <0xff0000 0x2000>;
282 label = "u-boot-env";
283 };
284
285 partition@ff3000 {
286 reg = <0xff3000 0x2000>;
287 label = "board_config";
288 read-only;
289 };
290 };
291 };
292 };
293
294 &usb_phy0 {
295 status = "okay";
296 };
297
298 &usb_phy1 {
299 status = "okay";
300 };
301
302 &usb0 {
303 status = "okay";
304 vbus-supply = <&usb_vbus>;
305 };
306
307 &usb1 {
308 status = "okay";
309 vbus-supply = <&usb_vbus>;
310 };