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