ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c25-v1.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,archer-c25-v1", "qca,qca9561";
11 model = "TP-Link Archer C25 v1";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &eth0;
19 };
20
21 led_spi {
22 compatible = "spi-gpio";
23 #address-cells = <1>;
24 #size-cells = <0>;
25
26 sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
27 mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
28 cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
29 num-chipselects = <1>;
30
31 led_gpio: led_gpio@0 {
32 compatible = "fairchild,74hc595";
33 reg = <0>;
34 gpio-controller;
35 #gpio-cells = <2>;
36 registers-number = <1>;
37 spi-max-frequency = <10000000>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 wifi {
45 label = "WiFi button";
46 linux,code = <KEY_RFKILL>;
47 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
48 };
49
50 reset {
51 label = "Reset button";
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
54 };
55 };
56
57 leds {
58 compatible = "gpio-leds";
59
60 led_power: power {
61 function = LED_FUNCTION_POWER;
62 color = <LED_COLOR_ID_GREEN>;
63 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
64 default-state = "on";
65 };
66
67 wps {
68 function = LED_FUNCTION_WPS;
69 color = <LED_COLOR_ID_GREEN>;
70 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
71 };
72
73 wlan2g {
74 label = "green:wlan2g";
75 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
76 linux,default-trigger = "phy1tpt";
77 };
78
79 wlan5g {
80 label = "green:wlan5g";
81 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
82 linux,default-trigger = "phy0tpt";
83 };
84
85 wan_green {
86 function = LED_FUNCTION_WAN;
87 color = <LED_COLOR_ID_GREEN>;
88 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
89 };
90
91 wan_amber {
92 function = LED_FUNCTION_WAN;
93 color = <LED_COLOR_ID_AMBER>;
94 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
95 };
96
97 lan1 {
98 label = "green:lan1";
99 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
100 };
101
102 lan2 {
103 label = "green:lan2";
104 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
105 };
106
107 lan3 {
108 label = "green:lan3";
109 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
110 };
111
112 lan4 {
113 label = "green:lan4";
114 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
115 };
116 };
117 };
118
119 &spi {
120 status = "okay";
121
122 flash@0 {
123 compatible = "jedec,spi-nor";
124 reg = <0>;
125 spi-max-frequency = <25000000>;
126
127 partitions {
128 compatible = "fixed-partitions";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 partition@0 {
133 label = "factory-boot";
134 reg = <0x000000 0x020000>;
135 read-only;
136 };
137
138 partition@20000 {
139 label = "u-boot";
140 reg = <0x020000 0x010000>;
141 read-only;
142 };
143
144 partition@30000 {
145 compatible = "denx,uimage";
146 label = "firmware";
147 reg = <0x030000 0x7a0000>;
148 };
149
150 config: partition@7d0000 {
151 label = "config";
152 reg = <0x7d0000 0x010000>;
153 read-only;
154 };
155
156 info: partition@7e0000 {
157 label = "info";
158 reg = <0x7e0000 0x010000>;
159 read-only;
160
161 nvmem-layout {
162 compatible = "fixed-layout";
163 #address-cells = <1>;
164 #size-cells = <1>;
165
166 macaddr_info_8: macaddr@8 {
167 compatible = "mac-base";
168 reg = <0x8 0x6>;
169 #nvmem-cell-cells = <1>;
170 };
171 };
172 };
173
174 art: partition@7f0000 {
175 label = "art";
176 reg = <0x7f0000 0x010000>;
177 read-only;
178
179 nvmem-layout {
180 compatible = "fixed-layout";
181 #address-cells = <1>;
182 #size-cells = <1>;
183
184 cal_art_5000: calibration@5000 {
185 reg = <0x5000 0x844>;
186 };
187 };
188 };
189 };
190 };
191 };
192
193 &pcie {
194 status = "okay";
195
196 wifi@0,0 {
197 compatible = "qcom,ath10k";
198 reg = <0x0000 0 0 0 0>;
199 nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
200 nvmem-cell-names = "calibration", "mac-address";
201 };
202 };
203
204 &eth0 {
205 status = "okay";
206
207 phy-handle = <&swphy4>;
208
209 nvmem-cells = <&macaddr_info_8 0>;
210 nvmem-cell-names = "mac-address";
211 };
212
213 &eth1 {
214 status = "okay";
215
216 nvmem-cells = <&macaddr_info_8 1>;
217 nvmem-cell-names = "mac-address";
218 };
219
220 &wmac {
221 status = "okay";
222
223 mtd-cal-data = <&art 0x1000>;
224 nvmem-cells = <&macaddr_info_8 0>;
225 nvmem-cell-names = "mac-address";
226 };