ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9563_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_power_amber;
12 led-failsafe = &led_power_amber;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_amber;
15 label-mac-device = &eth0;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 wps {
22 label = "wps";
23 linux,code = <KEY_WPS_BUTTON>;
24 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
25 };
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 ath9k-keys {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 rfkill {
39 label = "rfkill";
40 linux,code = <KEY_RFKILL>;
41 gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
43 };
44 };
45
46 leds: leds {
47 compatible = "gpio-leds";
48
49 pinctrl-names = "default";
50 pinctrl-0 = <&jtag_disable_pins>;
51
52 led_power_green: power_green {
53 function = LED_FUNCTION_POWER;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
56 };
57
58 led_power_amber: power_amber {
59 function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_AMBER>;
61 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
62 default-state = "keep";
63 };
64
65 wan_green {
66 function = LED_FUNCTION_WAN;
67 color = <LED_COLOR_ID_GREEN>;
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 };
70
71 wan_amber {
72 function = LED_FUNCTION_WAN;
73 color = <LED_COLOR_ID_AMBER>;
74 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
75 };
76
77 wlan2g_green {
78 label = "green:wlan2g";
79 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "phy0tpt";
81 };
82
83 wps_green {
84 function = LED_FUNCTION_WPS;
85 color = <LED_COLOR_ID_GREEN>;
86 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
87 };
88 };
89
90 ath9k-leds {
91 compatible = "gpio-leds";
92
93 wlan5g_blue {
94 label = "blue:wlan5g";
95 gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
96 linux,default-trigger = "phy1tpt";
97 };
98 };
99
100 ubi-concat {
101 compatible = "mtd-concat";
102 devices = <&ubiconcat0 &ubiconcat1>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "ubi";
111 reg = <0x0 0x0>;
112 };
113 };
114 };
115 };
116
117 &spi {
118 status = "okay";
119
120 flash@0 {
121 compatible = "jedec,spi-nor";
122 reg = <0>;
123 spi-max-frequency = <25000000>;
124
125 partitions {
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 partition@0 {
131 label = "u-boot";
132 reg = <0x0 0x40000>;
133 read-only;
134 };
135
136 partition@40000 {
137 label = "u-boot-env";
138 reg = <0x40000 0x10000>;
139 };
140
141 partition@50000 {
142 label = "caldata_backup";
143 reg = <0x50000 0x10000>;
144 read-only;
145 };
146
147 partition@60000 {
148 label = "config";
149 reg = <0x60000 0x10000>;
150 };
151
152 partition@70000 {
153 label = "traffic_meter";
154 reg = <0x70000 0x10000>;
155 };
156
157 partition@80000 {
158 label = "pot";
159 reg = <0x80000 0x10000>;
160 };
161
162 partition@90000 {
163 label = "reserved";
164 reg = <0x90000 0x160000>;
165 };
166
167 caldata: partition@1f0000 {
168 label = "caldata";
169 reg = <0x1f0000 0x10000>;
170 read-only;
171
172 nvmem-layout {
173 compatible = "fixed-layout";
174 #address-cells = <1>;
175 #size-cells = <1>;
176
177 macaddr_caldata_0: macaddr@0 {
178 reg = <0x0 0x6>;
179 };
180
181 macaddr_caldata_c: macaddr@c {
182 reg = <0xc 0x6>;
183 };
184
185 cal_art_1000: cal@1000 {
186 reg = <0x1000 0x440>;
187 };
188
189 cal_art_5000: cal@5000 {
190 reg = <0x5000 0x440>;
191 };
192 };
193 };
194 };
195 };
196
197 flash@1 {
198 compatible = "spi-nand";
199 reg = <1>;
200 spi-max-frequency = <25000000>;
201
202 partitions {
203 compatible = "fixed-partitions";
204 #address-cells = <1>;
205 #size-cells = <1>;
206
207 partition@0 {
208 label = "kernel";
209 reg = <0x0 0x400000>;
210 };
211
212 ubiconcat0: partition@400000 {
213 label = "ubiconcat0";
214 reg = <0x400000 0x5c00000>;
215 };
216
217 ubiconcat1: partition@6020000 {
218 label = "ubiconcat1";
219 reg = <0x6020000 0x1f60000>;
220 };
221 /*
222 * U-boot always unconditionally marks block 768, 1020 - 1023 as
223 * bad blocks on each boot. To avoid conflicts with the nand
224 * driver, manually skip them.
225 */
226 };
227 };
228 };
229
230 &mdio0 {
231 status = "okay";
232
233 phy0: ethernet-phy@0 {
234 reg = <0>;
235 phy-mode = "sgmii";
236 qca,mib-poll-interval = <500>;
237
238 qca,ar8327-initvals = <
239 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
240 0x10 0x81000080 /* POWER_ON_STRAP */
241 0x50 0xcc35cc35 /* LED_CTRL0 */
242 0x54 0xcb37cb37 /* LED_CTRL1 */
243 0x58 0x00000000 /* LED_CTRL2 */
244 0x5c 0x00f3cf00 /* LED_CTRL3 */
245 0x7c 0x0000007e /* PORT0_STATUS */
246 0x94 0x00000200 /* PORT6_STATUS */
247 >;
248 };
249 };
250
251 &eth0 {
252 status = "okay";
253
254 pll-data = <0x03000101 0x00000101 0x00001919>;
255
256 nvmem-cells = <&macaddr_caldata_0>;
257 nvmem-cell-names = "mac-address";
258
259 phy-mode = "sgmii";
260 phy-handle = <&phy0>;
261 };
262
263 &wmac {
264 status = "okay";
265
266 nvmem-cells = <&macaddr_caldata_0>, <&cal_art_1000>;
267 nvmem-cell-names = "mac-address", "calibration";
268 };
269
270 &pcie {
271 status = "okay";
272
273 ath9k: wifi@0,0 {
274 /* chip is AR9580, override bogus PCI ID 168c:abcd */
275 compatible = "pci168c,0033";
276 reg = <0x0000 0 0 0 0>;
277 nvmem-cells = <&macaddr_caldata_c>, <&cal_art_5000>;
278 nvmem-cell-names = "mac-address", "calibration";
279 qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */
280 #gpio-cells = <2>;
281 gpio-controller;
282 };
283 };
284
285 &usb_phy0 {
286 status = "okay";
287 };
288
289 &usb0 {
290 status = "okay";
291 };