9ba6ccfafdbe5a27e410b19a90b5a2cb39f1a7aa
[openwrt/openwrt.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
8 / {
9 compatible = "tplink,archer-c5x", "qca,qca9560";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &eth1;
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 label = "green:power";
44 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
45 default-state = "on";
46 };
47
48 wlan2g {
49 label = "green:wlan2g";
50 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
52 };
53
54 wlan5g {
55 label = "green:wlan5g";
56 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy0tpt";
58 };
59
60 wan_green {
61 label = "green:wan";
62 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
63 };
64
65 wan_amber {
66 label = "amber:wan";
67 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
68 };
69
70 lan {
71 label = "green:lan";
72 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
73 };
74
75 wps {
76 label = "green:wps";
77 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
78 };
79 };
80
81 keys {
82 compatible = "gpio-keys";
83
84 wps {
85 label = "WPS button";
86 linux,code = <KEY_WPS_BUTTON>;
87 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
88 };
89
90 wifi {
91 label = "WiFi button";
92 linux,code = <KEY_RFKILL>;
93 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
94 };
95
96 reset {
97 label = "Reset button";
98 linux,code = <KEY_RESTART>;
99 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
100 };
101 };
102
103 gpio-export {
104 compatible = "gpio-export";
105
106 gpio_shift_register_oe {
107 gpio-export,name = "tp-link:oe:sr";
108 gpio-export,output = <0>;
109 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
110 };
111
112 gpio_shift_register_reset {
113 gpio-export,name = "tp-link:reset:sr";
114 gpio-export,output = <1>;
115 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
116 };
117 };
118 };
119
120 &uart {
121 status = "okay";
122 };
123
124 &pcie {
125 status = "okay";
126 };
127
128 &eth0 {
129 status = "okay";
130
131 phy-handle = <&swphy0>;
132
133 mtd-mac-address = <&info 0x8>;
134 mtd-mac-address-increment = <1>;
135
136 gmac-config {
137 device = <&gmac>;
138
139 switch-phy-addr-swap = <1>;
140 switch-phy-swap = <1>;
141 };
142 };
143
144 &eth1 {
145 status = "okay";
146
147 mtd-mac-address = <&info 0x8>;
148 };
149
150 &wmac {
151 status = "okay";
152
153 mtd-cal-data = <&art 0x1000>;
154 mtd-mac-address = <&info 0x8>;
155 };