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