6d9349f853c5c632ceec3830ecfeb1f60a9bc0a9
[librecmc/librecmc.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-r7800.dts
1 #include "qcom-ipq8065-v1.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6         model = "Netgear Nighthawk X4S R7800";
7         compatible = "netgear,r7800", "qcom,ipq8065";
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                 rsvd@5fe00000 {
24                         reg = <0x5fe00000 0x200000>;
25                         reusable;
26                 };
27         };
28
29         aliases {
30                 serial0 = &uart4;
31                 mdio-gpio0 = &mdio0;
32         };
33
34         chosen {
35                 bootargs = "rootfstype=squashfs noinitrd";
36                 linux,stdout-path = "serial0:115200n8";
37         };
38
39         soc {
40                 pinmux@800000 {
41                         pinctrl-0 = <&mdio0_pins &rgmii2_pins>;
42                         pinctrl-names = "default";
43
44                         i2c4_pins: i2c4_pinmux {
45                                 mux {
46                                         pins = "gpio12", "gpio13";
47                                         function = "gsbi4";
48                                         drive-strength = <12>;
49                                         bias-disable;
50                                 };
51                         };
52
53                         nand_pins: nand_pins {
54                                 mux {
55                                         pins = "gpio34", "gpio35", "gpio36",
56                                                "gpio37", "gpio38", "gpio39",
57                                                "gpio40", "gpio41", "gpio42",
58                                                "gpio43", "gpio44", "gpio45",
59                                                "gpio46", "gpio47";
60                                         function = "nand";
61                                         drive-strength = <10>;
62                                         bias-disable;
63                                 };
64                                 pullups {
65                                         pins = "gpio39";
66                                         bias-pull-up;
67                                 };
68                                 hold {
69                                         pins = "gpio40", "gpio41", "gpio42",
70                                                "gpio43", "gpio44", "gpio45",
71                                                "gpio46", "gpio47";
72                                         bias-bus-hold;
73                                 };
74                         };
75
76                         mdio0_pins: mdio0_pins {
77                                 mux {
78                                         pins = "gpio0", "gpio1";
79                                         function = "gpio";
80                                         drive-strength = <8>;
81                                         bias-disable;
82                                 };
83
84                                 clk {
85                                         pins = "gpio1";
86                                         input-disable;
87                                 };
88                         };
89
90                         rgmii2_pins: rgmii2_pins {
91                                 mux {
92                                         pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
93                                                "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
94                                         function = "rgmii2";
95                                         drive-strength = <8>;
96                                         bias-disable;
97                                 };
98
99                                 tx {
100                                         pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
101                                         input-disable;
102                                 };
103                         };
104
105                         spi_pins: spi_pins {
106                                 mux {
107                                         pins = "gpio18", "gpio19", "gpio21";
108                                         function = "gsbi5";
109                                         drive-strength = <10>;
110                                         bias-none;
111                                 };
112
113                                 cs {
114                                         pins = "gpio20";
115                                         drive-strength = <12>;
116                                 };
117                         };
118                 };
119
120                 gsbi@16300000 {
121                         qcom,mode = <GSBI_PROT_I2C_UART>;
122                         status = "ok";
123                         serial@16340000 {
124                                 status = "ok";
125                         };
126                         /*
127                          * The i2c device on gsbi4 should not be enabled.
128                          * On ipq806x designs gsbi4 i2c is meant for exclusive
129                          * RPM usage. Turning this on in kernel manifests as
130                          * i2c failure for the RPM.
131                          */
132                 };
133
134                 gsbi5: gsbi@1a200000 {
135                         qcom,mode = <GSBI_PROT_SPI>;
136                         status = "ok";
137
138                         spi4: spi@1a280000 {
139                                 status = "ok";
140                                 spi-max-frequency = <50000000>;
141                                 pinctrl-0 = <&spi_pins>;
142                                 pinctrl-names = "default";
143
144                                 cs-gpios = <&qcom_pinmux 20 0>;
145
146                                 flash: m25p80@0 {
147                                         compatible = "s25fl512s";
148                                         #address-cells = <1>;
149                                         #size-cells = <1>;
150                                         spi-max-frequency = <51200000>;
151                                         reg = <0>;
152
153                                         linux,part-probe = "qcom-smem";
154                                 };
155                         };
156                 };
157
158                 sata-phy@1b400000 {
159                         status = "ok";
160                 };
161
162                 sata@29000000 {
163                         status = "ok";
164                 };
165
166                 phy@100f8800 {          /* USB3 port 1 HS phy */
167                         status = "ok";
168                 };
169
170                 phy@100f8830 {          /* USB3 port 1 SS phy */
171                         status = "ok";
172                 };
173
174                 phy@110f8800 {          /* USB3 port 0 HS phy */
175                         status = "ok";
176                 };
177
178                 phy@110f8830 {          /* USB3 port 0 SS phy */
179                         status = "ok";
180                 };
181
182                 usb30@0 {
183                         status = "ok";
184                 };
185
186                 usb30@1 {
187                         status = "ok";
188                 };
189
190                 pcie0: pci@1b500000 {
191                         status = "ok";
192                         reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
193                         pinctrl-0 = <&pcie0_pins>;
194                         pinctrl-names = "default";
195                 };
196
197                 pcie1: pci@1b700000 {
198                         status = "ok";
199                         reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
200                         pinctrl-0 = <&pcie1_pins>;
201                         pinctrl-names = "default";
202                 };
203
204                 nand@1ac00000 {
205                         status = "ok";
206
207                         pinctrl-0 = <&nand_pins>;
208                         pinctrl-names = "default";
209
210                         nand-ecc-strength = <4>;
211                         nand-bus-width = <8>;
212
213                         #address-cells = <1>;
214                         #size-cells = <1>;
215
216                         qcadata@0 {
217                                 label = "qcadata";
218                                 reg = <0x0000000 0x0c80000>;
219                                 read-only;
220                         };
221
222                         APPSBL@c80000 {
223                                 label = "APPSBL";
224                                 reg = <0x0c80000 0x0500000>;
225                                 read-only;
226                         };
227
228                         APPSBLENV@1180000 {
229                                 label = "APPSBLENV";
230                                 reg = <0x1180000 0x0080000>;
231                                 read-only;
232                         };
233
234                         art: art@1200000 {
235                                 label = "art";
236                                 reg = <0x1200000 0x0140000>;
237                                 read-only;
238                         };
239
240                         artbak: art@1340000 {
241                                 label = "artbak";
242                                 reg = <0x1340000 0x0140000>;
243                                 read-only;
244                         };
245
246                         kernel@1480000 {
247                                 label = "kernel";
248                                 reg = <0x1480000 0x0200000>;
249                         };
250
251                         ubi@1680000 {
252                                 label = "ubi";
253                                 reg = <0x1680000 0x1E00000>;
254                         };
255
256                         netgear@3480000 {
257                                 label = "netgear";
258                                 reg = <0x3480000 0x4480000>;
259                                 read-only;
260                         };
261
262                         reserve@7900000 {
263                                 label = "reserve";
264                                 reg = <0x7900000 0x0700000>;
265                                 read-only;
266                         };
267
268                         firmware@1480000 {
269                                 label = "firmware";
270                                 reg = <0x1480000 0x2000000>;
271                         };
272
273                 };
274
275                 mdio0: mdio {
276                         compatible = "virtual,mdio-gpio";
277                         #address-cells = <1>;
278                         #size-cells = <0>;
279                         gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
280
281                         phy0: ethernet-phy@0 {
282                                 device_type = "ethernet-phy";
283                                 reg = <0>;
284                                 qca,ar8327-initvals = <
285                                         0x00004 0x7600000   /* PAD0_MODE */
286                                         0x00008 0x1000000   /* PAD5_MODE */
287                                         0x0000c 0x80        /* PAD6_MODE */
288                                         0x000e4 0xaa545     /* MAC_POWER_SEL */
289                                         0x000e0 0xc74164de  /* SGMII_CTRL */
290                                         0x0007c 0x4e        /* PORT0_STATUS */
291                                         0x00094 0x4e        /* PORT6_STATUS */
292                                         0x00970 0x1e864443  /* QM_PORT0_CTRL0 */
293                                         0x00974 0x000001c6  /* QM_PORT0_CTRL1 */
294                                         0x00978 0x19008643  /* QM_PORT1_CTRL0 */
295                                         0x0097c 0x000001c6  /* QM_PORT1_CTRL1 */
296                                         0x00980 0x19008643  /* QM_PORT2_CTRL0 */
297                                         0x00984 0x000001c6  /* QM_PORT2_CTRL1 */
298                                         0x00988 0x19008643  /* QM_PORT3_CTRL0 */
299                                         0x0098c 0x000001c6  /* QM_PORT3_CTRL1 */
300                                         0x00990 0x19008643  /* QM_PORT4_CTRL0 */
301                                         0x00994 0x000001c6  /* QM_PORT4_CTRL1 */
302                                         0x00998 0x1e864443  /* QM_PORT5_CTRL0 */
303                                         0x0099c 0x000001c6  /* QM_PORT5_CTRL1 */
304                                         0x009a0 0x1e864443  /* QM_PORT6_CTRL0 */
305                                         0x009a4 0x000001c6  /* QM_PORT6_CTRL1 */
306                                         >;
307                         };
308
309                         phy4: ethernet-phy@4 {
310                                 device_type = "ethernet-phy";
311                                 reg = <4>;
312                                 qca,ar8327-initvals = <
313                                         0x000e4 0x6a545     /* MAC_POWER_SEL */
314                                         0x0000c 0x80        /* PAD6_MODE */
315                                         >;
316                         };
317                 };
318
319                 gmac1: ethernet@37200000 {
320                         status = "ok";
321                         phy-mode = "rgmii";
322                         qcom,id = <1>;
323                         qcom,phy_mdio_addr = <4>;
324                         qcom,poll_required = <0>;
325                         qcom,rgmii_delay = <1>;
326                         qcom,phy_mii_type = <0>;
327                         qcom,emulation = <0>;
328                         qcom,irq = <255>;
329                         mdiobus = <&mdio0>;
330
331                         mtd-mac-address = <&art 6>;
332
333                         fixed-link {
334                                 speed = <1000>;
335                                 full-duplex;
336                         };
337                 };
338
339                 gmac2: ethernet@37400000 {
340                         status = "ok";
341                         phy-mode = "sgmii";
342                         qcom,id = <2>;
343                         qcom,phy_mdio_addr = <0>;       /* none */
344                         qcom,poll_required = <0>;       /* no polling */
345                         qcom,rgmii_delay = <0>;
346                         qcom,phy_mii_type = <1>;
347                         qcom,emulation = <0>;
348                         qcom,irq = <258>;
349                         mdiobus = <&mdio0>;
350
351                         mtd-mac-address = <&art 0>;
352
353                         fixed-link {
354                                 speed = <1000>;
355                                 full-duplex;
356                         };
357                 };
358
359                 rpm@108000 {
360                         pinctrl-0 = <&i2c4_pins>;
361                         pinctrl-names = "default";
362                 };
363         };
364
365         gpio-keys {
366                 compatible = "gpio-keys";
367
368                 wifi {
369                         label = "wifi";
370                         gpios = <&qcom_pinmux 6 1>;
371                         linux,code = <KEY_WLAN>;
372                 };
373
374                 reset {
375                         label = "reset";
376                         gpios = <&qcom_pinmux 54 1>;
377                         linux,code = <KEY_RESTART>;
378                 };
379
380                 wps {
381                         label = "wps";
382                         gpios = <&qcom_pinmux 65 1>;
383                         linux,code = <KEY_WPS_BUTTON>;
384                 };
385         };
386
387         gpio-leds {
388                 compatible = "gpio-leds";
389
390                 usb1 {
391                         label = "r7800:amber:usb1";
392                         gpios = <&qcom_pinmux 7 0>;
393                 };
394
395                 usb3 {
396                         label = "r7800:amber:usb3";
397                         gpios = <&qcom_pinmux 8 0>;
398                 };
399
400                 status {
401                         label = "r7800:amber:status";
402                         gpios = <&qcom_pinmux 9 0>;
403                 };
404
405                 internet {
406                         label = "r7800:white:internet";
407                         gpios = <&qcom_pinmux 22 0>;
408                 };
409
410                 wan {
411                         label = "r7800:white:wan";
412                         gpios = <&qcom_pinmux 23 0>;
413                 };
414
415                 wps {
416                         label = "r7800:white:wps";
417                         gpios = <&qcom_pinmux 24 0>;
418                 };
419
420                 esata {
421                         label = "r7800:white:esata";
422                         gpios = <&qcom_pinmux 26 0>;
423                 };
424
425                 power {
426                         label = "r7800:white:power";
427                         gpios = <&qcom_pinmux 53 0>;
428                         default-state = "on";
429                 };
430
431                 rfkill {
432                         label = "r7800:white:rfkill";
433                         gpios = <&qcom_pinmux 64 0>;
434                 };
435
436                 wifi {
437                         label = "r7800:white:wifi";
438                         gpios = <&qcom_pinmux 67 0>;
439                 };
440         };
441
442         gpio_export {
443                 compatible = "gpio-export";
444                 #size-cells = <0>;
445
446                 display_data {
447                         gpio-export,name = "usb0";
448                         gpio-export,output = <1>;
449                         gpios = <&qcom_pinmux 15 0>;
450                 };
451
452                 display_clock {
453                         gpio-export,name = "usb1";
454                         gpio-export,output = <1>;
455                         gpios = <&qcom_pinmux 16 0>;
456                 };
457         };
458 };
459
460 &adm_dma {
461         status = "ok";
462 };