ipq806x: r7800: add missing wifi definition for pcie
[oweals/openwrt.git] / target / linux / ipq806x / files-4.19 / arch / arm / boot / dts / qcom-ipq8064-wg2600hp.dts
1 #include "qcom-ipq8064-v2.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6         model = "NEC Aterm WG2600HP";
7         compatible = "nec,wg2600hp", "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_green;
29                 led-failsafe = &power_red;
30                 led-running = &power_green;
31                 led-upgrade = &power_green;
32         };
33
34         chosen {
35                 stdout-path = "serial0:115200n8";
36         };
37
38         soc {
39                 mdio0: mdio {
40                         compatible = "virtual,mdio-gpio";
41                         #address-cells = <1>;
42                         #size-cells = <0>;
43                         gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
44                         pinctrl-0 = <&mdio0_pins>;
45                         pinctrl-names = "default";
46
47                         ethernet-phy@0 {
48                                 reg = <0>;
49                                 qca,ar8327-initvals = <
50                                         0x00004 0x06000000  /* PAD0_MODE */
51                                         0x0000c 0x00080080  /* PAD6_MODE */
52                                         0x000e4 0x0006a545  /* MAC_POWER_SEL */
53                                         0x000e0 0xc74164de  /* SGMII_CTRL */
54                                         0x0007c 0x0000004e  /* PORT0_STATUS */
55                                         0x00094 0x0000004e  /* PORT6_STATUS */
56                                         >;
57                         };
58
59                         ethernet-phy@4 {
60                                 reg = <4>;
61                         };
62                 };
63         };
64
65         keys {
66                 compatible = "gpio-keys";
67                 pinctrl-0 = <&button_pins>;
68                 pinctrl-names = "default";
69
70                 wps {
71                         label = "wps";
72                         gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
73                         linux,code = <KEY_WPS_BUTTON>;
74                 };
75
76                 reset {
77                         label = "reset";
78                         gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
79                         linux,code = <KEY_RESTART>;
80                 };
81
82                 bridge {
83                         label = "bridge";
84                         gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
85                         linux,code = <BTN_0>;
86                         linux,input-type = <EV_SW>;
87                 };
88
89                 converter {
90                         label = "converter";
91                         gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
92                         linux,code = <BTN_0>;
93                         linux,input-type = <EV_SW>;
94                 };
95         };
96
97         leds {
98                 compatible = "gpio-leds";
99                 pinctrl-0 = <&led_pins>;
100                 pinctrl-names = "default";
101
102                 converter_green {
103                         label = "wg2600hp:green:converter";
104                         gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
105                 };
106
107                 power_red: power_red {
108                         label = "wg2600hp:red:power";
109                         gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
110                 };
111
112                 active_green {
113                         label = "wg2600hp:green:active";
114                         gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
115                 };
116
117                 active_red {
118                         label = "wg2600hp:red:active";
119                         gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
120                 };
121
122                 power_green: power_green {
123                         label = "wg2600hp:green:power";
124                         gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
125                 };
126
127                 converter_red {
128                         label = "wg2600hp:red:converter";
129                         gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
130                 };
131
132                 wlan2g_green {
133                         label = "wg2600hp:green:wlan2g";
134                         gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
135                 };
136
137                 wlan2g_red {
138                         label = "wg2600hp:red:wlan2g";
139                         gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
140                 };
141
142                 wlan5g_green {
143                         label = "wg2600hp:green:wlan5g";
144                         gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
145                 };
146
147                 wlan5g_red {
148                         label = "wg2600hp:red:wlan5g";
149                         gpios = <&qcom_pinmux 58 GPIO_ACTIVE_HIGH>;
150                 };
151
152                 tv_green {
153                         label = "wg2600hp:green:tv";
154                         gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
155                 };
156
157                 tv_red {
158                         label = "wg2600hp:red:tv";
159                         gpios = <&qcom_pinmux 65 GPIO_ACTIVE_HIGH>;
160                 };
161         };
162 };
163
164 &adm_dma {
165         status = "okay";
166 };
167
168 &gmac1 {
169         status = "okay";
170
171         phy-mode = "rgmii";
172         qcom,id = <1>;
173
174         pinctrl-0 = <&rgmii2_pins>;
175         pinctrl-names = "default";
176
177         mtd-mac-address = <&PRODUCTDATA 6>;
178
179         fixed-link {
180                 speed = <1000>;
181                 full-duplex;
182         };
183 };
184
185 &gmac2 {
186         status = "okay";
187
188         phy-mode = "sgmii";
189         qcom,id = <2>;
190
191         mtd-mac-address = <&PRODUCTDATA 0>;
192
193         fixed-link {
194                 speed = <1000>;
195                 full-duplex;
196         };
197 };
198
199 &gsbi4 {
200         status = "okay";
201         qcom,mode = <GSBI_PROT_I2C_UART>;
202 };
203
204 &gsbi4_serial {
205         status = "okay";
206 };
207
208 &gsbi5 {
209         status = "okay";
210
211         qcom,mode = <GSBI_PROT_SPI>;
212
213         spi@1a280000 {
214                 status = "okay";
215
216                 pinctrl-0 = <&spi_pins>;
217                 pinctrl-names = "default";
218
219                 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
220
221                 flash@0 {
222                         compatible = "jedec,spi-nor";
223                         spi-max-frequency = <50000000>;
224                         reg = <0>;
225
226                         partitions {
227                                 compatible = "fixed-partitions";
228                                 #address-cells = <1>;
229                                 #size-cells = <1>;
230
231                                 SBL1@0 {
232                                         label = "SBL1";
233                                         reg = <0x0 0x20000>;
234                                         read-only;
235                                 };
236
237                                 MIBIB@20000 {
238                                         label = "MIBIB";
239                                         reg = <0x20000 0x20000>;
240                                         read-only;
241                                 };
242
243                                 SBL2@40000 {
244                                         label = "SBL2";
245                                         reg = <0x40000 0x40000>;
246                                         read-only;
247                                 };
248
249                                 SBL3@80000 {
250                                         label = "SBL3";
251                                         reg = <0x80000 0x80000>;
252                                         read-only;
253                                 };
254
255                                 DDRCONFIG@100000 {
256                                         label = "DDRCONFIG";
257                                         reg = <0x100000 0x10000>;
258                                         read-only;
259                                 };
260
261                                 SSD@110000 {
262                                         label = "SSD";
263                                         reg = <0x110000 0x10000>;
264                                         read-only;
265                                 };
266
267                                 TZ@120000 {
268                                         label = "TZ";
269                                         reg = <0x120000 0x80000>;
270                                         read-only;
271                                 };
272
273                                 RPM@1a0000 {
274                                         label = "RPM";
275                                         reg = <0x1a0000 0x80000>;
276                                         read-only;
277                                 };
278
279                                 APPSBL@220000 {
280                                         label = "APPSBL";
281                                         reg = <0x220000 0x80000>;
282                                         read-only;
283                                 };
284
285                                 APPSBLENV@2a0000 {
286                                         label = "APPSBLENV";
287                                         reg = <0x2a0000 0x10000>;
288                                 };
289
290                                 PRODUCTDATA: PRODUCTDATA@2b0000 {
291                                         label = "PRODUCTDATA";
292                                         reg = <0x2b0000 0x30000>;
293                                         read-only;
294                                 };
295
296                                 ART@2e0000 {
297                                         label = "ART";
298                                         reg = <0x2e0000 0x40000>;
299                                         read-only;
300                                 };
301
302                                 TP@320000 {
303                                         label = "TP";
304                                         reg = <0x320000 0x40000>;
305                                         read-only;
306                                 };
307
308                                 TINY@360000 {
309                                         label = "TINY";
310                                         reg = <0x360000 0x500000>;
311                                         read-only;
312                                 };
313
314                                 firmware@860000 {
315                                         compatible = "denx,uimage";
316                                         label = "firmware";
317                                         reg = <0x860000 0x17a0000>;
318                                 };
319                         };
320                 };
321         };
322 };
323
324 &usb3_0 {
325         status = "okay";
326
327         pinctrl-0 = <&usb_pwr_en_pins>;
328         pinctrl-names = "default";
329 };
330
331 &usb3_1 {
332         status = "okay";
333 };
334
335 &pcie0 {
336         status = "okay";
337 };
338
339 &pcie1 {
340         status = "okay";
341         force_gen1 = <1>;
342 };
343
344 &qcom_pinmux {
345         button_pins: button_pins {
346                 mux {
347                         pins = "gpio16", "gpio54", "gpio24", "gpio25";
348                         function = "gpio";
349                         drive-strength = <2>;
350                         bias-pull-up;
351                 };
352         };
353
354         i2c4_pins: i2c4_pinmux {
355                 mux {
356                         pins = "gpio12", "gpio13";
357                         function = "gsbi4";
358                         drive-strength = <12>;
359                         bias-disable;
360                 };
361         };
362
363         led_pins: led_pins {
364                 mux {
365                         pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio14",
366                                 "gpio15", "gpio55", "gpio56", "gpio57", "gpio58",
367                                 "gpio64", "gpio65";
368                         function = "gpio";
369                         drive-strength = <2>;
370                         bias-pull-down;
371                 };
372         };
373
374         spi_pins: spi_pins {
375                 mux {
376                         pins = "gpio18", "gpio19", "gpio21";
377                         function = "gsbi5";
378                         bias-pull-down;
379                 };
380
381                 data {
382                         pins = "gpio18", "gpio19";
383                         drive-strength = <10>;
384                 };
385
386                 cs {
387                         pins = "gpio20";
388                         drive-strength = <10>;
389                         bias-pull-up;
390                 };
391
392                 clk {
393                         pins = "gpio21";
394                         drive-strength = <12>;
395                 };
396         };
397
398         mdio0_pins: mdio0_pins {
399                 mux {
400                         pins = "gpio0", "gpio1";
401                         function = "gpio";
402                         drive-strength = <8>;
403                         bias-disable;
404                 };
405         };
406
407         rgmii2_pins: rgmii2_pins {
408                 mux {
409                         pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
410                                "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
411                         function = "rgmii2";
412                         drive-strength = <8>;
413                         bias-disable;
414                 };
415         };
416
417         usb_pwr_en_pins: usb_pwr_en_pins {
418                 mux {
419                         pins = "gpio22";
420                         function = "gpio";
421                         drive-strength = <2>;
422                         bias-pull-down;
423                         output-high;
424                 };
425         };
426 };