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