ath79: drop and consolidate redundant chosen/bootargs
[oweals/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 &gpio {
156         status = "okay";
157 };
158
159 &usb_phy0 {
160         status = "okay";
161 };
162
163 &usb0 {
164         #address-cells = <1>;
165         #size-cells = <0>;
166         status = "okay";
167
168         hub_port0: port@1 {
169                 reg = <1>;
170                 #trigger-source-cells = <0>;
171         };
172 };
173
174 &usb_phy1 {
175         status = "okay";
176 };
177
178 &usb1 {
179         #address-cells = <1>;
180         #size-cells = <0>;
181         status = "okay";
182
183         hub_port1: port@1 {
184                 reg = <1>;
185                 #trigger-source-cells = <0>;
186         };
187 };
188
189 &spi {
190         status = "okay";
191
192         num-cs = <1>;
193
194         flash@0 {
195                 compatible = "jedec,spi-nor";
196                 reg = <0>;
197                 spi-max-frequency = <25000000>;
198
199                 partitions {
200                         compatible = "fixed-partitions";
201                         #address-cells = <1>;
202                         #size-cells = <1>;
203
204                         partition@0 {
205                                 label = "factory-uboot";
206                                 reg = <0x000000 0x020000>;
207                                 read-only;
208                         };
209
210                         partition@20000 {
211                                 label = "u-boot";
212                                 reg = <0x020000 0x020000>;
213                                 read-only;
214                         };
215
216                         partition@40000 {
217                                 label = "firmware";
218                                 reg = <0x040000 0xec0000>;
219                                 compatible = "denx,uimage";
220                         };
221
222                         info: partition@f00000 {
223                                 label = "info";
224                                 reg = <0xf00000 0x0f0000>;
225                                 read-only;
226                         };
227
228                         art: partition@ff0000 {
229                                 label = "art";
230                                 reg = <0xff0000 0x010000>;
231                                 read-only;
232                         };
233                 };
234         };
235 };
236
237 &mdio0 {
238         status = "okay";
239
240         phy-mask = <0>;
241
242         phy0: ethernet-phy@0 {
243                 reg = <0>;
244                 phy-mode = "sgmii";
245                 qca,mib-poll-interval = <500>;
246
247                 qca,ar8327-initvals = <
248                         0x04 0x80080080 /* PORT0 PAD MODE CTRL */
249                         0x7c 0x0000007e /* PORT0_STATUS */
250                         0x94 0x00000200 /* PORT6_STATUS */
251                         >;
252         };
253 };
254
255 &eth0 {
256         status = "okay";
257
258         pll-data = <0x03000101 0x00000101 0x00001919>;
259
260         phy-mode = "sgmii";
261         mtd-mac-address = <&info 0x8>;
262         phy-handle = <&phy0>;
263 };
264
265 &wmac {
266         status = "okay";
267
268         mtd-cal-data = <&art 0x1000>;
269         mtd-mac-address = <&info 0x8>;
270 };