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