ipq40xx: dynamically build board-2.bin for Mikrotik
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-wac510.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/soc/qcom,tcsr.h>
8 #include <dt-bindings/leds/common.h>
9
10 / {
11 model = "Netgear WAC510";
12 compatible = "netgear,wac510";
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 = &gmac0;
20 };
21
22 chosen {
23 bootargs-append = " root=/dev/ubiblock0_1";
24 };
25
26 soc {
27 rng@22000 {
28 status = "okay";
29 };
30
31 ess-psgmii@98000 {
32 status = "okay";
33 };
34
35 counter@4a1000 {
36 compatible = "qcom,qca-gcnt";
37 reg = <0x4a1000 0x4>;
38 };
39
40 tcsr@1949000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1949000 0x100>;
43 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
44 };
45
46 ess_tcsr@1953000 {
47 compatible = "qcom,tcsr";
48 reg = <0x1953000 0x1000>;
49 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
50 };
51
52 tcsr@1957000 {
53 compatible = "qcom,tcsr";
54 reg = <0x1957000 0x100>;
55 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
56 };
57
58 crypto@8e3a000 {
59 status = "okay";
60 };
61
62 watchdog@b017000 {
63 status = "okay";
64 };
65
66 ess-switch@c000000 {
67 status = "okay";
68 };
69
70 edma@c080000 {
71 status = "okay";
72 };
73 };
74
75 keys {
76 compatible = "gpio-keys";
77
78 reset {
79 label = "reset";
80 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83 };
84
85 led_spi {
86 compatible = "spi-gpio";
87 #address-cells = <1>;
88 #size-cells = <0>;
89
90 sck-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
91 mosi-gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
92 num-chipselects = <0>;
93
94 ssr: ssr@0 {
95 compatible = "fairchild,74hc595";
96 reg = <0>;
97 gpio-controller;
98 #gpio-cells = <2>;
99 registers-number = <1>;
100 spi-max-frequency = <1000000>;
101 };
102 };
103
104 leds {
105 compatible = "gpio-leds";
106
107 led_power_amber: led-0 {
108 label = "amber:power";
109 color = <LED_COLOR_ID_AMBER>;
110 function = LED_FUNCTION_POWER;
111 gpios = <&ssr 6 GPIO_ACTIVE_LOW>;
112 panic-indicator;
113 };
114
115 led_power_green: led-1 {
116 label = "green:power";
117 color = <LED_COLOR_ID_AMBER>;
118 function = LED_FUNCTION_POWER;
119 gpios = <&ssr 5 GPIO_ACTIVE_LOW>;
120 };
121
122 led-2 {
123 /* 2.4GHz blue - activity */
124 color = <LED_COLOR_ID_BLUE>;
125 function = LED_FUNCTION_WLAN;
126 function-enumerator = <0>;
127 gpios = <&ssr 4 GPIO_ACTIVE_LOW>;
128 linux,default-trigger = "phy0tpt";
129 };
130
131 led-3 {
132 /* 2.4GHz green - link */
133 color = <LED_COLOR_ID_GREEN>;
134 function = LED_FUNCTION_WLAN;
135 function-enumerator = <0>;
136 gpios = <&ssr 3 GPIO_ACTIVE_LOW>;
137 linux,default-trigger = "phy0radio";
138 };
139
140 led-4 {
141 /* 5GHz blue - activity */
142 color = <LED_COLOR_ID_BLUE>;
143 function = LED_FUNCTION_WLAN;
144 function-enumerator = <1>;
145 gpios = <&ssr 2 GPIO_ACTIVE_LOW>;
146 linux,default-trigger = "phy1tpt";
147 };
148
149 led-5 {
150 /* 5GHz green - link */
151 color = <LED_COLOR_ID_GREEN>;
152 function = LED_FUNCTION_WLAN;
153 function-enumerator = <1>;
154 gpios = <&ssr 1 GPIO_ACTIVE_LOW>;
155 linux,default-trigger = "phy1radio";
156 };
157
158 led-6 {
159 color = <LED_COLOR_ID_GREEN>;
160 function = LED_FUNCTION_ACTIVITY;
161 gpios = <&ssr 0 GPIO_ACTIVE_LOW>;
162 };
163 };
164 };
165
166 &qpic_bam {
167 status = "okay";
168 };
169
170 &tlmm {
171 mdio_pins: mdio_pinmux {
172 mux_1 {
173 pins = "gpio53";
174 function = "mdio";
175 bias-pull-up;
176 };
177
178 mux_2 {
179 pins = "gpio52";
180 function = "mdc";
181 bias-pull-up;
182 };
183 };
184
185 serial_pins: serial_pinmux {
186 mux {
187 pins = "gpio60", "gpio61";
188 function = "blsp_uart0";
189 bias-disable;
190 };
191 };
192
193 spi_0_pins: spi_0_pinmux {
194 pinmux {
195 function = "blsp_spi0";
196 pins = "gpio55", "gpio56", "gpio57";
197 drive-strength = <12>;
198 bias-disable;
199 };
200
201 pinmux_cs {
202 function = "gpio";
203 pins = "gpio54", "gpio59";
204 drive-strength = <2>;
205 bias-disable;
206 output-high;
207 };
208 };
209 };
210
211 &blsp_dma {
212 status = "okay";
213 };
214
215 &blsp1_spi1 {
216 status = "okay";
217
218 pinctrl-0 = <&spi_0_pins>;
219 pinctrl-names = "default";
220 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
221 <&tlmm 59 GPIO_ACTIVE_HIGH>;
222
223 flash@0 {
224 compatible = "jedec,spi-nor";
225 spi-max-frequency = <50000000>;
226 reg = <0>;
227
228 partitions {
229 compatible = "fixed-partitions";
230 #address-cells = <1>;
231 #size-cells = <1>;
232
233 partition@0 {
234 label = "0:SBL1";
235 reg = <0x00000000 0x00040000>;
236 read-only;
237 };
238
239 partition@40000 {
240 label = "0:MIBIB";
241 reg = <0x00040000 0x00020000>;
242 read-only;
243 };
244
245 partition@60000 {
246 label = "0:QSEE";
247 reg = <0x00060000 0x00060000>;
248 read-only;
249 };
250
251 partition@c0000 {
252 label = "0:CDT";
253 reg = <0x000c0000 0x00010000>;
254 read-only;
255 };
256
257 partition@d0000 {
258 label = "0:DDRPARAMS";
259 reg = <0x000d0000 0x00010000>;
260 read-only;
261 };
262
263 partition@e0000 {
264 label = "0:APPSBLENV";
265 reg = <0x000e0000 0x00010000>;
266 };
267
268 partition@f0000 {
269 label = "0:APPSBL";
270 reg = <0x000f0000 0x000f0000>;
271 read-only;
272 };
273
274 partition@1e0000 {
275 label = "0:MANUDATA";
276 reg = <0x001e0000 0x00010000>;
277 read-only;
278 compatible = "nvmem-cells";
279 #address-cells = <1>;
280 #size-cells = <1>;
281
282 macaddr_manudata_6: macaddr@6 {
283 reg = <0x6 0x6>;
284 };
285 };
286
287 partition@1f0000 {
288 label = "0:ART";
289 reg = <0x001f0000 0x00010000>;
290 read-only;
291 compatible = "nvmem-cells";
292 #address-cells = <1>;
293 #size-cells = <1>;
294
295 precal_art_1000: precal@1000 {
296 reg = <0x1000 0x2f20>;
297 };
298
299 precal_art_5000: precal@5000 {
300 reg = <0x5000 0x2f20>;
301 };
302 };
303 };
304 };
305
306 nand@1 {
307 compatible = "spi-nand";
308 reg = <1>;
309 spi-max-frequency = <48000000>;
310
311 partitions {
312 compatible = "fixed-partitions";
313 #address-cells = <1>;
314 #size-cells = <1>;
315
316 partition@0 {
317 label = "rootfs";
318 reg = <0x00000000 0x03800000>;
319 };
320
321 partition@3800000 {
322 label = "rootfs_1";
323 reg = <0x03800000 0x03800000>;
324 };
325
326 partition@7000000 {
327 label = "var_config";
328 reg = <0x07000000 0x00f00000>;
329 read-only;
330 };
331
332 partition@7f00000 {
333 label = "Oops_log";
334 reg = <0x07f00000 0x000c0000>;
335 read-only;
336 };
337 };
338 };
339 };
340
341 &blsp1_uart1 {
342 status = "okay";
343
344 pinctrl-0 = <&serial_pins>;
345 pinctrl-names = "default";
346 };
347
348 &cryptobam {
349 status = "okay";
350 };
351
352 &mdio {
353 status = "okay";
354
355 pinctrl-0 = <&mdio_pins>;
356 pinctrl-names = "default";
357 reset-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
358 reset-delay-us = <2000>;
359 };
360
361 &gmac0 {
362 qcom,forced_duplex = <1>;
363 qcom,forced_speed = <1000>;
364 qcom,phy_mdio_addr = <3>;
365 qcom,poll_required = <1>;
366 vlan_tag = <1 0x10>;
367 };
368
369 &wifi0 {
370 status = "okay";
371 nvmem-cell-names = "pre-calibration", "mac-address";
372 nvmem-cells = <&precal_art_1000>, <&macaddr_manudata_6>;
373 qcom,ath10k-calibration-variant = "Netgear-WAC510";
374 };
375
376 &wifi1 {
377 status = "okay";
378 nvmem-cell-names = "pre-calibration", "mac-address";
379 nvmem-cells = <&precal_art_5000>, <&macaddr_manudata_6>;
380 mac-address-increment = <16>;
381 qcom,ath10k-calibration-variant = "Netgear-WAC510";
382 };