ath79: Add support for TP-Link Archer C25 v1
[openwrt/staging/blogic.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c25-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca956x.dtsi"
8
9 / {
10 compatible = "tplink,archer-c25-v1", "qca,qca9561";
11 model = "TP-Link Archer C25 v1";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 led_spi {
18 compatible = "spi-gpio";
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
23 mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
24 cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
25 num-chipselects = <1>;
26
27 /* can be removed on 4.19 */
28 gpio-sck = <&gpio 15 GPIO_ACTIVE_HIGH>;
29 gpio-mosi = <&gpio 14 GPIO_ACTIVE_HIGH>;
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_button {
45 label = "WiFi button";
46 linux,code = <KEY_RFKILL>;
47 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
48 };
49
50 reset_button {
51 label = "Reset button";
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
54 };
55 };
56
57 aliases {
58 led-boot = &power;
59 led-failsafe = &power;
60 led-running = &power;
61 led-upgrade = &power;
62 };
63
64 leds {
65 compatible = "gpio-leds";
66
67 power: power {
68 label = "tp-link:green:power";
69 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
70 default-state = "on";
71 };
72
73 wps {
74 label = "tp-link:green:wps";
75 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
76 };
77
78 wlan2g {
79 label = "tp-link:green:wlan2g";
80 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "phy1tpt";
82 };
83
84 wlan5g {
85 label = "tp-link:green:wlan5g";
86 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
87 linux,default-trigger = "phy0tpt";
88 };
89
90 wan_green {
91 label = "tp-link:green:wan";
92 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
93 };
94
95 wan_amber {
96 label = "tp-link:amber:wan";
97 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
98 };
99
100 lan1 {
101 label = "tp-link:green:lan1";
102 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
103 };
104
105 lan2 {
106 label = "tp-link:green:lan2";
107 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
108 };
109
110 lan3 {
111 label = "tp-link:green:lan3";
112 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
113 };
114
115 lan4 {
116 label = "tp-link:green:lan4";
117 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
118 };
119 };
120 };
121
122 &spi {
123 status = "okay";
124 num-cs = <1>;
125
126 flash@0 {
127 compatible = "jedec,spi-nor";
128 reg = <0>;
129 spi-max-frequency = <25000000>;
130
131 partitions {
132 compatible = "fixed-partitions";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 partition@0 {
137 label = "factory-boot";
138 reg = <0x000000 0x020000>;
139 read-only;
140 };
141
142 partition@20000 {
143 label = "u-boot";
144 reg = <0x020000 0x010000>;
145 read-only;
146 };
147
148 partition@30000 {
149 compatible = "denx,uimage";
150 label = "firmware";
151 reg = <0x030000 0x7a0000>;
152 };
153
154 config: partition@7d0000 {
155 label = "config";
156 reg = <0x7d0000 0x010000>;
157 read-only;
158 };
159
160 info: partition@7e0000 {
161 label = "info";
162 reg = <0x7e0000 0x010000>;
163 read-only;
164 };
165
166 art: partition@7f0000 {
167 label = "art";
168 reg = <0x7f0000 0x010000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &uart {
176 status = "okay";
177 };
178
179 &pcie {
180 status = "okay";
181 };
182
183 &eth0 {
184 phy-mode = "mii";
185 phy-handle = <&swphy4>;
186
187 status = "okay";
188 mtd-mac-address = <&info 0x8>;
189 };
190
191 &eth1 {
192 status = "okay";
193 mtd-mac-address = <&info 0x8>;
194 mtd-mac-address-increment = <1>;
195 };
196
197 &wmac {
198 status = "okay";
199 mtd-cal-data = <&art 0x1000>;
200 mtd-mac-address = <&info 0x8>;
201 };