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