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