1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "qca956x.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
10 compatible = "tplink,archer-c7-v4", "qca,qca9563";
11 model = "TP-Link Archer C7 v4";
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 label-mac-device = ð0;
22 compatible = "spi-gpio";
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>;
31 led_gpio: led_gpio@0 {
32 compatible = "fairchild,74hc595";
36 registers-number = <1>;
37 spi-max-frequency = <10000000>;
42 compatible = "gpio-export";
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)
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)
58 compatible = "gpio-leds";
61 label = "green:system";
62 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
68 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&hub_port1>;
70 linux,default-trigger = "usbport";
75 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
76 trigger-sources = <&hub_port0>;
77 linux,default-trigger = "usbport";
81 label = "green:wlan5g";
82 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
83 linux,default-trigger = "phy0tpt";
87 label = "green:wlan2g";
88 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
89 linux,default-trigger = "phy1tpt";
93 function = LED_FUNCTION_WAN;
94 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
99 function = LED_FUNCTION_WAN;
100 color = <LED_COLOR_ID_ORANGE>;
101 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
105 label = "green:lan1";
106 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
110 label = "green:lan2";
111 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
115 label = "green:lan3";
116 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
120 label = "green:lan4";
121 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
125 function = LED_FUNCTION_WPS;
126 color = <LED_COLOR_ID_GREEN>;
127 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
132 compatible = "gpio-keys";
135 label = "Reset button";
136 linux,code = <KEY_RESTART>;
137 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
138 debounce-interval = <60>;
142 label = "WPS button";
143 linux,code = <KEY_WPS_BUTTON>;
144 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
145 debounce-interval = <60>;
154 compatible = "qcom,ath10k";
155 reg = <0x0000 0 0 0 0>;
156 nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
157 nvmem-cell-names = "calibration", "mac-address";
181 compatible = "jedec,spi-nor";
183 spi-max-frequency = <25000000>;
186 compatible = "fixed-partitions";
187 #address-cells = <1>;
191 label = "factory-uboot";
192 reg = <0x000000 0x020000>;
198 reg = <0x020000 0x020000>;
204 reg = <0x040000 0xec0000>;
205 compatible = "denx,uimage";
208 info: partition@f00000 {
210 reg = <0xf00000 0x0f0000>;
214 compatible = "fixed-layout";
215 #address-cells = <1>;
218 macaddr_info_8: macaddr@8 {
219 compatible = "mac-base";
221 #nvmem-cell-cells = <1>;
226 art: partition@ff0000 {
228 reg = <0xff0000 0x010000>;
232 compatible = "fixed-layout";
233 #address-cells = <1>;
236 cal_art_5000: calibration@5000 {
237 reg = <0x5000 0x844>;
248 phy0: ethernet-phy@0 {
251 qca,mib-poll-interval = <500>;
253 qca,ar8327-initvals = <
254 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
255 0x7c 0x0000007e /* PORT0_STATUS */
256 0x94 0x00000200 /* PORT6_STATUS */
264 pll-data = <0x03000101 0x00000101 0x00001919>;
267 nvmem-cells = <&macaddr_info_8 0>;
268 nvmem-cell-names = "mac-address";
269 phy-handle = <&phy0>;
275 mtd-cal-data = <&art 0x1000>;
276 nvmem-cells = <&macaddr_info_8 0>;
277 nvmem-cell-names = "mac-address";