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