881e3a1822531cd78aa40e1fe003f987f158887a
[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 /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 led_gpio: led_gpio@0 {
28 compatible = "fairchild,74hc595";
29 reg = <0>;
30 gpio-controller;
31 #gpio-cells = <2>;
32 registers-number = <1>;
33 spi-max-frequency = <10000000>;
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 wifi_button {
41 label = "WiFi button";
42 linux,code = <KEY_RFKILL>;
43 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
44 };
45
46 reset_button {
47 label = "Reset button";
48 linux,code = <KEY_RESTART>;
49 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 aliases {
54 led-boot = &power;
55 led-failsafe = &power;
56 led-running = &power;
57 led-upgrade = &power;
58 };
59
60 leds {
61 compatible = "gpio-leds";
62
63 power: power {
64 label = "tp-link:green:power";
65 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
66 default-state = "on";
67 };
68
69 wps {
70 label = "tp-link:green:wps";
71 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
72 };
73
74 wlan2g {
75 label = "tp-link:green:wlan2g";
76 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
77 linux,default-trigger = "phy1tpt";
78 };
79
80 wlan5g {
81 label = "tp-link:green:wlan5g";
82 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
83 linux,default-trigger = "phy0tpt";
84 };
85
86 wan_green {
87 label = "tp-link:green:wan";
88 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
89 };
90
91 wan_amber {
92 label = "tp-link:amber:wan";
93 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
94 };
95
96 lan1 {
97 label = "tp-link:green:lan1";
98 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
99 };
100
101 lan2 {
102 label = "tp-link:green:lan2";
103 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
104 };
105
106 lan3 {
107 label = "tp-link:green:lan3";
108 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
109 };
110
111 lan4 {
112 label = "tp-link:green:lan4";
113 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
114 };
115 };
116 };
117
118 &spi {
119 status = "okay";
120 num-cs = <1>;
121
122 flash@0 {
123 compatible = "jedec,spi-nor";
124 reg = <0>;
125 spi-max-frequency = <25000000>;
126
127 partitions {
128 compatible = "fixed-partitions";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 partition@0 {
133 label = "factory-boot";
134 reg = <0x000000 0x020000>;
135 read-only;
136 };
137
138 partition@20000 {
139 label = "u-boot";
140 reg = <0x020000 0x010000>;
141 read-only;
142 };
143
144 partition@30000 {
145 compatible = "denx,uimage";
146 label = "firmware";
147 reg = <0x030000 0x7a0000>;
148 };
149
150 config: partition@7d0000 {
151 label = "config";
152 reg = <0x7d0000 0x010000>;
153 read-only;
154 };
155
156 info: partition@7e0000 {
157 label = "info";
158 reg = <0x7e0000 0x010000>;
159 read-only;
160 };
161
162 art: partition@7f0000 {
163 label = "art";
164 reg = <0x7f0000 0x010000>;
165 read-only;
166 };
167 };
168 };
169 };
170
171 &uart {
172 status = "okay";
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &eth0 {
180 phy-mode = "mii";
181 phy-handle = <&swphy4>;
182
183 status = "okay";
184 mtd-mac-address = <&info 0x8>;
185 };
186
187 &eth1 {
188 status = "okay";
189 mtd-mac-address = <&info 0x8>;
190 mtd-mac-address-increment = <1>;
191 };
192
193 &wmac {
194 status = "okay";
195 mtd-cal-data = <&art 0x1000>;
196 mtd-mac-address = <&info 0x8>;
197 };