ath79: drop redundant status for gpio target-wide
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c7-v4.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-c7-v4", "qca,qca9563";
11 model = "TP-Link Archer C7 v4";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 label-mac-device = &eth0;
19 };
20
21 led_spi {
22 compatible = "spi-gpio";
23 #address-cells = <1>;
24 #size-cells = <0>;
25
26 sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; // 74HC595 SRCLK (Serial Clock)
27 mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial)
28 cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; // 74HC595 RCLK (Register Clock)
29 num-chipselects = <1>;
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 gpio-export {
42 compatible = "gpio-export";
43
44 gpio_shift_register_oe {
45 gpio-export,name = "tp-link:oe:sr";
46 gpio-export,output = <0>;
47 gpios = <&gpio 1 GPIO_ACTIVE_LOW>; // 74HC595 /OE (Output Enable)
48 };
49
50 gpio_shift_register_reset {
51 gpio-export,name = "tp-link:reset:sr";
52 gpio-export,output = <1>;
53 gpios = <&gpio 21 GPIO_ACTIVE_LOW>; // 74HC595 /SRCLR (Serial Clear)
54 };
55 };
56
57 leds {
58 compatible = "gpio-leds";
59
60 led_system: system {
61 label = "tp-link:green:system";
62 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
63 default-state = "on";
64 };
65
66 usb1 {
67 label = "tp-link:green:usb1";
68 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&hub_port1>;
70 linux,default-trigger = "usbport";
71 };
72
73 usb2 {
74 label = "tp-link:green:usb2";
75 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
76 trigger-sources = <&hub_port0>;
77 linux,default-trigger = "usbport";
78 };
79
80 wlan5g {
81 label = "tp-link:green:wlan5g";
82 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
83 linux,default-trigger = "phy0tpt";
84 };
85
86 wlan2g {
87 label = "tp-link:green:wlan2g";
88 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
89 linux,default-trigger = "phy1tpt";
90 };
91
92 wan {
93 label = "tp-link:green:wan";
94 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
95 };
96
97 wan_fail {
98 label = "tp-link:orange:wan";
99 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
100 };
101
102 lan1 {
103 label = "tp-link:green:lan1";
104 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
105 };
106
107 lan2 {
108 label = "tp-link:green:lan2";
109 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
110 };
111
112 lan3 {
113 label = "tp-link:green:lan3";
114 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
115 };
116
117 lan4 {
118 label = "tp-link:green:lan4";
119 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
120 };
121
122 wps {
123 label = "tp-link:green:wps";
124 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
125 };
126 };
127
128 keys {
129 compatible = "gpio-keys";
130
131 reset {
132 label = "Reset button";
133 linux,code = <KEY_RESTART>;
134 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
135 debounce-interval = <60>;
136 };
137
138 wps {
139 label = "WPS button";
140 linux,code = <KEY_WPS_BUTTON>;
141 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
142 debounce-interval = <60>;
143 };
144 };
145 };
146
147 &pcie {
148 status = "okay";
149 };
150
151 &uart {
152 status = "okay";
153 };
154
155 &usb_phy0 {
156 status = "okay";
157 };
158
159 &usb0 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 status = "okay";
163
164 hub_port0: port@1 {
165 reg = <1>;
166 #trigger-source-cells = <0>;
167 };
168 };
169
170 &usb_phy1 {
171 status = "okay";
172 };
173
174 &usb1 {
175 #address-cells = <1>;
176 #size-cells = <0>;
177 status = "okay";
178
179 hub_port1: port@1 {
180 reg = <1>;
181 #trigger-source-cells = <0>;
182 };
183 };
184
185 &spi {
186 status = "okay";
187
188 num-cs = <1>;
189
190 flash@0 {
191 compatible = "jedec,spi-nor";
192 reg = <0>;
193 spi-max-frequency = <25000000>;
194
195 partitions {
196 compatible = "fixed-partitions";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 partition@0 {
201 label = "factory-uboot";
202 reg = <0x000000 0x020000>;
203 read-only;
204 };
205
206 partition@20000 {
207 label = "u-boot";
208 reg = <0x020000 0x020000>;
209 read-only;
210 };
211
212 partition@40000 {
213 label = "firmware";
214 reg = <0x040000 0xec0000>;
215 compatible = "denx,uimage";
216 };
217
218 info: partition@f00000 {
219 label = "info";
220 reg = <0xf00000 0x0f0000>;
221 read-only;
222 };
223
224 art: partition@ff0000 {
225 label = "art";
226 reg = <0xff0000 0x010000>;
227 read-only;
228 };
229 };
230 };
231 };
232
233 &mdio0 {
234 status = "okay";
235
236 phy-mask = <0>;
237
238 phy0: ethernet-phy@0 {
239 reg = <0>;
240 phy-mode = "sgmii";
241 qca,mib-poll-interval = <500>;
242
243 qca,ar8327-initvals = <
244 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
245 0x7c 0x0000007e /* PORT0_STATUS */
246 0x94 0x00000200 /* PORT6_STATUS */
247 >;
248 };
249 };
250
251 &eth0 {
252 status = "okay";
253
254 pll-data = <0x03000101 0x00000101 0x00001919>;
255
256 phy-mode = "sgmii";
257 mtd-mac-address = <&info 0x8>;
258 phy-handle = <&phy0>;
259 };
260
261 &wmac {
262 status = "okay";
263
264 mtd-cal-data = <&art 0x1000>;
265 mtd-mac-address = <&info 0x8>;
266 };