ath79: move dts-v1 statement to ath79.dtsi
[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 = "tp-link:green:power";
61 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62 default-state = "on";
63 };
64
65 wps {
66 label = "tp-link:green:wps";
67 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
68 };
69
70 wlan2g {
71 label = "tp-link:green:wlan2g";
72 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
73 linux,default-trigger = "phy1tpt";
74 };
75
76 wlan5g {
77 label = "tp-link:green:wlan5g";
78 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "phy0tpt";
80 };
81
82 wan_green {
83 label = "tp-link:green:wan";
84 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
85 };
86
87 wan_amber {
88 label = "tp-link:amber:wan";
89 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
90 };
91
92 lan1 {
93 label = "tp-link:green:lan1";
94 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
95 };
96
97 lan2 {
98 label = "tp-link:green:lan2";
99 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
100 };
101
102 lan3 {
103 label = "tp-link:green:lan3";
104 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
105 };
106
107 lan4 {
108 label = "tp-link:green:lan4";
109 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
110 };
111 };
112 };
113
114 &spi {
115 status = "okay";
116
117 num-cs = <1>;
118
119 flash@0 {
120 compatible = "jedec,spi-nor";
121 reg = <0>;
122 spi-max-frequency = <25000000>;
123
124 partitions {
125 compatible = "fixed-partitions";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 partition@0 {
130 label = "factory-boot";
131 reg = <0x000000 0x020000>;
132 read-only;
133 };
134
135 partition@20000 {
136 label = "u-boot";
137 reg = <0x020000 0x010000>;
138 read-only;
139 };
140
141 partition@30000 {
142 compatible = "denx,uimage";
143 label = "firmware";
144 reg = <0x030000 0x7a0000>;
145 };
146
147 config: partition@7d0000 {
148 label = "config";
149 reg = <0x7d0000 0x010000>;
150 read-only;
151 };
152
153 info: partition@7e0000 {
154 label = "info";
155 reg = <0x7e0000 0x010000>;
156 read-only;
157 };
158
159 art: partition@7f0000 {
160 label = "art";
161 reg = <0x7f0000 0x010000>;
162 read-only;
163 };
164 };
165 };
166 };
167
168 &uart {
169 status = "okay";
170 };
171
172 &pcie {
173 status = "okay";
174 };
175
176 &eth0 {
177 status = "okay";
178
179 phy-handle = <&swphy4>;
180
181 mtd-mac-address = <&info 0x8>;
182 };
183
184 &eth1 {
185 status = "okay";
186
187 mtd-mac-address = <&info 0x8>;
188 mtd-mac-address-increment = <1>;
189 };
190
191 &wmac {
192 status = "okay";
193
194 mtd-cal-data = <&art 0x1000>;
195 mtd-mac-address = <&info 0x8>;
196 };