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