87762990801deeb54ef70f403857b1d74bc50478
[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
157 art: partition@7f0000 {
158 label = "art";
159 reg = <0x7f0000 0x010000>;
160 read-only;
161 };
162 };
163 };
164 };
165
166 &uart {
167 status = "okay";
168 };
169
170 &pcie {
171 status = "okay";
172 };
173
174 &eth0 {
175 status = "okay";
176
177 phy-handle = <&swphy4>;
178
179 mtd-mac-address = <&info 0x8>;
180 };
181
182 &eth1 {
183 status = "okay";
184
185 mtd-mac-address = <&info 0x8>;
186 mtd-mac-address-increment = <1>;
187 };
188
189 &wmac {
190 status = "okay";
191
192 mtd-cal-data = <&art 0x1000>;
193 mtd-mac-address = <&info 0x8>;
194 };