ath79: add support for TP-Link TL-WDR6500 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9561_tplink_tl-wdr6500-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wdr6500-v2", "qca,qca9561";
10 model = "TP-Link TL-WDR6500 v2";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &eth1;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "Reset button";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 lan4 {
34 label = "green:lan4";
35 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36 };
37
38 lan3 {
39 label = "green:lan3";
40 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
41 };
42
43 lan2 {
44 label = "green:lan2";
45 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
46 };
47
48 lan1 {
49 label = "green:lan1";
50 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
51 };
52
53 wan {
54 label = "green:wan";
55 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
56 };
57
58 led_system: system {
59 label = "white:system";
60 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
61 default-state = "on";
62 };
63 };
64 };
65
66 &spi {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x000000 0x010000>;
82 read-only;
83
84 compatible = "nvmem-cells";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 macaddr_uboot_0fc00: macaddr@0fc00 {
89 reg = <0x0fc00 0x6>;
90 };
91 };
92
93 partition@10000 {
94 compatible = "tplink,firmware";
95 label = "firmware";
96 reg = <0x010000 0x7e0000>;
97 };
98
99 partition@7f0000 {
100 label = "art";
101 reg = <0x7f0000 0x010000>;
102 read-only;
103
104 compatible = "nvmem-cells";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 calibration_ath9k: calibration@1000 {
109 reg = <0x1000 0x440>;
110 };
111
112 calibration_ath10k: calibration@5000 {
113 reg = <0x5000 0x844>;
114 };
115 };
116 };
117 };
118 };
119
120 &uart {
121 status = "okay";
122 };
123
124 &pcie {
125 status = "okay";
126
127 wifi@0,0 {
128 compatible = "qcom,ath10k";
129 reg = <0 0 0 0 0>;
130
131 nvmem-cells = <&macaddr_uboot_0fc00>, <&calibration_ath10k>;
132 nvmem-cell-names = "mac-address", "calibration";
133 mac-address-increment = <(-2)>;
134 };
135 };
136
137 &mdio0 {
138 status = "okay";
139 };
140
141 &eth0 {
142 status = "okay";
143
144 phy-handle = <&swphy4>;
145
146 nvmem-cells = <&macaddr_uboot_0fc00>;
147 nvmem-cell-names = "mac-address";
148 mac-address-increment = <1>;
149 };
150
151 &eth1 {
152 status = "okay";
153
154 nvmem-cells = <&macaddr_uboot_0fc00>;
155 nvmem-cell-names = "mac-address";
156 };
157
158 &wmac {
159 status = "okay";
160
161 nvmem-cells = <&macaddr_uboot_0fc00>, <&calibration_ath9k>;
162 nvmem-cell-names = "mac-address", "calibration";
163 mac-address-increment = <(-1)>;
164 };
165
166 &usb0 {
167 status = "okay";
168 };
169
170 &usb_phy0 {
171 status = "okay";
172 };