ath79: etactica-eg200: fix restore button
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wdr4900-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca9557.dtsi"
8
9 / {
10 compatible = "tplink,tl-wdr4900-v2", "qca,qca9558";
11 model = "TP-Link TL-WDR4900 v2";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 gpio_leds: leds {
25 compatible = "gpio-leds";
26
27 led_system: system {
28 label = "tp-link:blue:system";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 usb1 {
34 label = "tp-link:green:usb1";
35 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
36 trigger-sources = <&hub_port1>;
37 linux,default-trigger = "usbport";
38 };
39
40 usb2 {
41 label = "tp-link:green:usb2";
42 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
43 trigger-sources = <&hub_port0>;
44 linux,default-trigger = "usbport";
45 };
46
47 wlan2g {
48 label = "tp-link:blue:wlan2g";
49 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy0tpt";
51 };
52
53 qss {
54 label = "tp-link:blue:qss";
55 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 ath9k-leds {
60 compatible = "gpio-leds";
61
62 wlan5g {
63 label = "tp-link:blue:wlan5g";
64 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
65 linux,default-trigger = "phy1tpt";
66 };
67 };
68
69 keys {
70 compatible = "gpio-keys";
71
72 reset {
73 label = "Reset button";
74 linux,code = <KEY_RESTART>;
75 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
76 debounce-interval = <60>;
77 };
78 };
79
80 gpio-export {
81 compatible = "gpio-export";
82
83 gpio_usb1_power {
84 gpio-export,name = "tp-link:power:usb1";
85 gpio-export,output = <1>;
86 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
87 };
88
89 gpio_usb2_power {
90 gpio-export,name = "tp-link:power:usb2";
91 gpio-export,output = <1>;
92 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
93 };
94 };
95 };
96
97 &pcie1 {
98 status = "okay";
99
100 ath9k: wifi@0,0 {
101 compatible = "pci168c,0033";
102 reg = <0x0000 0 0 0 0>;
103 mtd-mac-address = <&uboot 0x1fc00>;
104 mtd-mac-address-increment = <(-2)>;
105 qca,no-eeprom;
106 #gpio-cells = <2>;
107 gpio-controller;
108 };
109 };
110
111 &uart {
112 status = "okay";
113 };
114
115 &usb_phy0 {
116 status = "okay";
117 };
118
119 &usb0 {
120 #address-cells = <1>;
121 #size-cells = <0>;
122 status = "okay";
123
124 hub_port0: port@1 {
125 reg = <1>;
126 #trigger-source-cells = <0>;
127 };
128 };
129
130 &usb_phy1 {
131 status = "okay";
132 };
133
134 &usb1 {
135 #address-cells = <1>;
136 #size-cells = <0>;
137 status = "okay";
138
139 hub_port1: port@1 {
140 reg = <1>;
141 #trigger-source-cells = <0>;
142 };
143 };
144
145 &spi {
146 status = "okay";
147 num-cs = <1>;
148
149 flash@0 {
150 compatible = "jedec,spi-nor";
151 reg = <0>;
152 spi-max-frequency = <25000000>;
153
154 partitions {
155 compatible = "fixed-partitions";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 uboot: partition@0 {
160 label = "u-boot";
161 reg = <0x000000 0x020000>;
162 read-only;
163 };
164
165 partition@20000 {
166 compatible = "tplink,firmware";
167 label = "firmware";
168 reg = <0x020000 0x7d0000>;
169 };
170
171 art: partition@7f0000 {
172 label = "art";
173 reg = <0x7f0000 0x010000>;
174 read-only;
175 };
176 };
177 };
178 };
179
180 &mdio0 {
181 status = "okay";
182
183 phy0: ethernet-phy@0 {
184 reg = <0>;
185
186 qca,ar8327-initvals = <
187 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
188 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
189 0x50 0xc737c737 /* LED_CTRL0 */
190 0x54 0x00000000 /* LED_CTRL1 */
191 0x58 0x00000000 /* LED_CTRL2 */
192 0x5c 0x0030c300 /* LED_CTRL3 */
193 0x7c 0x0000007e /* PORT0_STATUS */
194 0x94 0x0000007e /* PORT6 STATUS */
195 >;
196 };
197 };
198
199 &eth0 {
200 status = "okay";
201
202 mtd-mac-address = <&uboot 0x1fc00>;
203 mtd-mac-address-increment = <1>;
204 phy-handle = <&phy0>;
205 pll-data = <0x56000000 0x00000101 0x00001616>;
206
207 gmac-config {
208 device = <&gmac>;
209 rgmii-enabled = <1>;
210 };
211 };
212
213 &eth1 {
214 status = "okay";
215
216 mtd-mac-address = <&uboot 0x1fc00>;
217 pll-data = <0x03000101 0x00000101 0x00001616>;
218
219 fixed-link {
220 speed = <1000>;
221 full-duplex;
222 };
223 };
224
225 &wmac {
226 status = "okay";
227 mtd-cal-data = <&art 0x1000>;
228 mtd-mac-address = <&uboot 0x1fc00>;
229 mtd-mac-address-increment = <(-1)>;
230 };