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