ath79: buffalo_wzr-hp-g450h: fix 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 button@0 {
78 label = "reset";
79 linux,code = <KEY_RESTART>;
80 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
81 debounce-interval = <60>;
82 };
83
84 button@1 {
85 label = "wifi";
86 linux,code = <KEY_RFKILL>;
87 linux,input-type = <EV_SW>;
88 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
89 debounce-interval = <60>;
90 };
91 };
92
93 gpio-export {
94 compatible = "gpio-export";
95 #size-cells = <0>;
96
97 gpio_usb1_power {
98 gpio-export,name = "tp-link:power:usb1";
99 gpio-export,output = <1>;
100 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
101 };
102
103 gpio_usb2_power {
104 gpio-export,name = "tp-link:power:usb2";
105 gpio-export,output = <1>;
106 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
107 };
108
109 gpio_ext_lna0 {
110 gpio-export,name = "tp-link:ext:lna0";
111 gpio-export,output = <1>;
112 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
113 };
114
115 gpio_ext_lna1 {
116 gpio-export,name = "tp-link:ext:lna1";
117 gpio-export,output = <1>;
118 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
119 };
120 };
121 };
122
123 &ref {
124 clock-frequency = <40000000>;
125 };
126
127 &uart {
128 status = "okay";
129 };
130
131 &gpio {
132 status = "okay";
133 };
134
135 &spi {
136 num-cs = <1>;
137
138 status = "okay";
139
140 flash@0 {
141 #address-cells = <1>;
142 #size-cells = <1>;
143 compatible = "jedec,spi-nor";
144 reg = <0>;
145 spi-max-frequency = <25000000>;
146
147 partitions {
148 compatible = "fixed-partitions";
149 #address-cells = <1>;
150 #size-cells = <1>;
151
152 uboot: partition@0 {
153 label = "u-boot";
154 reg = <0x000000 0x020000>;
155 read-only;
156 };
157
158 partition@20000 {
159 label = "firmware";
160 reg = <0x020000 0x7d0000>;
161 };
162
163 partition@7f0000 {
164 label = "art";
165 reg = <0x7f0000 0x010000>;
166 read-only;
167 };
168 };
169 };
170 };
171
172 &usb {
173 status = "okay";
174
175 port@1 {
176 reg = <1>;
177 #trigger-source-cells = <0>;
178
179 hub_port1: port@1 {
180 reg = <1>;
181 #trigger-source-cells = <0>;
182 };
183
184 hub_port2: port@2 {
185 reg = <2>;
186 #trigger-source-cells = <0>;
187 };
188 };
189 };
190
191 &usb_phy {
192 status = "okay";
193 };
194
195 &pcie {
196 status = "okay";
197
198 ath9k: wifi@168c,0033 {
199 compatible = "pci168c,0033";
200 reg = <0x0000 0 0 0 0>;
201 mtd-mac-address = <&uboot 0x1fc00>;
202 qca,no-eeprom;
203 #gpio-cells = <2>;
204 gpio-controller;
205 };
206 };
207
208 &mdio0 {
209 status = "okay";
210
211 phy-mask = <0>;
212
213 phy0: ethernet-phy@0 {
214 reg = <0>;
215 phy-mode = "rgmii";
216
217 qca,ar8327-initvals = <
218 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
219 0x10 0x80000080 /* POWER_ON_STRIP */
220 0x50 0xc737c737 /* LED_CTRL0 */
221 0x54 0x00000000 /* LED_CTRL1 */
222 0x58 0x00000000 /* LED_CTRL2 */
223 0x5c 0x0030c300 /* LED_CTRL3 */
224 0x7c 0x0000007e /* PORT0_STATUS */
225 >;
226 };
227 };
228
229 &eth0 {
230 status = "okay";
231
232 /* default for ar934x, except for 1000M */
233 pll-data = <0x06000000 0x00000101 0x00001616>;
234
235 mtd-mac-address = <&uboot 0x1fc00>;
236 mtd-mac-address-increment = <(-2)>;
237
238 phy-mode = "rgmii";
239 phy-handle = <&phy0>;
240 };