ath79: split dts file for Netgear WNDR4300
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_netgear_wndr.dtsi
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 "ar9344.dtsi"
8
9 / {
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 aliases {
15 led-boot = &led_power_amber;
16 led-failsafe = &led_power_amber;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_amber;
19 label-mac-device = &eth0;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 wps {
26 label = "wps";
27 linux,code = <KEY_WPS_BUTTON>;
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 };
30
31 reset {
32 label = "reset";
33 linux,code = <KEY_RESTART>;
34 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
35 };
36
37 rfkill {
38 label = "rfkill";
39 linux,code = <KEY_RFKILL>;
40 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 pinctrl-names = "default";
48 pinctrl-0 = <&enable_gpio_11>;
49
50 led_power_green: power_green {
51 label = "netgear:green:power";
52 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
53 };
54
55 led_power_amber: power_amber {
56 label = "netgear:amber:power";
57 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
58 default-state = "keep";
59 };
60
61 wan_green {
62 label = "netgear:green:wan";
63 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
64 };
65
66 wan_amber {
67 label = "netgear:amber:wan";
68 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
69 };
70
71 wlan2g_green {
72 label = "netgear:green:wlan2g";
73 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "phy0tpt";
75 };
76
77 wlan5g_blue {
78 label = "netgear:blue:wlan5g";
79 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "phy1tpt";
81 };
82
83 wps_green {
84 label = "netgear:green:wps";
85 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
86 };
87
88 wps_amber {
89 label = "netgear:amber:wps";
90 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
91 };
92
93 usb_green {
94 label = "netgear:green:usb";
95 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
96 trigger-sources = <&hub_port>;
97 linux,default-trigger = "usbport";
98 };
99 };
100 };
101
102 &pinmux {
103 enable_gpio_11: pinmux_enable_gpio_11 {
104 pinctrl-single,bits = <0x8 0x0 0xff000000>;
105 };
106 };
107
108 &nand {
109 status = "okay";
110
111 partitions {
112 compatible = "fixed-partitions";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 partition@0 {
117 label = "u-boot";
118 reg = <0x0 0x40000>;
119 read-only;
120 };
121
122 partition@40000 {
123 label = "u-boot-env";
124 reg = <0x40000 0x40000>;
125 };
126
127 art: partition@80000 {
128 label = "caldata";
129 reg = <0x80000 0x40000>;
130 read-only;
131 };
132
133 partition@c0000 {
134 label = "pot";
135 reg = <0xc0000 0x80000>;
136 };
137
138 partition@140000 {
139 label = "language";
140 reg = <0x140000 0x200000>;
141 };
142
143 partition@340000 {
144 label = "config";
145 reg = <0x340000 0x80000>;
146 };
147
148 partition@3c0000 {
149 label = "traffic_meter";
150 reg = <0x3c0000 0x300000>;
151 };
152
153 kernel@6c0000 {
154 label = "kernel";
155 reg = <0x6c0000 0x200000>;
156 };
157
158 ubi@8c0000 {
159 label = "ubi";
160 reg = <0x8c0000 0x1700000>;
161 };
162
163 partition@6c0000 {
164 label = "firmware";
165 reg = <0x6c0000 0x1900000>;
166 compatible = "netgear,uimage";
167 };
168
169 partition@1fc0000 {
170 label = "caldata_backup";
171 reg = <0x1fc0000 0x40000>;
172 read-only;
173 };
174
175 partition@2000000 {
176 label = "reserved";
177 reg = <0x2000000 0x6000000>;
178 read-only;
179 };
180 };
181 };
182
183 &ref {
184 clock-frequency = <40000000>;
185 };
186
187 &builtin_switch {
188 resets = <&rst 8>, <&rst 12>;
189 reset-names = "switch", "switch-analog";
190 };
191
192 &mdio0 {
193 status = "okay";
194
195 phy-mask = <0>;
196
197 phy0: ethernet-phy@0 {
198 reg = <0>;
199 phy-mode = "rgmii";
200 qca,mib-poll-interval = <500>;
201
202 qca,ar8327-initvals = <
203 0x04 0x07600000
204 0x0c 0x01000000
205 0x10 0xc1000000
206 0x50 0xcc35cc35
207 0x54 0xcb37cb37
208 0x58 0x00000000
209 0x5c 0x00f3cf00
210 0x7c 0x0000007e
211 0x94 0x0000007e
212 >;
213 };
214 };
215
216 &eth0 {
217 status = "okay";
218
219 /* default for ar934x, except for 1000M */
220 pll-data = <0x06000000 0x00000101 0x00001616>;
221
222 mtd-mac-address = <&art 0x0>;
223
224 phy-mode = "rgmii";
225 phy-handle = <&phy0>;
226 };
227
228 &gpio {
229 status = "okay";
230
231 lna0 {
232 gpio-hog;
233 line-name = "netgear:ext:lna0";
234 gpios = <18 GPIO_ACTIVE_HIGH>;
235 output-high;
236 };
237
238 lna1 {
239 gpio-hog;
240 line-name = "netgear:ext:lna1";
241 gpios = <19 GPIO_ACTIVE_HIGH>;
242 output-high;
243 };
244 };
245
246 &wmac {
247 status = "okay";
248
249 mtd-mac-address = <&art 0x0>;
250 qca,no-eeprom;
251 };
252
253 &pcie {
254 status = "okay";
255
256 ath9k: wifi@0,0 {
257 compatible = "pci168c,0033";
258 reg = <0x0000 0 0 0 0>;
259 mtd-mac-address = <&art 0xc>;
260 qca,no-eeprom;
261 #gpio-cells = <2>;
262 gpio-controller;
263
264 usb_power {
265 gpio-hog;
266 line-name = "netgear:power:usb";
267 gpios = <0 GPIO_ACTIVE_HIGH>;
268 output-high;
269 };
270 };
271 };
272
273 &usb_phy {
274 status = "okay";
275 };
276
277 &usb {
278 status = "okay";
279 #address-cells = <1>;
280 #size-cells = <0>;
281
282 hub_port: port@1 {
283 reg = <1>;
284 #trigger-source-cells = <0>;
285 };
286 };
287
288 &uart {
289 status = "okay";
290 };