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