ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c5x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,archer-c5x", "qca,qca9560";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 led_spi {
20 compatible = "spi-gpio";
21 #address-cells = <1>;
22 #size-cells = <0>;
23
24 sck-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
25 mosi-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
26 cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
27 num-chipselects = <1>;
28
29 led_gpio: led_gpio@0 {
30 compatible = "fairchild,74hc595";
31 reg = <0>;
32 gpio-controller;
33 #gpio-cells = <2>;
34 registers-number = <1>;
35 spi-max-frequency = <10000000>;
36 };
37 };
38
39 leds: leds {
40 compatible = "gpio-leds";
41
42 led_power: power {
43 function = LED_FUNCTION_POWER;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
46 default-state = "on";
47 };
48
49 wlan2g {
50 label = "green:wlan2g";
51 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy1tpt";
53 };
54
55 wlan5g {
56 label = "green:wlan5g";
57 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 wan_green {
62 function = LED_FUNCTION_WAN;
63 color = <LED_COLOR_ID_GREEN>;
64 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
65 };
66
67 wan_amber {
68 function = LED_FUNCTION_WAN;
69 color = <LED_COLOR_ID_AMBER>;
70 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
71 };
72
73 lan {
74 function = LED_FUNCTION_LAN;
75 color = <LED_COLOR_ID_GREEN>;
76 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
77 };
78
79 wps {
80 function = LED_FUNCTION_WPS;
81 color = <LED_COLOR_ID_GREEN>;
82 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
83 };
84 };
85
86 keys {
87 compatible = "gpio-keys";
88
89 wps {
90 label = "WPS button";
91 linux,code = <KEY_WPS_BUTTON>;
92 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
93 };
94
95 wifi {
96 label = "WiFi button";
97 linux,code = <KEY_RFKILL>;
98 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
99 };
100
101 reset {
102 label = "Reset button";
103 linux,code = <KEY_RESTART>;
104 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
105 };
106 };
107
108 gpio-export {
109 compatible = "gpio-export";
110
111 gpio_shift_register_oe {
112 gpio-export,name = "tp-link:oe:sr";
113 gpio-export,output = <0>;
114 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
115 };
116
117 gpio_shift_register_reset {
118 gpio-export,name = "tp-link:reset:sr";
119 gpio-export,output = <1>;
120 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
121 };
122 };
123 };
124
125 &pcie {
126 status = "okay";
127 };
128
129 &eth0 {
130 status = "okay";
131
132 phy-handle = <&swphy0>;
133
134 gmac-config {
135 device = <&gmac>;
136
137 switch-phy-addr-swap = <1>;
138 switch-phy-swap = <1>;
139 };
140 };
141
142 &eth1 {
143 status = "okay";
144 };
145
146 &wmac {
147 status = "okay";
148 };