lantiq: add swconfig to the default packages
[oweals/openwrt.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         ath9k_eep {
122                 compatible = "ath9k,eeprom";
123                 ath,eep-flash = <&ath9k_cal 0x985>;
124                 ath,eep-endian;
125                 ath,eep-swap;
126         };
127
128         gphy-xrx200 {
129                 compatible = "lantiq,phy-xrx200";
130                 firmware = "lantiq/vr9_phy11g_a1x.bin";
131                 phys = [ 00 01 ];
132         };
133
134         gpio-keys-polled {
135                 compatible = "gpio-keys-polled";
136                 #address-cells = <1>;
137                 #size-cells = <0>;
138                 poll-interval = <100>;
139                 power {
140                         label = "power";
141                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
142                         linux,code = <KEY_POWER>;
143                 };
144 /*              wifi {
145                         label = "wifi";
146                         gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
147                         linux,code = <BTN_1>;
148                 };*/
149         };
150
151         gpio-leds {
152                 compatible = "gpio-leds";
153
154                 power_green: power {
155                         label = "fritz3370:green:power";
156                         gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
157                         default-state = "keep";
158                 };
159                 power_red: power2 {
160                         label = "fritz3370:red:power";
161                         gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
162                 };
163                 info_red {
164                         label = "fritz3370:red:info";
165                         gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
166                 };
167                 wifi: wifi {
168                         label = "fritz3370:green:wlan";
169                         gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
170                 };
171                 dsl: dsl {
172                         label = "fritz3370:green:dsl";
173                         gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
174                 };
175                 lan {
176                         label = "fritz3370:green:lan";
177                         gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
178                 };
179                 info_green: info_green {
180                         label = "fritz3370:green:info";
181                         gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
182                 };
183         };
184 };
185
186 &spi {
187         pinctrl-names = "default";
188         pinctrl-0 = <&pins_spi_default>;
189
190         status = "ok";
191
192         m25p80@4 {
193                 #address-cells = <1>;
194                 #size-cells = <1>;
195                 compatible = "jedec,spi-nor";
196                 reg = <4 0>;
197                 spi-max-frequency = <1000000>;
198
199                 ath9k_cal: partition@0 {
200                         reg = <0x0 0x20000>;
201                         label = "urlader";
202                         read-only;
203                 };
204
205                 partition@20000 {
206                         reg = <0x20000 0x10000>;
207                         label = "tffs (1)";
208                         read-only;
209                 };
210
211                 partition@30000 {
212                         reg = <0x30000 0x10000>;
213                         label = "tffs (2)";
214                         read-only;
215                 };
216         };
217 };
218
219 &eth0 {
220         lan: interface@0 {
221                 compatible = "lantiq,xrx200-pdi";
222                 #address-cells = <1>;
223                 #size-cells = <0>;
224                 reg = <0>;
225                 mac-address = [ 00 11 22 33 44 55 ];
226                 lantiq,switch;
227
228                 ethernet@0 {
229                         compatible = "lantiq,xrx200-pdi-port";
230                         reg = <0>;
231                         phy-mode = "rgmii";
232                         phy-handle = <&phy0>;
233                         gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
234                 };
235                 ethernet@1 {
236                         compatible = "lantiq,xrx200-pdi-port";
237                         reg = <1>;
238                         phy-mode = "rgmii";
239                         phy-handle = <&phy1>;
240                         gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
241                 };
242                 ethernet@2 {
243                         compatible = "lantiq,xrx200-pdi-port";
244                         reg = <2>;
245                         phy-mode = "gmii";
246                         phy-handle = <&phy11>;
247                 };
248                 ethernet@3 {
249                         compatible = "lantiq,xrx200-pdi-port";
250                         reg = <4>;
251                         phy-mode = "gmii";
252                         phy-handle = <&phy13>;
253                 };
254         };
255
256         mdio@0 {
257                 #address-cells = <1>;
258                 #size-cells = <0>;
259                 compatible = "lantiq,xrx200-mdio";
260                 phy0: ethernet-phy@0 {
261                         reg = <0x0>;
262                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
263                 };
264                 phy1: ethernet-phy@1 {
265                         reg = <0x1>;
266                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
267                 };
268                 phy11: ethernet-phy@11 {
269                         reg = <0x11>;
270                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
271                 };
272                 phy13: ethernet-phy@13 {
273                         reg = <0x13>;
274                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
275                 };
276         };
277 };