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