lantiq: board.d: set lan mac address only where necessary
[oweals/openwrt.git] / target / linux / lantiq / dts / TDW89X0.dtsi
1 /include/ "vr9.dtsi"
2
3 / {
4         chosen {
5                 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
6
7                 leds {
8                         /* the power led can't be controlled, use the wps led instead */
9                         boot = &wps;
10                         failsafe = &wps;
11
12                         dsl = &dsl;
13                         internet = &internet;
14                         usb = &usb0;
15                         usb2 = &usb2;
16                 };
17         };
18
19         memory@0 {
20                 reg = <0x0 0x4000000>;
21         };
22
23         fpi@10000000 {
24                 gpio: pinmux@E100B10 {
25                         pinctrl-names = "default";
26                         pinctrl-0 = <&state_default>;
27
28                         state_default: pinmux {
29                                 mdio {
30                                         lantiq,groups = "mdio";
31                                         lantiq,function = "mdio";
32                                 };
33                                 gphy-leds {
34                                         lantiq,groups = "gphy0 led1", "gphy1 led1";
35                                         lantiq,function = "gphy";
36                                         lantiq,pull = <2>;
37                                         lantiq,open-drain = <0>;
38                                         lantiq,output = <1>;
39                                 };
40                                 phy-rst {
41                                         lantiq,pins = "io42";
42                                         lantiq,pull = <0>;
43                                         lantiq,open-drain = <0>;
44                                         lantiq,output = <1>;
45                                 };
46                                 pcie-rst {
47                                         lantiq,pins = "io38";
48                                         lantiq,pull = <0>;
49                                         lantiq,output = <1>;
50                                 };
51                         };
52                         pins_spi_default: pins_spi_default {
53                                 spi_in {
54                                         lantiq,groups = "spi_di";
55                                         lantiq,function = "spi";
56                                 };
57                                 spi_out {
58                                         lantiq,groups = "spi_do", "spi_clk",
59                                                 "spi_cs4";
60                                         lantiq,function = "spi";
61                                         lantiq,output = <1>;
62                                 };
63                         };
64                 };
65
66                 ifxhcd@E101000 {
67                         status = "okay";
68                         gpios = <&gpio 33 0>;
69                         lantiq,portmask = <0x3>;
70                 };
71
72                 ifxhcd@E106000 {
73                         status = "okay";
74                         gpios = <&gpio 33 0>;
75                 };
76         };
77
78         gphy-xrx200 {
79                 compatible = "lantiq,phy-xrx200";
80                 firmware = "lantiq/vr9_phy11g_a2x.bin";
81                 phys = [ 00 01 ];
82         };
83
84         ath9k_eep {
85                 compatible = "ath9k,eeprom";
86                 ath,eep-flash = <&ath9k_cal 0x21000>;
87                 ath,mac-offset = <0xf100>;
88                 ath,mac-increment = <2>;
89                 ath,led-pin = <0>;
90                 ath,disable-5ghz;
91                 ath,led-active-high;
92         };
93
94         gpio-keys-polled {
95                 compatible = "gpio-keys-polled";
96                 #address-cells = <1>;
97                 #size-cells = <0>;
98                 poll-interval = <100>;
99                 reset {
100                         label = "reset";
101                         gpios = <&gpio 0 1>;
102                         linux,code = <0x198>;
103                 };
104
105                 wifi {
106                         label = "wifi";
107                         gpios = <&gpio 9 0>;
108                         linux,code = <0xf7>;
109                         linux,input-type = <5>; /* EV_SW */
110                 };
111
112                 wps {
113                         label = "wps";
114                         gpios = <&gpio 39 1>;
115                         linux,code = <0x211>;
116                 };
117         };
118
119         gpio-leds {
120                 compatible = "gpio-leds";
121                 /*
122                         power is not controllable via gpio
123         */
124                 dsl: dsl {
125                         label = "tdw89x0:green:dsl";
126                         gpios = <&gpio 4 0>;
127                 };
128                 internet: internet {
129                         label = "tdw89x0:green:internet";
130                         gpios = <&gpio 5 0>;
131                 };
132                 usb0: usb0 {
133                         label = "tdw89x0:green:usb";
134                         gpios = <&gpio 19 0>;
135                 };
136                 usb2: usb2 {
137                         label = "tdw89x0:green:usb2";
138                         gpios = <&gpio 20 0>;
139                 };
140                 wps: wps {
141                         label = "tdw89x0:green:wps";
142                         gpios = <&gpio 37 0>;
143                 };
144         };
145 };
146
147 &spi {
148         pinctrl-names = "default";
149         pinctrl-0 = <&pins_spi_default>;
150
151         status = "ok";
152
153         m25p80@4 {
154                 #address-cells = <1>;
155                 #size-cells = <1>;
156                 compatible = "jedec,spi-nor";
157                 reg = <4 0>;
158                 spi-max-frequency = <33250000>;
159                 m25p,fast-read;
160
161                 partitions {
162                         compatible = "fixed-partitions";
163                         #address-cells = <1>;
164                         #size-cells = <1>;
165
166                         partition@0 {
167                                 reg = <0x0 0x20000>;
168                                 label = "u-boot";
169                                 read-only;
170                         };
171
172                         partition@20000 {
173                                 reg = <0x20000 0x7a0000>;
174                                 label = "firmware";
175                         };
176
177                         partition@7c0000 {
178                                 reg = <0x7c0000 0x10000>;
179                                 label = "config";
180                                 read-only;
181                         };
182
183                         ath9k_cal: partition@7d0000 {
184                                 reg = <0x7d0000 0x30000>;
185                                 label = "boardconfig";
186                                 read-only;
187                         };
188                 };
189         };
190 };
191
192 &eth0 {
193         lan: interface@0 {
194                 compatible = "lantiq,xrx200-pdi";
195                 #address-cells = <1>;
196                 #size-cells = <0>;
197                 reg = <0>;
198                 mtd-mac-address = <&ath9k_cal 0xf100>;
199                 lantiq,switch;
200
201                 ethernet@0 {
202                         compatible = "lantiq,xrx200-pdi-port";
203                         reg = <0>;
204                         phy-mode = "rgmii";
205                         phy-handle = <&phy0>;
206                         // gpios = <&gpio 42 1>;
207                 };
208                 ethernet@5 {
209                         compatible = "lantiq,xrx200-pdi-port";
210                         reg = <5>;
211                         phy-mode = "rgmii";
212                         phy-handle = <&phy5>;
213                 };
214                 ethernet@2 {
215                         compatible = "lantiq,xrx200-pdi-port";
216                         reg = <2>;
217                         phy-mode = "gmii";
218                         phy-handle = <&phy11>;
219                 };
220                 ethernet@3 {
221                         compatible = "lantiq,xrx200-pdi-port";
222                         reg = <4>;
223                         phy-mode = "gmii";
224                         phy-handle = <&phy13>;
225                 };
226         };
227
228         mdio@0 {
229                 #address-cells = <1>;
230                 #size-cells = <0>;
231                 compatible = "lantiq,xrx200-mdio";
232                 phy0: ethernet-phy@0 {
233                         reg = <0x0>;
234                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
235                 };
236                 phy5: ethernet-phy@5 {
237                         reg = <0x5>;
238                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
239                 };
240                 phy11: ethernet-phy@11 {
241                         reg = <0x11>;
242                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
243                 };
244                 phy13: ethernet-phy@13 {
245                         reg = <0x13>;
246                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
247                 };
248         };
249 };