49057548f89dc8b797e1a40dad1f603ef4d804a5
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/mtd/partitions/uimage.h>
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: 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 = "green:power";
52 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
53 };
54
55 led_power_amber: power_amber {
56 label = "amber:power";
57 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
58 default-state = "keep";
59 };
60
61 wlan2g_green {
62 label = "green:wlan2g";
63 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66
67 wlan5g_blue {
68 label = "blue:wlan5g";
69 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
70 linux,default-trigger = "phy1tpt";
71 };
72
73 wps_green {
74 label = "green:wps";
75 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
76 };
77
78 wps_amber {
79 label = "amber:wps";
80 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
81 };
82 };
83
84 ubi-concat {
85 compatible = "mtd-concat";
86 devices = <&ubiconcat0 &ubiconcat1>;
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 ubi@0 {
94 label = "ubi";
95 reg = <0x0 0x7500000>;
96 };
97 };
98 };
99 };
100
101 &pinmux {
102 enable_gpio_11: pinmux_enable_gpio_11 {
103 pinctrl-single,bits = <0x8 0x0 0xff000000>;
104 };
105 };
106
107 &nand {
108 status = "okay";
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "u-boot";
117 reg = <0x0 0x40000>;
118 read-only;
119 };
120
121 partition@40000 {
122 label = "u-boot-env";
123 reg = <0x40000 0x40000>;
124 };
125
126 caldata: partition@80000 {
127 label = "caldata";
128 reg = <0x80000 0x40000>;
129 read-only;
130
131 nvmem-layout {
132 compatible = "fixed-layout";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 macaddr_caldata_0: macaddr@0 {
137 reg = <0x0 0x6>;
138 };
139
140 macaddr_caldata_c: macaddr@c {
141 reg = <0xc 0x6>;
142 };
143
144 cal_art_1000: cal@1000 {
145 reg = <0x1000 0x440>;
146 };
147
148 cal_art_5000: cal@5000 {
149 reg = <0x5000 0x440>;
150 };
151 };
152 };
153
154 partition@c0000 {
155 label = "pot";
156 reg = <0xc0000 0x80000>;
157 };
158
159 partition@140000 {
160 label = "language";
161 reg = <0x140000 0x200000>;
162 };
163
164 partition@340000 {
165 label = "config";
166 reg = <0x340000 0x80000>;
167 };
168
169 partition@3c0000 {
170 label = "traffic_meter";
171 reg = <0x3c0000 0x300000>;
172 };
173
174 partition@6c0000 {
175 label = "firmware";
176 reg = <0x6c0000 0x1900000>;
177
178 compatible = "fixed-partitions";
179 #address-cells = <1>;
180 #size-cells = <1>;
181
182 kernel@0 {
183 label = "kernel";
184 reg = <0x0 0x400000>;
185 };
186
187 ubiconcat0: partition@400000 {
188 label = "ubiconcat0";
189 reg = <0x400000 0x1500000>;
190 };
191 };
192
193 partition@1fc0000 {
194 label = "caldata_backup";
195 reg = <0x1fc0000 0x40000>;
196 read-only;
197 };
198
199 ubiconcat1: partition@2000000 {
200 label = "ubiconcat1";
201 reg = <0x2000000 0x6000000>;
202 };
203 };
204 };
205
206 &ref {
207 clock-frequency = <40000000>;
208 };
209
210 &builtin_switch {
211 resets = <&rst 8>, <&rst 12>;
212 reset-names = "switch", "switch-analog";
213 };
214
215 &mdio0 {
216 status = "okay";
217
218 phy0: ethernet-phy@0 {
219 reg = <0>;
220 phy-mode = "rgmii";
221 qca,mib-poll-interval = <500>;
222
223 qca,ar8327-initvals = <
224 0x04 0x07600000
225 0x0c 0x01000000
226 0x10 0xc1000000
227 0x50 0xcc35cc35
228 0x54 0xcb37cb37
229 0x58 0x00000000
230 0x5c 0x00f3cf00
231 0x7c 0x0000007e
232 0x94 0x0000007e
233 >;
234 };
235 };
236
237 &eth0 {
238 status = "okay";
239
240 /* default for ar934x, except for 1000M */
241 pll-data = <0x06000000 0x00000101 0x00001616>;
242
243 nvmem-cells = <&macaddr_caldata_0>;
244 nvmem-cell-names = "mac-address";
245
246 phy-mode = "rgmii";
247 phy-handle = <&phy0>;
248 };
249
250 &gpio {
251 lna0 {
252 gpio-hog;
253 line-name = "netgear:ext:lna0";
254 gpios = <18 GPIO_ACTIVE_HIGH>;
255 output-high;
256 };
257
258 lna1 {
259 gpio-hog;
260 line-name = "netgear:ext:lna1";
261 gpios = <19 GPIO_ACTIVE_HIGH>;
262 output-high;
263 };
264 };
265
266 &wmac {
267 status = "okay";
268
269 nvmem-cells = <&macaddr_caldata_0>, <&cal_art_1000>;
270 nvmem-cell-names = "mac-address", "calibration";
271 };
272
273 &pcie {
274 status = "okay";
275
276 ath9k: wifi@0,0 {
277 compatible = "pci168c,0033";
278 reg = <0x0000 0 0 0 0>;
279 nvmem-cells = <&macaddr_caldata_c>, <&cal_art_5000>;
280 nvmem-cell-names = "mac-address", "calibration";
281 #gpio-cells = <2>;
282 gpio-controller;
283 };
284 };