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>
9 compatible = "tplink,archer-c7-v4", "qca,qca9563";
10 model = "TP-Link Archer C7 v4";
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = ð0;
21 compatible = "spi-gpio";
25 sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; // 74HC595 SRCLK (Serial Clock)
26 mosi-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial)
27 cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; // 74HC595 RCLK (Register Clock)
28 num-chipselects = <1>;
30 led_gpio: led_gpio@0 {
31 compatible = "fairchild,74hc595";
35 registers-number = <1>;
36 spi-max-frequency = <10000000>;
41 compatible = "gpio-export";
43 gpio_shift_register_oe {
44 gpio-export,name = "tp-link:oe:sr";
45 gpio-export,output = <0>;
46 gpios = <&gpio 1 GPIO_ACTIVE_LOW>; // 74HC595 /OE (Output Enable)
49 gpio_shift_register_reset {
50 gpio-export,name = "tp-link:reset:sr";
51 gpio-export,output = <1>;
52 gpios = <&gpio 21 GPIO_ACTIVE_LOW>; // 74HC595 /SRCLR (Serial Clear)
57 compatible = "gpio-leds";
60 label = "green:system";
61 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
67 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
68 trigger-sources = <&hub_port1>;
69 linux,default-trigger = "usbport";
74 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
75 trigger-sources = <&hub_port0>;
76 linux,default-trigger = "usbport";
80 label = "green:wlan5g";
81 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
82 linux,default-trigger = "phy0tpt";
86 label = "green:wlan2g";
87 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
88 linux,default-trigger = "phy1tpt";
93 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
98 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
102 label = "green:lan1";
103 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
107 label = "green:lan2";
108 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
112 label = "green:lan3";
113 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
117 label = "green:lan4";
118 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
123 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
128 compatible = "gpio-keys";
131 label = "Reset button";
132 linux,code = <KEY_RESTART>;
133 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
134 debounce-interval = <60>;
138 label = "WPS button";
139 linux,code = <KEY_WPS_BUTTON>;
140 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
141 debounce-interval = <60>;
170 compatible = "jedec,spi-nor";
172 spi-max-frequency = <25000000>;
175 compatible = "fixed-partitions";
176 #address-cells = <1>;
180 label = "factory-uboot";
181 reg = <0x000000 0x020000>;
187 reg = <0x020000 0x020000>;
193 reg = <0x040000 0xec0000>;
194 compatible = "denx,uimage";
197 info: partition@f00000 {
199 reg = <0xf00000 0x0f0000>;
203 compatible = "fixed-layout";
204 #address-cells = <1>;
207 macaddr_info_8: macaddr@8 {
213 art: partition@ff0000 {
215 reg = <0xff0000 0x010000>;
225 phy0: ethernet-phy@0 {
228 qca,mib-poll-interval = <500>;
230 qca,ar8327-initvals = <
231 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
232 0x7c 0x0000007e /* PORT0_STATUS */
233 0x94 0x00000200 /* PORT6_STATUS */
241 pll-data = <0x03000101 0x00000101 0x00001919>;
244 nvmem-cells = <&macaddr_info_8>;
245 nvmem-cell-names = "mac-address";
246 phy-handle = <&phy0>;
252 mtd-cal-data = <&art 0x1000>;
253 nvmem-cells = <&macaddr_info_8>;
254 nvmem-cell-names = "mac-address";