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