dnsmasq: move feature detection inside a shell func
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.19 / arch / arm / boot / dts / qcom-ipq4019-linksys_ea8300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /*
4 * Device Tree Source for Linksys EA8300 (Dallas)
5 *
6 * Copyright (C) 2019 Jeff Kletsky
7 *
8 */
9
10 /dts-v1/;
11
12 #include "qcom-ipq4019.dtsi"
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/soc/qcom,tcsr.h>
16
17 / {
18 model = "Linksys EA8300 (Dallas)";
19 compatible = "linksys,ea8300", "qcom,ipq4019";
20
21
22 aliases {
23 led-boot = &led_wps_amber;
24 led-failsafe = &led_wps;
25 led-running = &led_linksys;
26 led-upgrade = &led_world;
27 serial0 = &blsp1_uart1;
28 };
29
30
31 leds {
32 compatible = "gpio-leds";
33
34 // Retain node names from running OEM on EA8300
35
36 // Front panel LEDs, top to bottom
37
38 led_plug: diag {
39 label = "ea8300:amber:plug";
40 gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
41 };
42
43 led_world: internet {
44 label = "ea8300:amber:world";
45 gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
46 };
47
48 led_wps: wps {
49 label = "ea8300:white:wps";
50 gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
51 };
52
53 led_wps_amber: wps_amber {
54 label = "ea8300:amber:wps";
55 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
56 panic-indicator;
57 };
58
59 led_linksys: pwr {
60 label = "ea8300:white:linksys";
61 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
62 };
63
64 // On back panel, above USB socket
65
66 led_usb: usb {
67 label = "ea8300:green:usb";
68 gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&usb3_port1>, <&usb3_port2>,
70 <&usb2_port1>;
71 linux,default-trigger = "usbport";
72 };
73 };
74
75
76 keys {
77 compatible = "gpio-keys";
78
79 button@0 {
80 label = "reset";
81 linux,code = <KEY_RESTART>;
82 gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
83 };
84
85 button@1 {
86 label = "wps";
87 linux,code = <KEY_WPS_BUTTON>;
88 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92
93 //
94 // OEM U-Boot provides either
95 // init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 \
96 // root=ubi0:ubifs rootwait rw
97 // or the same with ubi.mtd=13,2048
98 //
99
100 chosen {
101 bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
102 };
103
104
105 memory {
106 device_type = "memory";
107 reg = <0x80000000 0x10000000>;
108 };
109
110
111 soc {
112 rng@22000 {
113 status = "okay";
114 };
115
116 mdio@90000 {
117 status = "okay";
118 };
119
120 ess-psgmii@98000 {
121 status = "okay";
122 };
123
124 tcsr@1949000 {
125 compatible = "qcom,tcsr";
126 reg = <0x1949000 0x100>;
127 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
128 };
129
130 tcsr@194b000 {
131 compatible = "qcom,tcsr";
132 reg = <0x194b000 0x100>;
133 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
134 };
135
136 ess_tcsr@1953000 {
137 compatible = "qcom,tcsr";
138 reg = <0x1953000 0x1000>;
139 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
140 };
141
142 tcsr@1957000 {
143 compatible = "qcom,tcsr";
144 reg = <0x1957000 0x100>;
145 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
146 };
147
148 usb2@60f8800 {
149 status = "okay";
150
151 dwc3@6000000 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154
155 usb2_port1: port@1 {
156 reg = <1>;
157 #trigger-source-cells = <0>;
158 };
159 };
160 };
161
162 usb3@8af8800 {
163 status = "okay";
164
165 dwc3@8a00000 {
166 #address-cells = <1>;
167 #size-cells = <0>;
168
169 usb3_port1: port@1 {
170 reg = <1>;
171 #trigger-source-cells = <0>;
172 };
173
174 usb3_port2: port@2 {
175 reg = <2>;
176 #trigger-source-cells = <0>;
177 };
178 };
179 };
180
181 crypto@8e3a000 {
182 status = "okay";
183 };
184
185 watchdog@b017000 {
186 status = "okay";
187 };
188
189 ess-switch@c000000 {
190 status = "okay";
191 };
192
193 edma@c080000 {
194 status = "okay";
195 };
196 };
197 };
198
199
200 &blsp_dma {
201 status = "okay";
202 };
203
204 &blsp1_uart1 {
205 status = "okay";
206 pinctrl-0 = <&serial_0_pins>;
207 pinctrl-names = "default";
208
209 };
210
211 &cryptobam {
212 status = "okay";
213 };
214
215 &nand {
216 status = "okay";
217
218 pinctrl-0 = <&nand_pins>;
219 pinctrl-names = "default";
220
221 nand@0 {
222 partitions {
223 compatible = "fixed-partitions";
224 #address-cells = <1>;
225 #size-cells = <1>;
226
227 partition@0 {
228 label = "sbl1";
229 reg = <0x0 0x100000>;
230 read-only;
231 };
232
233 partition@100000 {
234 label = "mibib";
235 reg = <0x100000 0x100000>;
236 read-only;
237 };
238
239 partition@200000 {
240 label = "qsee";
241 reg = <0x200000 0x100000>;
242 read-only;
243 };
244
245 partition@300000 {
246 label = "cdt";
247 reg = <0x300000 0x80000>;
248 read-only;
249 };
250
251 partition@380000 {
252 label = "appsblenv";
253 reg = <0x380000 0x80000>;
254 read-only;
255 };
256
257 partition@400000 {
258 label = "ART";
259 reg = <0x400000 0x80000>;
260 read-only;
261 };
262
263 partition@480000 {
264 label = "appsbl";
265 reg = <0x480000 0x200000>;
266 read-only;
267 };
268
269 partition@680000 {
270 label = "u_env";
271 reg = <0x680000 0x80000>;
272 // writable -- U-Boot environment
273 };
274
275 partition@700000 {
276 label = "s_env";
277 reg = <0x700000 0x40000>;
278 // writable -- Boot counter records
279 };
280
281 partition@740000 {
282 label = "devinfo";
283 reg = <0x740000 0x40000>;
284 read-only;
285 };
286
287 partition@780000 {
288 label = "kernel";
289 reg = <0x780000 0x5800000>;
290 };
291
292 partition@a80000 {
293 label = "rootfs";
294 reg = <0xa80000 0x5500000>;
295 };
296
297 partition@5f80000 {
298 label = "alt_kernel";
299 reg = <0x5f80000 0x5800000>;
300 };
301
302 partition@6280000 {
303 label = "alt_rootfs";
304 reg = <0x6280000 0x5500000>;
305 };
306
307 partition@b780000 {
308 label = "sysdiag";
309 reg = <0xb780000 0x100000>;
310 read-only;
311 };
312
313 partition@b880000 {
314 label = "syscfg";
315 reg = <0xb880000 0x4680000>;
316 read-only;
317 };
318 };
319 };
320 };
321
322 &pcie0 {
323 status = "okay";
324
325 perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
326 wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
327
328 bridge@0,0 {
329 reg = <0x00000000 0 0 0 0>;
330 #address-cells = <3>;
331 #size-cells = <2>;
332 ranges;
333
334 wifi2: wifi@1,0 {
335 compatible = "qcom,ath10k";
336 reg = <0x00010000 0 0 0 0>;
337 };
338 };
339 };
340
341 &qpic_bam {
342 status = "okay";
343 };
344
345 &tlmm {
346 serial_0_pins: serial0-pinmux {
347 pins = "gpio16", "gpio17";
348 function = "blsp_uart0";
349 bias-disable;
350 };
351
352 nand_pins: nand_pins {
353 pullups {
354 pins = "gpio53", "gpio58", "gpio59";
355 function = "qpic";
356 bias-pull-up;
357 };
358
359 // gpio61 controls led_usb
360
361 pulldowns {
362 pins = "gpio55", "gpio56", "gpio57",
363 "gpio60", "gpio62", "gpio63",
364 "gpio64", "gpio65", "gpio66",
365 "gpio67", "gpio68", "gpio69";
366 function = "qpic";
367 bias-pull-down;
368 };
369 };
370 };
371
372 &usb2_hs_phy {
373 status = "okay";
374 };
375
376 &usb3_hs_phy {
377 status = "okay";
378 };
379
380 &usb3_ss_phy {
381 status = "okay";
382 };
383
384 &wifi0 {
385 status = "okay";
386 qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
387 };
388
389 &wifi1 {
390 status = "okay";
391 ieee80211-freq-limit = <5170000 5330000>;
392 qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
393 };
394
395 &wifi2 {
396 status = "okay";
397 ieee80211-freq-limit = <5490000 5835000>;
398 qcom,ath10k-calibration-variant = "linksys-ea8300-fcc";
399 };