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