ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c7-v4.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-c7-v4", "qca,qca9563";
11 model = "TP-Link Archer C7 v4";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
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>; // 74HC595 SRCLK (Serial Clock)
27 mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial)
28 cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; // 74HC595 RCLK (Register Clock)
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 gpio-export {
42 compatible = "gpio-export";
43
44 gpio_shift_register_oe {
45 gpio-export,name = "tp-link:oe:sr";
46 gpio-export,output = <0>;
47 gpios = <&gpio 1 GPIO_ACTIVE_LOW>; // 74HC595 /OE (Output Enable)
48 };
49
50 gpio_shift_register_reset {
51 gpio-export,name = "tp-link:reset:sr";
52 gpio-export,output = <1>;
53 gpios = <&gpio 21 GPIO_ACTIVE_LOW>; // 74HC595 /SRCLR (Serial Clear)
54 };
55 };
56
57 leds {
58 compatible = "gpio-leds";
59
60 led_system: system {
61 label = "green:system";
62 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
63 default-state = "on";
64 };
65
66 usb1 {
67 label = "green:usb1";
68 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&hub_port1>;
70 linux,default-trigger = "usbport";
71 };
72
73 usb2 {
74 label = "green:usb2";
75 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
76 trigger-sources = <&hub_port0>;
77 linux,default-trigger = "usbport";
78 };
79
80 wlan5g {
81 label = "green:wlan5g";
82 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
83 linux,default-trigger = "phy0tpt";
84 };
85
86 wlan2g {
87 label = "green:wlan2g";
88 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
89 linux,default-trigger = "phy1tpt";
90 };
91
92 wan {
93 function = LED_FUNCTION_WAN;
94 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
96 };
97
98 wan_fail {
99 function = LED_FUNCTION_WAN;
100 color = <LED_COLOR_ID_ORANGE>;
101 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
102 };
103
104 lan1 {
105 label = "green:lan1";
106 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
107 };
108
109 lan2 {
110 label = "green:lan2";
111 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
112 };
113
114 lan3 {
115 label = "green:lan3";
116 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
117 };
118
119 lan4 {
120 label = "green:lan4";
121 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
122 };
123
124 wps {
125 function = LED_FUNCTION_WPS;
126 color = <LED_COLOR_ID_GREEN>;
127 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
128 };
129 };
130
131 keys {
132 compatible = "gpio-keys";
133
134 reset {
135 label = "Reset button";
136 linux,code = <KEY_RESTART>;
137 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
138 debounce-interval = <60>;
139 };
140
141 wps {
142 label = "WPS button";
143 linux,code = <KEY_WPS_BUTTON>;
144 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
145 debounce-interval = <60>;
146 };
147 };
148 };
149
150 &pcie {
151 status = "okay";
152
153 wifi@0,0 {
154 compatible = "qcom,ath10k";
155 reg = <0x0000 0 0 0 0>;
156 nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
157 nvmem-cell-names = "calibration", "mac-address";
158 };
159 };
160
161 &usb_phy0 {
162 status = "okay";
163 };
164
165 &usb0 {
166 status = "okay";
167 };
168
169 &usb_phy1 {
170 status = "okay";
171 };
172
173 &usb1 {
174 status = "okay";
175 };
176
177 &spi {
178 status = "okay";
179
180 flash@0 {
181 compatible = "jedec,spi-nor";
182 reg = <0>;
183 spi-max-frequency = <25000000>;
184
185 partitions {
186 compatible = "fixed-partitions";
187 #address-cells = <1>;
188 #size-cells = <1>;
189
190 partition@0 {
191 label = "factory-uboot";
192 reg = <0x000000 0x020000>;
193 read-only;
194 };
195
196 partition@20000 {
197 label = "u-boot";
198 reg = <0x020000 0x020000>;
199 read-only;
200 };
201
202 partition@40000 {
203 label = "firmware";
204 reg = <0x040000 0xec0000>;
205 compatible = "denx,uimage";
206 };
207
208 info: partition@f00000 {
209 label = "info";
210 reg = <0xf00000 0x0f0000>;
211 read-only;
212
213 nvmem-layout {
214 compatible = "fixed-layout";
215 #address-cells = <1>;
216 #size-cells = <1>;
217
218 macaddr_info_8: macaddr@8 {
219 compatible = "mac-base";
220 reg = <0x8 0x6>;
221 #nvmem-cell-cells = <1>;
222 };
223 };
224 };
225
226 art: partition@ff0000 {
227 label = "art";
228 reg = <0xff0000 0x010000>;
229 read-only;
230
231 nvmem-layout {
232 compatible = "fixed-layout";
233 #address-cells = <1>;
234 #size-cells = <1>;
235
236 cal_art_5000: calibration@5000 {
237 reg = <0x5000 0x844>;
238 };
239 };
240 };
241 };
242 };
243 };
244
245 &mdio0 {
246 status = "okay";
247
248 phy0: ethernet-phy@0 {
249 reg = <0>;
250 phy-mode = "sgmii";
251 qca,mib-poll-interval = <500>;
252
253 qca,ar8327-initvals = <
254 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
255 0x7c 0x0000007e /* PORT0_STATUS */
256 0x94 0x00000200 /* PORT6_STATUS */
257 >;
258 };
259 };
260
261 &eth0 {
262 status = "okay";
263
264 pll-data = <0x03000101 0x00000101 0x00001919>;
265
266 phy-mode = "sgmii";
267 nvmem-cells = <&macaddr_info_8 0>;
268 nvmem-cell-names = "mac-address";
269 phy-handle = <&phy0>;
270 };
271
272 &wmac {
273 status = "okay";
274
275 mtd-cal-data = <&art 0x1000>;
276 nvmem-cells = <&macaddr_info_8 0>;
277 nvmem-cell-names = "mac-address";
278 };