ipq806x: introduce ipq8064 SoC v2 dtsi
[oweals/openwrt.git] / target / linux / ipq806x / files-4.14 / arch / arm / boot / dts / qcom-ipq8064-d7800.dts
1 #include "qcom-ipq8064-v1.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6         model = "Netgear Nighthawk X4 D7800";
7         compatible = "netgear,d7800", "qcom,ipq8064";
8
9         memory@0 {
10                 reg = <0x42000000 0xe000000>;
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_white;
29                 led-failsafe = &power_amber;
30                 led-running = &power_white;
31                 led-upgrade = &power_amber;
32         };
33
34         chosen {
35                 bootargs = "rootfstype=squashfs noinitrd";
36                 linux,stdout-path = "serial0:115200n8";
37         };
38
39         soc {
40                 pinmux@800000 {
41                         button_pins: button_pins {
42                                 mux {
43                                         pins = "gpio6", "gpio54", "gpio65";
44                                         function = "gpio";
45                                         drive-strength = <2>;
46                                         bias-pull-up;
47                                 };
48                         };
49
50                         i2c4_pins: i2c4_pinmux {
51                                 mux {
52                                         pins = "gpio12", "gpio13";
53                                         function = "gsbi4";
54                                         drive-strength = <12>;
55                                         bias-disable;
56                                 };
57                         };
58
59                         led_pins: led_pins {
60                                 mux {
61                                         pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
62                                                 "gpio24","gpio26", "gpio53", "gpio64";
63                                         function = "gpio";
64                                         drive-strength = <2>;
65                                         bias-pull-up;
66                                 };
67                         };
68
69                         mdio0_pins: mdio0_pins {
70                                 mux {
71                                         pins = "gpio0", "gpio1";
72                                         function = "gpio";
73                                         drive-strength = <8>;
74                                         bias-disable;
75                                 };
76                         };
77
78                         nand_pins: nand_pins {
79                                 mux {
80                                         pins = "gpio34", "gpio35", "gpio36",
81                                                "gpio37", "gpio38", "gpio39",
82                                                "gpio40", "gpio41", "gpio42",
83                                                "gpio43", "gpio44", "gpio45",
84                                                "gpio46", "gpio47";
85                                         function = "nand";
86                                         drive-strength = <10>;
87                                         bias-disable;
88                                 };
89                                 pullups {
90                                         pins = "gpio39";
91                                         bias-pull-up;
92                                 };
93                                 hold {
94                                         pins = "gpio40", "gpio41", "gpio42",
95                                                "gpio43", "gpio44", "gpio45",
96                                                "gpio46", "gpio47";
97                                         bias-bus-hold;
98                                 };
99                         };
100
101                         rgmii2_pins: rgmii2_pins {
102                                 mux {
103                                         pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
104                                                "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
105                                         function = "rgmii2";
106                                         drive-strength = <8>;
107                                         bias-disable;
108                                 };
109                         };
110
111                         usb0_pwr_en_pins: usb0_pwr_en_pins {
112                                 mux {
113                                         pins = "gpio15";
114                                         function = "gpio";
115                                         drive-strength = <12>;
116                                         bias-pull-down;
117                                         output-high;
118                                 };
119                         };
120
121                         usb1_pwr_en_pins: usb1_pwr_en_pins {
122                                 mux {
123                                         pins = "gpio16", "gpio68";
124                                         function = "gpio";
125                                         drive-strength = <12>;
126                                         bias-pull-down;
127                                         output-high;
128                                 };
129                         };
130                 };
131
132                 gsbi@16300000 {
133                         qcom,mode = <GSBI_PROT_I2C_UART>;
134                         status = "ok";
135                         serial@16340000 {
136                                 status = "ok";
137                         };
138                         /*
139                          * The i2c device on gsbi4 should not be enabled.
140                          * On ipq806x designs gsbi4 i2c is meant for exclusive
141                          * RPM usage. Turning this on in kernel manifests as
142                          * i2c failure for the RPM.
143                          */
144                 };
145
146                 sata-phy@1b400000 {
147                         status = "ok";
148                 };
149
150                 sata@29000000 {
151                         status = "ok";
152                 };
153
154                 phy@100f8800 {          /* USB3 port 1 HS phy */
155                         status = "ok";
156                 };
157
158                 phy@100f8830 {          /* USB3 port 1 SS phy */
159                         status = "ok";
160                 };
161
162                 phy@110f8800 {          /* USB3 port 0 HS phy */
163                         status = "ok";
164                 };
165
166                 phy@110f8830 {          /* USB3 port 0 SS phy */
167                         status = "ok";
168                 };
169
170                 usb30@0 {
171                         status = "ok";
172
173                         pinctrl-0 = <&usb0_pwr_en_pins>;
174                         pinctrl-names = "default";
175                 };
176
177                 usb30@1 {
178                         status = "ok";
179
180                         pinctrl-0 = <&usb1_pwr_en_pins>;
181                         pinctrl-names = "default";
182                 };
183
184                 pcie0: pci@1b500000 {
185                         status = "ok";
186                         reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
187                         pinctrl-0 = <&pcie0_pins>;
188                         pinctrl-names = "default";
189                 };
190
191                 pcie1: pci@1b700000 {
192                         status = "ok";
193                         reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
194                         pinctrl-0 = <&pcie1_pins>;
195                         pinctrl-names = "default";
196                         force_gen1 = <1>;
197                 };
198
199                 nand@1ac00000 {
200                         status = "ok";
201
202                         pinctrl-0 = <&nand_pins>;
203                         pinctrl-names = "default";
204
205                         #address-cells = <1>;
206                         #size-cells = <1>;
207
208                         cs0 {
209                                 reg = <0>;
210                                 compatible = "qcom,nandcs";
211
212                                 nand-ecc-strength = <4>;
213                                 nand-bus-width = <8>;
214                                 nand-ecc-step-size = <512>;
215
216                                 partitions {
217                                         compatible = "fixed-partitions";
218                                         #address-cells = <1>;
219                                         #size-cells = <1>;
220
221                                         qcadata@0 {
222                                                 label = "qcadata";
223                                                 reg = <0x0000000 0x0c80000>;
224                                                 read-only;
225                                         };
226
227                                         APPSBL@c80000 {
228                                                 label = "APPSBL";
229                                                 reg = <0x0c80000 0x0500000>;
230                                                 read-only;
231                                         };
232
233                                         APPSBLENV@1180000 {
234                                                 label = "APPSBLENV";
235                                                 reg = <0x1180000 0x0080000>;
236                                                 read-only;
237                                         };
238
239                                         art: art@1200000 {
240                                                 label = "art";
241                                                 reg = <0x1200000 0x0140000>;
242                                                 read-only;
243                                         };
244
245                                         artbak: art@1340000 {
246                                                 label = "artbak";
247                                                 reg = <0x1340000 0x0140000>;
248                                                 read-only;
249                                         };
250
251                                         kernel@1480000 {
252                                                 label = "kernel";
253                                                 reg = <0x1480000 0x0400000>;
254                                         };
255
256                                         ubi@1880000 {
257                                                 label = "ubi";
258                                                 reg = <0x1880000 0x1C00000>;
259                                         };
260
261                                         netgear@3480000 {
262                                                 label = "netgear";
263                                                 reg = <0x3480000 0x4480000>;
264                                                 read-only;
265                                         };
266
267                                         reserve@7900000 {
268                                                 label = "reserve";
269                                                 reg = <0x7900000 0x0700000>;
270                                                 read-only;
271                                         };
272
273                                         firmware@1480000 {
274                                                 label = "firmware";
275                                                 reg = <0x1480000 0x2000000>;
276                                         };
277                                 };
278                         };
279                 };
280
281                 mdio0: mdio {
282                         compatible = "virtual,mdio-gpio";
283                         #address-cells = <1>;
284                         #size-cells = <0>;
285                         gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
286                         pinctrl-0 = <&mdio0_pins>;
287                         pinctrl-names = "default";
288
289                         phy0: ethernet-phy@0 {
290                                 device_type = "ethernet-phy";
291                                 reg = <0>;
292                                 qca,ar8327-initvals = <
293                                         0x00004 0x7600000   /* PAD0_MODE */
294                                         0x00008 0x1000000   /* PAD5_MODE */
295                                         0x0000c 0x80        /* PAD6_MODE */
296                                         0x000e4 0x6a545     /* MAC_POWER_SEL */
297                                         0x000e0 0xc74164de  /* SGMII_CTRL */
298                                         0x0007c 0x4e        /* PORT0_STATUS */
299                                         0x00094 0x4e        /* PORT6_STATUS */
300                                         >;
301                         };
302
303                         phy4: ethernet-phy@4 {
304                                 device_type = "ethernet-phy";
305                                 reg = <4>;
306                         };
307                 };
308
309                 gmac1: ethernet@37200000 {
310                         status = "ok";
311                         phy-mode = "rgmii";
312                         phy-handle = <&phy4>;
313                         qcom,id = <1>;
314
315                         pinctrl-0 = <&rgmii2_pins>;
316                         pinctrl-names = "default";
317
318                         mtd-mac-address = <&art 6>;
319                 };
320
321                 gmac2: ethernet@37400000 {
322                         status = "ok";
323                         phy-mode = "sgmii";
324                         qcom,id = <2>;
325
326                         mtd-mac-address = <&art 0>;
327
328                         fixed-link {
329                                 speed = <1000>;
330                                 full-duplex;
331                         };
332                 };
333
334                 rpm@108000 {
335                         pinctrl-0 = <&i2c4_pins>;
336                         pinctrl-names = "default";
337                 };
338         };
339
340         gpio-keys {
341                 compatible = "gpio-keys";
342                 pinctrl-0 = <&button_pins>;
343                 pinctrl-names = "default";
344
345                 wifi {
346                         label = "wifi";
347                         gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
348                         linux,code = <KEY_RFKILL>;
349                 };
350
351                 reset {
352                         label = "reset";
353                         gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
354                         linux,code = <KEY_RESTART>;
355                 };
356
357                 wps {
358                         label = "wps";
359                         gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
360                         linux,code = <KEY_WPS_BUTTON>;
361                 };
362         };
363
364         gpio-leds {
365                 compatible = "gpio-leds";
366                 pinctrl-0 = <&led_pins>;
367                 pinctrl-names = "default";
368
369                 usb1 {
370                         label = "d7800:white:usb1";
371                         gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
372                 };
373
374                 usb2 {
375                         label = "d7800:white:usb2";
376                         gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
377                 };
378
379                 power_amber: power_amber {
380                         label = "d7800:amber:power";
381                         gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
382                 };
383
384                 wan_white {
385                         label = "d7800:white:wan";
386                         gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
387                 };
388
389                 wan_amber {
390                         label = "d7800:amber:wan";
391                         gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
392                 };
393
394                 wps {
395                         label = "d7800:white:wps";
396                         gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
397                 };
398
399                 esata {
400                         label = "d7800:white:esata";
401                         gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
402                 };
403
404                 power_white: power_white {
405                         label = "d7800:white:power";
406                         gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
407                         default-state = "keep";
408                 };
409
410                 wifi {
411                         label = "d7800:white:wifi";
412                         gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
413                 };
414         };
415 };
416
417 &adm_dma {
418         status = "ok";
419 };