ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c2-v3.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-c2-v3", "qca,qca9563";
11 model = "TP-Link Archer C2 v3";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_system: system {
24 label = "green:system";
25 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
26 default-state = "on";
27 };
28
29 wifi2g {
30 label = "green:wifi2g";
31 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34
35 wifi5g {
36 label = "green:wifi5g";
37 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 wifi_wps {
42 function = LED_FUNCTION_WPS;
43 color = <LED_COLOR_ID_GREEN>;
44 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
45 };
46
47 wan {
48 function = LED_FUNCTION_WAN;
49 color = <LED_COLOR_ID_GREEN>;
50 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
51 };
52
53 wan_fail {
54 function = LED_FUNCTION_WAN;
55 color = <LED_COLOR_ID_ORANGE>;
56 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
57 };
58
59 lan1 {
60 label = "green:lan1";
61 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
62 };
63
64 lan2 {
65 label = "green:lan2";
66 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
67 };
68
69 lan3 {
70 label = "green:lan3";
71 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
72 };
73
74 lan4 {
75 label = "green:lan4";
76 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
77 };
78 };
79
80 keys {
81 compatible = "gpio-keys";
82
83 reset {
84 label = "Reset button";
85 linux,code = <KEY_RESTART>;
86 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
87 debounce-interval = <60>;
88 };
89
90 wps {
91 label = "WPS button";
92 linux,code = <KEY_WPS_BUTTON>;
93 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
94 debounce-interval = <60>;
95 };
96 };
97 };
98
99 &spi {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <25000000>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "factory-uboot";
114 reg = <0x000000 0x020000>;
115 read-only;
116 };
117
118 partition@20000 {
119 label = "uboot";
120 reg = <0x020000 0x10000>;
121 read-only;
122 };
123
124 partition@30000 {
125 label = "firmware";
126 reg = <0x030000 0x7A0000>;
127 compatible = "denx,uimage";
128 };
129
130 info: partition@7e0000 {
131 label = "info";
132 reg = <0x7e0000 0x010000>;
133 read-only;
134
135 nvmem-layout {
136 compatible = "fixed-layout";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 macaddr_info_8: macaddr@8 {
141 compatible = "mac-base";
142 reg = <0x8 0x6>;
143 #nvmem-cell-cells = <1>;
144 };
145 };
146 };
147
148 art: partition@7f0000 {
149 label = "art";
150 reg = <0x7f0000 0x010000>;
151 read-only;
152
153 nvmem-layout {
154 compatible = "fixed-layout";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 cal_art_5000: calibration@5000 {
159 reg = <0x5000 0x844>;
160 };
161 };
162 };
163 };
164 };
165 };
166
167 &mdio0 {
168 status = "okay";
169
170 phy0: ethernet-phy@0 {
171 reg = <0>;
172 phy-mode = "sgmii";
173 qca,mib-poll-interval = <500>;
174
175 qca,ar8327-initvals = <
176 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
177 0x7c 0x0000007e /* PORT0_STATUS */
178 >;
179 };
180 };
181
182 &pcie {
183 status = "okay";
184
185 wifi@0,0 {
186 compatible = "qcom,ath10k";
187 reg = <0x0000 0 0 0 0>;
188 nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
189 nvmem-cell-names = "calibration", "mac-address";
190 };
191 };
192
193 &eth0 {
194 status = "okay";
195
196 nvmem-cells = <&macaddr_info_8 0>;
197 nvmem-cell-names = "mac-address";
198 phy-mode = "sgmii";
199 phy-handle = <&phy0>;
200 };
201
202 &wmac {
203 status = "okay";
204
205 mtd-cal-data = <&art 0x1000>;
206 nvmem-cells = <&macaddr_info_8 0>;
207 nvmem-cell-names = "mac-address";
208 };