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