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