lantiq: dts: fix size cells
[oweals/openwrt.git] / target / linux / lantiq / files / 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         gpio-keys-polled {
38                 compatible = "gpio-keys-polled";
39                 #address-cells = <1>;
40                 #size-cells = <0>;
41                 poll-interval = <100>;
42
43                 power {
44                         label = "power";
45                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_POWER>;
47                 };
48
49                 reset {
50                         label = "reset";
51                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_RESTART>;
53                 };
54
55                 wps {
56                         label = "wps";
57                         gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
58                         linux,code = <KEY_WPS_BUTTON>;
59                 };
60
61                 auto {
62                         label = "auto";
63                         gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
64                         linux,code = <BTN_0>;
65                         linux,input-type = <EV_SW>;
66                 };
67
68                 router {
69                         label = "router";
70                         gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
71                         linux,code = <BTN_1>;
72                         linux,input-type = <EV_SW>;
73                 };
74         };
75
76         gpio-leds {
77                 compatible = "gpio-leds";
78
79                 diag_r: diag_r {
80                         label = "wbmr300:red:diag";
81                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
82                         default_state = "off";
83                 };
84
85                 wifi_g: wifi_g {
86                         label = "wbmr300:green:wifi";
87                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
88                 };
89
90                 dsl: dsl {
91                         label = "dsl";
92                         gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
93                 };
94
95                 router_y: router_y {
96                         label = "wbmr300:yellow:router";
97                         gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
98                 };
99
100                 wifi_y: wifi_y {
101                         label = "wbmr300:yellow:wifi";
102                         gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
103                 };
104
105                 lan1: lan1 {
106                         label = "wbmr300:green:lan1";
107                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
108                 };
109
110                 wan: wan {
111                         label = "wbmr300:green:wan";
112                         gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
113                 };
114
115                 lan3: lan3 {
116                         label = "wbmr300:green:lan3";
117                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
118                 };
119
120                 lan2: lan2 {
121                         label = "wbmr300:green:lan2";
122                         gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
123                 };
124
125                 internet_g: internet_g {
126                         label = "wbmr300:green:internet";
127                         gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
128                 };
129
130                 internet_y: internet_y {
131                         label = "wbmr300:yellow:internet";
132                         gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
133                 };
134
135                 router_g: router_g {
136                         label = "wbmr300:green:router";
137                         gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
138                 };
139
140                 power_g: power_g {
141                         label = "wbmr300:green:power";
142                         gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
143                 };
144         };
145
146         usb_vbus: regulator-usb-vbus {
147                 compatible = "regulator-fixed";
148
149                 regulator-name = "USB_VBUS";
150
151                 regulator-min-microvolt = <5000000>;
152                 regulator-max-microvolt = <5000000>;
153
154                 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
155                 enable-active-high;
156         };
157 };
158
159 &eth0 {
160         lan: interface@0 {
161                 compatible = "lantiq,xrx200-pdi";
162                 #address-cells = <1>;
163                 #size-cells = <0>;
164                 reg = <0>;
165                 lantiq,switch;
166
167                 ethernet@1 {
168                         compatible = "lantiq,xrx200-pdi-port";
169                         reg = <4>;
170                         phy-mode = "mii";
171                         phy-handle = <&phy13>;
172                 };
173                 ethernet@2 {
174                         compatible = "lantiq,xrx200-pdi-port";
175                         reg = <5>;
176                         phy-mode = "mii";
177                         phy-handle = <&phy14>;
178                 };
179                 ethernet@3 {
180                         compatible = "lantiq,xrx200-pdi-port";
181                         reg = <2>;
182                         phy-mode = "mii";
183                         phy-handle = <&phy11>;
184                 };
185                 ethernet@4 {
186                         compatible = "lantiq,xrx200-pdi-port";
187                         reg = <3>;
188                         phy-mode = "mii";
189                         phy-handle = <&phy12>;
190                 };
191         };
192
193         mdio {
194                 #address-cells = <1>;
195                 #size-cells = <0>;
196                 compatible = "lantiq,xrx200-mdio";
197
198                 phy11: ethernet-phy@11 {
199                         reg = <0x11>;
200                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
201                 };
202                 phy12: ethernet-phy@12 {
203                         reg = <0x12>;
204                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
205                 };
206                 phy13: ethernet-phy@13 {
207                         reg = <0x13>;
208                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
209                 };
210                 phy14: ethernet-phy@14 {
211                         reg = <0x14>;
212                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
213                 };
214         };
215 };
216
217 &gphy0 {
218         lantiq,gphy-mode = <GPHY_MODE_FE>;
219 };
220
221 &gphy1 {
222         lantiq,gphy-mode = <GPHY_MODE_FE>;
223 };
224
225 &gpio {
226         pinctrl-names = "default";
227         pinctrl-0 = <&state_default>;
228
229         state_default: pinmux {
230                 mdio {
231                         lantiq,groups = "mdio";
232                         lantiq,function = "mdio";
233                 };
234                 phy-rst {
235                         lantiq,pins = "io42";
236                         lantiq,pull = <0>;
237                         lantiq,open-drain = <0>;
238                         lantiq,output = <1>;
239                 };
240                 pcie-rst {
241                         lantiq,pins = "io38";
242                         lantiq,pull = <0>;
243                         lantiq,output = <1>;
244                 };
245         };
246         pins_spi_default: pins_spi_default {
247                 spi_in {
248                         lantiq,groups = "spi_di";
249                         lantiq,function = "spi";
250                 };
251                 spi_out {
252                         lantiq,groups = "spi_do", "spi_clk",
253                                 "spi_cs4";
254                         lantiq,function = "spi";
255                         lantiq,output = <1>;
256                 };
257         };
258 };
259
260 &spi {
261         status = "okay";
262
263         pinctrl-names = "default";
264         pinctrl-0 = <&pins_spi_default>;
265
266         m25p80@4 {
267                 #address-cells = <1>;
268                 #size-cells = <1>;
269                 compatible = "jedec,spi-nor";
270                 reg = <4>;
271                 spi-max-frequency = <20000000>;
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 &usb_phy0 {
315         status = "okay";
316 };
317
318 &usb_phy1 {
319         status = "okay";
320 };
321
322 &usb0 {
323         status = "okay";
324         vbus-supply = <&usb_vbus>;
325 };
326
327 &usb1 {
328         status = "okay";
329         vbus-supply = <&usb_vbus>;
330 };