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