ath79: add support for Netgear WNR1000 v2
[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 <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9 compatible = "tplink,archer-c5x", "qca,qca9560";
10
11 aliases {
12 led-boot = &power;
13 led-failsafe = &power;
14 led-running = &power;
15 led-upgrade = &power;
16 label-mac-device = &eth1;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200n8";
21 };
22
23 led_spi {
24 compatible = "spi-gpio";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 sck-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
29 mosi-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
30 cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
31 num-chipselects = <1>;
32
33 led_gpio: led_gpio@0 {
34 compatible = "fairchild,74hc595";
35 reg = <0>;
36 gpio-controller;
37 #gpio-cells = <2>;
38 registers-number = <1>;
39 spi-max-frequency = <10000000>;
40 };
41 };
42
43 leds: leds {
44 compatible = "gpio-leds";
45
46 power: power {
47 label = "tp-link:green:power";
48 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
49 default-state = "on";
50 };
51
52 wlan2g {
53 label = "tp-link:green:wlan2g";
54 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "phy1tpt";
56 };
57
58 wlan5g {
59 label = "tp-link:green:wlan5g";
60 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
61 linux,default-trigger = "phy0tpt";
62 };
63
64 wan_green {
65 label = "tp-link:green:wan";
66 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
67 };
68
69 wan_amber {
70 label = "tp-link:amber:wan";
71 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
72 };
73
74 lan {
75 label = "tp-link:green:lan";
76 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
77 };
78
79 wps {
80 label = "tp-link:green:wps";
81 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87
88 wps_button {
89 label = "WPS button";
90 linux,code = <KEY_WPS_BUTTON>;
91 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
92 };
93
94 wifi_button {
95 label = "WiFi button";
96 linux,code = <KEY_RFKILL>;
97 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
98 };
99
100 reset_button {
101 label = "Reset button";
102 linux,code = <KEY_RESTART>;
103 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
104 };
105 };
106
107 gpio-export {
108 compatible = "gpio-export";
109
110 gpio_shift_register_oe {
111 gpio-export,name = "tp-link:oe:sr";
112 gpio-export,output = <0>;
113 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
114 };
115
116 gpio_shift_register_reset {
117 gpio-export,name = "tp-link:reset:sr";
118 gpio-export,output = <1>;
119 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
120 };
121 };
122 };
123
124 &uart {
125 status = "okay";
126 };
127
128 &gpio {
129 status = "okay";
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &eth0 {
137 status = "okay";
138
139 phy-mode = "mii";
140 phy-handle = <&swphy0>;
141
142 mtd-mac-address = <&mac 0x8>;
143 mtd-mac-address-increment = <1>;
144
145 gmac-config {
146 device = <&gmac>;
147
148 switch-phy-addr-swap = <1>;
149 switch-phy-swap = <1>;
150 };
151 };
152
153 &eth1 {
154 status = "okay";
155
156 mtd-mac-address = <&mac 0x8>;
157 };
158
159 &wmac {
160 status = "okay";
161
162 mtd-cal-data = <&art 0x1000>;
163 mtd-mac-address = <&mac 0x8>;
164 };