lantiq: fix avm fritz box mac addresses
[lede.git] / target / linux / lantiq / dts / FRITZ3370.dts
1 /dts-v1/;
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         model = "FRITZ3370 - Fritz!Box WLAN 3370";
9
10         chosen {
11                 bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
12         };
13
14         aliases {
15                 led-boot = &power_green;
16                 led-failsafe = &power_red;
17                 led-running = &power_green;
18
19                 led-dsl = &dsl;
20                 led-internet = &info_green;
21                 led-wifi = &wifi;
22         };
23
24         memory@0 {
25                 reg = <0x0 0x8000000>;
26         };
27
28         fpi@10000000 {
29                 localbus@0 {
30                         nand-parts@0 {
31                                 compatible = "gen_nand", "lantiq,nand-xway";
32                                 bank-width = <2>;
33                                 reg = <1 0x0 0x2000000>;
34                                 #address-cells = <1>;
35                                 #size-cells = <1>;
36
37                                 partitions {
38                                         compatible = "fixed-partitions";
39                                         #address-cells = <1>;
40                                         #size-cells = <1>;
41
42                                         partition@0 {
43                                                 label = "kernel";
44                                                 reg = <0x0 0x400000>;
45                                         };
46
47                                         partition@400000 {
48                                                 label = "rootfs_ubi";
49                                                 reg = <0x400000 0x3000000>;
50                                         };
51
52                                         partition@3400000 {
53                                                 label = "vr9_firmware";
54                                                 reg = <0x3400000 0x400000>;
55                                         };
56                                         partition@3800000 {
57                                                 label = "reserved";
58                                                 reg = <0x3800000 0x3000000>;
59                                         };
60                                         partition@6800000 {
61                                                 label = "config";
62                                                 reg = <0x6800000 0x200000>;
63                                         };
64                                         partition@6a00000 {
65                                                 label = "nand-filesystem";
66                                                 reg = <0x6a00000 0x1600000>;
67                                         };
68                                 };
69                         };
70                 };
71
72                 gpio: pinmux@E100B10 {
73                         pinctrl-names = "default";
74                         pinctrl-0 = <&state_default>;
75
76                         state_default: pinmux {
77                                 mdio {
78                                         lantiq,groups = "mdio";
79                                         lantiq,function = "mdio";
80                                 };
81                                 nand {
82                                         lantiq,groups = "nand cle", "nand ale",
83                                                         "nand rd", "nand cs1", "nand rdy";
84                                         lantiq,function = "ebu";
85                                         lantiq,pull = <1>;
86                                 };
87                                 phy-rst {
88                                         lantiq,pins = "io37", "io44";
89                                         lantiq,pull = <0>;
90                                         lantiq,open-drain = <0>;
91                                         lantiq,output = <1>;
92                                 };
93                                 pcie-rst {
94                                         lantiq,pins = "io38";
95                                         lantiq,pull = <0>;
96                                         lantiq,output = <1>;
97                                 };
98                         };
99                         pins_spi_default: pins_spi_default {
100                                 spi_in {
101                                         lantiq,groups = "spi_di";
102                                         lantiq,function = "spi";
103                                 };
104                                 spi_out {
105                                         lantiq,groups = "spi_do", "spi_clk",
106                                                 "spi_cs4";
107                                         lantiq,function = "spi";
108                                         lantiq,output = <1>;
109                                 };
110                         };
111                 };
112
113                 ifxhcd@E101000 {
114                         status = "okay";
115                         gpios = <&gpio 5 GPIO_ACTIVE_HIGH
116                                 &gpio 14 GPIO_ACTIVE_HIGH>;
117                         lantiq,portmask = <0x3>;
118                 };
119         };
120
121         gphy-xrx200 {
122                 compatible = "lantiq,phy-xrx200";
123                 firmware = "lantiq/vr9_phy11g_a1x.bin";
124                 phys = [ 00 01 ];
125         };
126
127         gpio-keys-polled {
128                 compatible = "gpio-keys-polled";
129                 #address-cells = <1>;
130                 #size-cells = <0>;
131                 poll-interval = <100>;
132                 power {
133                         label = "power";
134                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
135                         linux,code = <KEY_POWER>;
136                 };
137 /*              wifi {
138                         label = "wifi";
139                         gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
140                         linux,code = <BTN_1>;
141                 };*/
142         };
143
144         gpio-leds {
145                 compatible = "gpio-leds";
146
147                 power_green: power {
148                         label = "fritz3370:green:power";
149                         gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
150                         default-state = "keep";
151                 };
152                 power_red: power2 {
153                         label = "fritz3370:red:power";
154                         gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
155                 };
156                 info_red {
157                         label = "fritz3370:red:info";
158                         gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
159                 };
160                 wifi: wifi {
161                         label = "fritz3370:green:wlan";
162                         gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
163                 };
164                 dsl: dsl {
165                         label = "fritz3370:green:dsl";
166                         gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
167                 };
168                 lan {
169                         label = "fritz3370:green:lan";
170                         gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
171                 };
172                 info_green: info_green {
173                         label = "fritz3370:green:info";
174                         gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
175                 };
176         };
177 };
178
179 &spi {
180         pinctrl-names = "default";
181         pinctrl-0 = <&pins_spi_default>;
182
183         status = "ok";
184
185         m25p80@4 {
186                 #address-cells = <1>;
187                 #size-cells = <1>;
188                 compatible = "jedec,spi-nor";
189                 reg = <4 0>;
190                 spi-max-frequency = <1000000>;
191
192                 urlader: partition@0 {
193                         reg = <0x0 0x20000>;
194                         label = "urlader";
195                         read-only;
196                 };
197
198                 partition@20000 {
199                         reg = <0x20000 0x10000>;
200                         label = "tffs (1)";
201                         read-only;
202                 };
203
204                 partition@30000 {
205                         reg = <0x30000 0x10000>;
206                         label = "tffs (2)";
207                         read-only;
208                 };
209         };
210 };
211
212 &eth0 {
213         lan: interface@0 {
214                 compatible = "lantiq,xrx200-pdi";
215                 #address-cells = <1>;
216                 #size-cells = <0>;
217                 reg = <0>;
218                 mtd-mac-address = <&urlader 0x987>;
219                 mtd-mac-address-increment = <(-2)>;
220                 lantiq,switch;
221
222                 ethernet@0 {
223                         compatible = "lantiq,xrx200-pdi-port";
224                         reg = <0>;
225                         phy-mode = "rgmii";
226                         phy-handle = <&phy0>;
227                         gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
228                 };
229                 ethernet@1 {
230                         compatible = "lantiq,xrx200-pdi-port";
231                         reg = <1>;
232                         phy-mode = "rgmii";
233                         phy-handle = <&phy1>;
234                         gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
235                 };
236                 ethernet@2 {
237                         compatible = "lantiq,xrx200-pdi-port";
238                         reg = <2>;
239                         phy-mode = "gmii";
240                         phy-handle = <&phy11>;
241                 };
242                 ethernet@3 {
243                         compatible = "lantiq,xrx200-pdi-port";
244                         reg = <4>;
245                         phy-mode = "gmii";
246                         phy-handle = <&phy13>;
247                 };
248         };
249
250         mdio@0 {
251                 #address-cells = <1>;
252                 #size-cells = <0>;
253                 compatible = "lantiq,xrx200-mdio";
254                 phy0: ethernet-phy@0 {
255                         reg = <0x0>;
256                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
257                 };
258                 phy1: ethernet-phy@1 {
259                         reg = <0x1>;
260                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
261                 };
262                 phy11: ethernet-phy@11 {
263                         reg = <0x11>;
264                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
265                 };
266                 phy13: ethernet-phy@13 {
267                         reg = <0x13>;
268                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
269                 };
270         };
271 };
272
273 &pcie0 {
274         pcie@0 {
275                 reg = <0 0 0 0 0>;
276                 #interrupt-cells = <1>;
277                 #size-cells = <2>;
278                 #address-cells = <3>;
279                 device_type = "pci";
280
281                 wifi@0,0 {
282                         compatible = "pci0,0";
283                         reg = <0 0 0 0 0>;
284                         qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
285                 };
286         };
287 };