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