ipq806x: fix EA8500 switch control
[openwrt/openwrt.git] / target / linux / ipq806x / files-4.14 / arch / arm / boot / dts / qcom-ipq8064-ea8500.dts
1 #include "qcom-ipq8064-v2.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "Linksys EA8500 WiFi Router";
7 compatible = "linksys,ea8500", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 reserved-memory {
15 #address-cells = <1>;
16 #size-cells = <1>;
17 ranges;
18 rsvd@41200000 {
19 reg = <0x41200000 0x300000>;
20 no-map;
21 };
22 };
23
24 aliases {
25 serial0 = &gsbi4_serial;
26 mdio-gpio0 = &mdio0;
27
28 led-boot = &power;
29 led-failsafe = &power;
30 led-running = &power;
31 led-upgrade = &power;
32 };
33
34 chosen {
35 bootargs = "console=ttyMSM0,115200n8";
36 linux,stdout-path = "serial0:115200n8";
37 append-rootblock = "ubi.mtd="; /* append to bootargs adding the root deviceblock nbr from bootloader */
38 };
39
40 soc {
41 pinmux@800000 {
42
43 pinctrl-0 = <&switch_reset>;
44 pinctrl-names = "default";
45
46 button_pins: button_pins {
47 mux {
48 pins = "gpio65", "gpio67", "gpio68";
49 function = "gpio";
50 drive-strength = <2>;
51 bias-pull-up;
52 };
53 };
54
55 i2c4_pins: i2c4_pinmux {
56 mux {
57 pins = "gpio12", "gpio13";
58 function = "gsbi4";
59 drive-strength = <12>;
60 bias-disable;
61 };
62 };
63
64 led_pins: led_pins {
65 mux {
66 pins = "gpio6", "gpio53", "gpio54";
67 function = "gpio";
68 drive-strength = <2>;
69 bias-pull-up;
70 };
71 };
72
73 switch_reset: switch_reset_pins {
74 mux {
75 pins = "gpio63";
76 function = "gpio";
77 drive-strength = <2>;
78 bias-disable;
79 output-low;
80 };
81 };
82
83 mdio0_pins: mdio0_pins {
84 mux {
85 pins = "gpio0", "gpio1";
86 function = "gpio";
87 drive-strength = <8>;
88 bias-disable;
89 };
90 };
91
92 nand_pins: nand_pins {
93 mux {
94 pins = "gpio34", "gpio35", "gpio36",
95 "gpio37", "gpio38", "gpio39",
96 "gpio40", "gpio41", "gpio42",
97 "gpio43", "gpio44", "gpio45",
98 "gpio46", "gpio47";
99 function = "nand";
100 drive-strength = <10>;
101 bias-disable;
102 };
103 pullups {
104 pins = "gpio39";
105 bias-pull-up;
106 };
107 hold {
108 pins = "gpio40", "gpio41", "gpio42",
109 "gpio43", "gpio44", "gpio45",
110 "gpio46", "gpio47";
111 bias-bus-hold;
112 };
113 };
114
115 rgmii2_pins: rgmii2_pins {
116 mux {
117 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
118 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
119 function = "rgmii2";
120 drive-strength = <8>;
121 bias-disable;
122 };
123 };
124 };
125
126 gsbi@16300000 {
127 qcom,mode = <GSBI_PROT_I2C_UART>;
128 status = "ok";
129 serial@16340000 {
130 status = "ok";
131 };
132 /*
133 * The i2c device on gsbi4 should not be enabled.
134 * On ipq806x designs gsbi4 i2c is meant for exclusive
135 * RPM usage. Turning this on in kernel manifests as
136 * i2c failure for the RPM.
137 */
138 };
139
140 sata-phy@1b400000 {
141 status = "ok";
142 };
143
144 sata@29000000 {
145 status = "ok";
146 };
147
148 phy@100f8800 { /* USB3 port 1 HS phy */
149 status = "ok";
150 };
151
152 phy@100f8830 { /* USB3 port 1 SS phy */
153 status = "ok";
154 };
155
156 phy@110f8800 { /* USB3 port 0 HS phy */
157 status = "ok";
158 };
159
160 phy@110f8830 { /* USB3 port 0 SS phy */
161 status = "ok";
162 };
163
164 usb30@0 {
165 status = "ok";
166 };
167
168 usb30@1 {
169 status = "ok";
170 };
171
172 pcie0: pci@1b500000 {
173 status = "ok";
174 force_gen1 = <1>;
175 };
176
177 pcie1: pci@1b700000 {
178 status = "ok";
179 };
180
181 nand@1ac00000 {
182 status = "ok";
183
184 pinctrl-0 = <&nand_pins>;
185 pinctrl-names = "default";
186
187 cs0 {
188 reg = <0>;
189 compatible = "qcom,nandcs";
190
191 nand-ecc-strength = <4>;
192 nand-bus-width = <8>;
193 nand-ecc-step-size = <512>;
194
195 partitions {
196 compatible = "fixed-partitions";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 SBL1@0 {
201 label = "SBL1";
202 reg = <0x0000000 0x0040000>;
203 read-only;
204 };
205
206 MIBIB@40000 {
207 label = "MIBIB";
208 reg = <0x0040000 0x0140000>;
209 read-only;
210 };
211
212 SBL2@180000 {
213 label = "SBL2";
214 reg = <0x0180000 0x0140000>;
215 read-only;
216 };
217
218 SBL3@2c0000 {
219 label = "SBL3";
220 reg = <0x02c0000 0x0280000>;
221 read-only;
222 };
223
224 DDRCONFIG@540000 {
225 label = "DDRCONFIG";
226 reg = <0x0540000 0x0120000>;
227 read-only;
228 };
229
230 SSD@660000 {
231 label = "SSD";
232 reg = <0x0660000 0x0120000>;
233 read-only;
234 };
235
236 TZ@780000 {
237 label = "TZ";
238 reg = <0x0780000 0x0280000>;
239 read-only;
240 };
241
242 RPM@a00000 {
243 label = "RPM";
244 reg = <0x0a00000 0x0280000>;
245 read-only;
246 };
247
248 art: art@c80000 {
249 label = "art";
250 reg = <0x0c80000 0x0140000>;
251 read-only;
252 };
253
254 APPSBL@dc0000 {
255 label = "APPSBL";
256 reg = <0x0dc0000 0x0100000>;
257 read-only;
258 };
259
260 u_env@ec0000 {
261 label = "u_env";
262 reg = <0x0ec0000 0x0040000>;
263 };
264
265 s_env@f00000 {
266 label = "s_env";
267 reg = <0x0f00000 0x0040000>;
268 };
269
270 devinfo@f40000 {
271 label = "devinfo";
272 reg = <0x0f40000 0x0040000>;
273 };
274
275 linux@f80000 {
276 label = "kernel1";
277 reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs*/
278 };
279
280 rootfs@1280000 {
281 label = "rootfs1";
282 reg = <0x1280000 0x2500000>;
283 };
284
285 linux2@3780000 {
286 label = "kernel2";
287 reg = <0x3780000 0x2800000>;
288 };
289
290 rootfs2@3a80000 {
291 label = "rootfs2";
292 reg = <0x3a80000 0x2500000>;
293 };
294
295 syscfg@5f80000 {
296 label = "syscfg";
297 reg = <0x5f80000 0x2080000>;
298 };
299 };
300 };
301 };
302
303 mdio0: mdio {
304 compatible = "virtual,mdio-gpio";
305 #address-cells = <1>;
306 #size-cells = <0>;
307 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
308 pinctrl-0 = <&mdio0_pins>;
309 pinctrl-names = "default";
310
311 phy0: ethernet-phy@0 {
312 device_type = "ethernet-phy";
313 reg = <0>;
314 qca,ar8327-initvals = <
315 0x00004 0x7600000 /* PAD0_MODE */
316 0x00008 0x1000000 /* PAD5_MODE */
317 0x0000c 0x80 /* PAD6_MODE */
318 0x000e4 0x6a545 /* MAC_POWER_SEL */
319 0x000e0 0xc74164de /* SGMII_CTRL */
320 0x0007c 0x4e /* PORT0_STATUS */
321 0x00094 0x4e /* PORT6_STATUS */
322 >;
323 };
324
325 phy4: ethernet-phy@4 {
326 device_type = "ethernet-phy";
327 reg = <4>;
328 };
329 };
330
331 gmac1: ethernet@37200000 {
332 status = "ok";
333 phy-mode = "rgmii";
334 qcom,id = <1>;
335 qcom,phy_mdio_addr = <4>;
336 qcom,poll_required = <1>;
337 qcom,rgmii_delay = <0>;
338 qcom,emulation = <0>;
339 pinctrl-0 = <&rgmii2_pins>;
340 pinctrl-names = "default";
341 fixed-link {
342 speed = <1000>;
343 full-duplex;
344 };
345 };
346 //lan
347 gmac2: ethernet@37400000 {
348 status = "ok";
349 phy-mode = "sgmii";
350 qcom,id = <2>;
351 qcom,phy_mdio_addr = <0>; /* none */
352 qcom,poll_required = <0>; /* no polling */
353 qcom,rgmii_delay = <0>;
354 qcom,emulation = <0>;
355 fixed-link {
356 speed = <1000>;
357 full-duplex;
358 };
359 };
360
361 rpm@108000 {
362 pinctrl-0 = <&i2c4_pins>;
363 pinctrl-names = "default";
364 };
365
366 adm_dma: dma@18300000 {
367 status = "ok";
368 };
369 };
370
371 gpio-keys {
372 compatible = "gpio-keys";
373 pinctrl-0 = <&button_pins>;
374 pinctrl-names = "default";
375
376 wifi {
377 label = "wifi";
378 gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
379 linux,code = <KEY_RFKILL>;
380 };
381
382 reset {
383 label = "reset";
384 gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
385 linux,code = <KEY_RESTART >;
386 };
387
388 wps {
389 label = "wps";
390 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
391 linux,code = <KEY_WPS_BUTTON>;
392 };
393 };
394
395 gpio-leds {
396 compatible = "gpio-leds";
397 pinctrl-0 = <&led_pins>;
398 pinctrl-names = "default";
399
400 wps {
401 label = "ea8500:green:wps";
402 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
403 };
404
405 power: power {
406 label = "ea8500:white:power";
407 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
408 default-state = "keep";
409 };
410
411 wifi {
412 label = "ea8500:green:wifi";
413 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
414 };
415 };
416 };
417
418 /delete-node/ &pcie2_pins;
419 /delete-node/ &pcie2;
420