WIP: ipq806x: switch reset fix
[openwrt/staging/ynezz.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 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 button_pins: button_pins {
44 mux {
45 pins = "gpio65", "gpio67", "gpio68";
46 function = "gpio";
47 drive-strength = <2>;
48 bias-pull-up;
49 };
50 };
51
52 i2c4_pins: i2c4_pinmux {
53 mux {
54 pins = "gpio12", "gpio13";
55 function = "gsbi4";
56 drive-strength = <12>;
57 bias-disable;
58 };
59 };
60
61 led_pins: led_pins {
62 mux {
63 pins = "gpio6", "gpio53", "gpio54";
64 function = "gpio";
65 drive-strength = <2>;
66 bias-pull-up;
67 };
68 };
69
70 switch_reset: switch_reset_pins {
71 mux {
72 pins = "gpio63";
73 function = "gpio";
74 drive-strength = <2>;
75 bias-disable;
76 output-low;
77 };
78 };
79
80 mdio0_pins: mdio0_pins {
81 mux {
82 pins = "gpio0", "gpio1";
83 function = "gpio";
84 drive-strength = <8>;
85 bias-disable;
86 };
87 };
88
89 nand_pins: nand_pins {
90 mux {
91 pins = "gpio34", "gpio35", "gpio36",
92 "gpio37", "gpio38", "gpio39",
93 "gpio40", "gpio41", "gpio42",
94 "gpio43", "gpio44", "gpio45",
95 "gpio46", "gpio47";
96 function = "nand";
97 drive-strength = <10>;
98 bias-disable;
99 };
100 pullups {
101 pins = "gpio39";
102 bias-pull-up;
103 };
104 hold {
105 pins = "gpio40", "gpio41", "gpio42",
106 "gpio43", "gpio44", "gpio45",
107 "gpio46", "gpio47";
108 bias-bus-hold;
109 };
110 };
111
112 rgmii2_pins: rgmii2_pins {
113 mux {
114 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
115 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
116 function = "rgmii2";
117 drive-strength = <8>;
118 bias-disable;
119 };
120 };
121 };
122
123 gsbi@16300000 {
124 qcom,mode = <GSBI_PROT_I2C_UART>;
125 status = "ok";
126 serial@16340000 {
127 status = "ok";
128 };
129 /*
130 * The i2c device on gsbi4 should not be enabled.
131 * On ipq806x designs gsbi4 i2c is meant for exclusive
132 * RPM usage. Turning this on in kernel manifests as
133 * i2c failure for the RPM.
134 */
135 };
136
137 sata-phy@1b400000 {
138 status = "ok";
139 };
140
141 sata@29000000 {
142 status = "ok";
143 };
144
145 phy@100f8800 { /* USB3 port 1 HS phy */
146 status = "ok";
147 };
148
149 phy@100f8830 { /* USB3 port 1 SS phy */
150 status = "ok";
151 };
152
153 phy@110f8800 { /* USB3 port 0 HS phy */
154 status = "ok";
155 };
156
157 phy@110f8830 { /* USB3 port 0 SS phy */
158 status = "ok";
159 };
160
161 usb30@0 {
162 status = "ok";
163 };
164
165 usb30@1 {
166 status = "ok";
167 };
168
169 pcie0: pci@1b500000 {
170 status = "ok";
171 force_gen1 = <1>;
172 };
173
174 pcie1: pci@1b700000 {
175 status = "ok";
176 };
177
178 nand@1ac00000 {
179 status = "ok";
180
181 pinctrl-0 = <&nand_pins>;
182 pinctrl-names = "default";
183
184 cs0 {
185 reg = <0>;
186 compatible = "qcom,nandcs";
187
188 nand-ecc-strength = <4>;
189 nand-bus-width = <8>;
190 nand-ecc-step-size = <512>;
191
192 partitions {
193 compatible = "fixed-partitions";
194 #address-cells = <1>;
195 #size-cells = <1>;
196
197 SBL1@0 {
198 label = "SBL1";
199 reg = <0x0000000 0x0040000>;
200 read-only;
201 };
202
203 MIBIB@40000 {
204 label = "MIBIB";
205 reg = <0x0040000 0x0140000>;
206 read-only;
207 };
208
209 SBL2@180000 {
210 label = "SBL2";
211 reg = <0x0180000 0x0140000>;
212 read-only;
213 };
214
215 SBL3@2c0000 {
216 label = "SBL3";
217 reg = <0x02c0000 0x0280000>;
218 read-only;
219 };
220
221 DDRCONFIG@540000 {
222 label = "DDRCONFIG";
223 reg = <0x0540000 0x0120000>;
224 read-only;
225 };
226
227 SSD@660000 {
228 label = "SSD";
229 reg = <0x0660000 0x0120000>;
230 read-only;
231 };
232
233 TZ@780000 {
234 label = "TZ";
235 reg = <0x0780000 0x0280000>;
236 read-only;
237 };
238
239 RPM@a00000 {
240 label = "RPM";
241 reg = <0x0a00000 0x0280000>;
242 read-only;
243 };
244
245 art: art@c80000 {
246 label = "art";
247 reg = <0x0c80000 0x0140000>;
248 read-only;
249 };
250
251 APPSBL@dc0000 {
252 label = "APPSBL";
253 reg = <0x0dc0000 0x0100000>;
254 read-only;
255 };
256
257 u_env@ec0000 {
258 label = "u_env";
259 reg = <0x0ec0000 0x0040000>;
260 };
261
262 s_env@f00000 {
263 label = "s_env";
264 reg = <0x0f00000 0x0040000>;
265 };
266
267 devinfo@f40000 {
268 label = "devinfo";
269 reg = <0x0f40000 0x0040000>;
270 };
271
272 linux@f80000 {
273 label = "kernel1";
274 reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs*/
275 };
276
277 rootfs@1280000 {
278 label = "rootfs1";
279 reg = <0x1280000 0x2500000>;
280 };
281
282 linux2@3780000 {
283 label = "kernel2";
284 reg = <0x3780000 0x2800000>;
285 };
286
287 rootfs2@3a80000 {
288 label = "rootfs2";
289 reg = <0x3a80000 0x2500000>;
290 };
291
292 syscfg@5f80000 {
293 label = "syscfg";
294 reg = <0x5f80000 0x2080000>;
295 };
296 };
297 };
298 };
299
300 mdio0: mdio {
301 compatible = "virtual,mdio-gpio";
302 #address-cells = <1>;
303 #size-cells = <0>;
304
305 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
306
307 pinctrl-0 = <&mdio0_pins &switch_reset>;
308 pinctrl-names = "default";
309
310 reset-gpios = <&qcom_pinmux 63 GPIO_ACTIVE_LOW>;
311 reset-delay-us = <12000>;
312
313 phy0: ethernet-phy@0 {
314 reg = <0>;
315 qca,ar8327-initvals = <
316 0x00004 0x7600000 /* PAD0_MODE */
317 0x00008 0x1000000 /* PAD5_MODE */
318 0x0000c 0x80 /* PAD6_MODE */
319 0x000e4 0x6a545 /* MAC_POWER_SEL */
320 0x000e0 0xc74164de /* SGMII_CTRL */
321 0x0007c 0x4e /* PORT0_STATUS */
322 0x00094 0x4e /* PORT6_STATUS */
323 >;
324 };
325
326 phy4: ethernet-phy@4 {
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 adm_dma: dma@18300000 {
362 status = "ok";
363 };
364 };
365
366 keys {
367 compatible = "gpio-keys";
368 pinctrl-0 = <&button_pins>;
369 pinctrl-names = "default";
370
371 wifi {
372 label = "wifi";
373 gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
374 linux,code = <KEY_RFKILL>;
375 };
376
377 reset {
378 label = "reset";
379 gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
380 linux,code = <KEY_RESTART >;
381 };
382
383 wps {
384 label = "wps";
385 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
386 linux,code = <KEY_WPS_BUTTON>;
387 };
388 };
389
390 leds {
391 compatible = "gpio-leds";
392 pinctrl-0 = <&led_pins>;
393 pinctrl-names = "default";
394
395 wps {
396 label = "ea8500:green:wps";
397 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
398 };
399
400 power: power {
401 label = "ea8500:white:power";
402 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
403 default-state = "keep";
404 };
405
406 wifi {
407 label = "ea8500:green:wifi";
408 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
409 };
410 };
411 };
412
413 /delete-node/ &pcie2_pins;
414 /delete-node/ &pcie2;