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