f2e39c87aef43e4017c25a86dbec16cee6ba5224
[openwrt/openwrt.git] / target / linux / ipq40xx / files-6.1 / arch / arm / boot / dts / qcom-ipq4019-wifi.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2016, 2018 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2016 Google, Inc
5 */
6
7 #include "qcom-ipq4019.dtsi"
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "Google WiFi (Gale)";
14 compatible = "google,wifi", "google,gale-v2", "qcom,ipq4019";
15
16 aliases {
17 label-mac-device = &gmac0;
18 led-boot = &led0_blue;
19 led-failsafe = &led0_red;
20 led-running = &led0_blue;
21 led-upgrade = &led0_red;
22 };
23
24 chosen {
25 /*
26 * rootwait: in case we're booting from slow/async USB storage.
27 */
28 bootargs-append = " rootwait";
29 stdout-path = &blsp1_uart1;
30 };
31
32 memory {
33 device_type = "memory";
34 reg = <0x80000000 0x20000000>; /* 512MB */
35 };
36
37 soc {
38 edma@c080000 {
39 /*
40 * Factory bootloader (depthcharge) will fail to boot
41 * if this exact path (soc/edma@c080000/gmac0) doesn't
42 * exist.
43 */
44 gmac0: gmac0 {
45 };
46
47 /*
48 * Factory bootloader (depthcharge) will fail to boot
49 * if this exact path (soc/edma@c080000/gmac1) doesn't
50 * exist.
51 */
52 gmac1 {
53 };
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys";
59 pinctrl-0 = <&fw_pinmux>;
60 pinctrl-names = "default";
61
62 reset {
63 label = "reset";
64 gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67 };
68 };
69
70 &scm {
71 qcom,sdi-enabled;
72 };
73
74 &tlmm {
75 fw_pinmux: fw_pinmux {
76 wp {
77 pins = "gpio53";
78 output-low;
79 };
80 recovery {
81 pins = "gpio57";
82 function = "gpio";
83 bias-none;
84 };
85 developer {
86 pins = "gpio41";
87 bias-none;
88 };
89 };
90
91 reset802_15_4 {
92 pins = "gpio60";
93 };
94
95 led_reset {
96 pins = "gpio22";
97 output-high;
98 };
99
100 sys_reset {
101 pins = "gpio19";
102 output-high;
103 };
104
105 rx_active {
106 pins = "gpio43";
107 bias-pull,down;
108 };
109
110 spi_0_pins: spi_0_pinmux {
111 pinmux {
112 function = "blsp_spi0";
113 pins = "gpio13", "gpio14","gpio15";
114 };
115 pinmux_cs {
116 function = "gpio";
117 pins = "gpio12";
118 };
119 pinconf {
120 pins = "gpio13", "gpio14","gpio15";
121 drive-strength = <12>;
122 bias-disable;
123 };
124 pinconf_cs {
125 pins = "gpio12";
126 drive-strength = <2>;
127 bias-disable;
128 output-high;
129 };
130 };
131
132 spi_1_pins: spi_1_pinmux {
133 pinmux {
134 function = "blsp_spi1";
135 pins = "gpio44", "gpio46","gpio47";
136 };
137 pinmux_cs {
138 function = "gpio";
139 pins = "gpio45";
140 };
141 pinconf {
142 pins = "gpio44", "gpio46","gpio47";
143 drive-strength = <12>;
144 bias-disable;
145 };
146 pinconf_cs {
147 pins = "gpio45";
148 drive-strength = <2>;
149 bias-disable;
150 output-high;
151 };
152 };
153
154 serial_0_pins: serial0_pinmux {
155 mux {
156 pins = "gpio16", "gpio17";
157 function = "blsp_uart0";
158 bias-disable;
159 };
160 };
161
162 serial_1_pins: serial1_pinmux {
163 mux {
164 pins = "gpio8", "gpio9", "gpio10", "gpio11";
165 function = "blsp_uart1";
166 bias-disable;
167 };
168 };
169
170 i2c_0_pins: i2c_0_pinmux {
171 mux {
172 pins = "gpio20", "gpio21";
173 function = "blsp_i2c0";
174 drive-open-drain;
175 };
176 };
177
178 i2c_1_pins: i2c_1_pinmux {
179 mux {
180 pins = "gpio34", "gpio35";
181 function = "blsp_i2c1";
182 drive-open-drain;
183 };
184 };
185
186 sd_0_pins: sd_0_pinmux {
187 sd0 {
188 pins = "gpio23", "gpio24", "gpio25", "gpio26", "gpio29", "gpio30", "gpio31", "gpio32";
189 function = "sdio";
190 drive-strength = <10>;
191 bias-pull-up;
192 pull-up-res = <0>;
193 };
194 sdclk {
195 pins = "gpio27";
196 function = "sdio";
197 drive-strength = <2>;
198 bias-pull-up;
199 pull-up-res = <0>;
200 };
201 sdcmd {
202 pins = "gpio28";
203 function = "sdio";
204 drive-strength = <10>;
205 bias-pull-up;
206 pull-up-res = <0>;
207 };
208 };
209
210 mdio_pins: mdio_pinmux {
211 mux_1 {
212 pins = "gpio6";
213 function = "mdio";
214 bias-disable;
215 };
216 mux_2 {
217 pins = "gpio7";
218 function = "mdc";
219 bias-disable;
220 };
221 mux_3 {
222 pins = "gpio40";
223 function = "gpio";
224 bias-disable;
225 output-high;
226 };
227 };
228
229 wifi1_1_pins: wifi2_pinmux {
230 mux {
231 pins = "gpio58";
232 output-low;
233 };
234 };
235 };
236
237 &blsp_dma {
238 status = "okay";
239 };
240
241 &blsp1_i2c3 {
242 pinctrl-0 = <&i2c_0_pins>;
243 pinctrl-names = "default";
244 status = "okay";
245
246 tpm@20 {
247 compatible = "infineon,slb9645tt";
248 reg = <0x20>;
249 powered-while-suspended;
250 };
251 };
252
253 &blsp1_i2c4 {
254 pinctrl-0 = <&i2c_1_pins>;
255 pinctrl-names = "default";
256 status = "okay";
257
258 led-controller@32 {
259 #address-cells = <1>;
260 #size-cells = <0>;
261 compatible = "national,lp5523";
262 reg = <0x32>;
263 clock-mode = /bits/ 8 <1>;
264
265 #if 1
266 led0_red: led@0 {
267 reg = <0>;
268 chan-name = "LED0_Red";
269 led-cur = /bits/ 8 <0x64>;
270 max-cur = /bits/ 8 <0x78>;
271 color = <LED_COLOR_ID_RED>;
272 function = LED_FUNCTION_FAULT;
273 };
274
275 led@1 {
276 reg = <1>;
277 chan-name = "LED0_Green";
278 led-cur = /bits/ 8 <0x64>;
279 max-cur = /bits/ 8 <0x78>;
280 color = <LED_COLOR_ID_GREEN>;
281 };
282
283 led0_blue: led@2 {
284 reg = <2>;
285 chan-name = "LED0_Blue";
286 led-cur = /bits/ 8 <0x64>;
287 max-cur = /bits/ 8 <0x78>;
288 color = <LED_COLOR_ID_BLUE>;
289 function = LED_FUNCTION_POWER;
290 };
291 #else
292 /*
293 * openwrt isn't ready to handle multi-intensity leds yet
294 * # echo 255 255 255 > /sys/class/leds/tricolor/multi_intensity
295 * # echo 255 > /sys/class/leds/tricolor/brightness
296 */
297 multi-led@2 {
298 function = LED_FUNCTION_POWER;
299 reg = <2>;
300 color = <LED_COLOR_ID_RGB>;
301 #address-cells = <1>;
302 #size-cells = <0>;
303
304 led@0 {
305 reg = <0>;
306 chan-name = "tricolor";
307 led-cur = /bits/ 8 <0x64>;
308 max-cur = /bits/ 8 <0x78>;
309 color = <LED_COLOR_ID_RED>;
310 };
311
312 led@1 {
313 reg = <1>;
314 chan-name = "tricolor";
315 led-cur = /bits/ 8 <0x64>;
316 max-cur = /bits/ 8 <0x78>;
317 color = <LED_COLOR_ID_GREEN>;
318 };
319
320 led@2 {
321 reg = <2>;
322 chan-name = "tricolor";
323 led-cur = /bits/ 8 <0x64>;
324 max-cur = /bits/ 8 <0x78>;
325 color = <LED_COLOR_ID_BLUE>;
326 };
327 };
328 #endif
329 };
330 };
331
332 &blsp1_spi1 {
333 pinctrl-0 = <&spi_0_pins>;
334 pinctrl-names = "default";
335 status = "okay";
336 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
337
338 flash@0 {
339 compatible = "jedec,spi-nor";
340 reg = <0>;
341 spi-max-frequency = <24000000>;
342 };
343 };
344
345 &blsp1_spi2 {
346 pinctrl-0 = <&spi_1_pins>;
347 pinctrl-names = "default";
348 status = "okay";
349 cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
350
351 /*
352 * This "spidev" was included in the manufacturer device tree. I
353 * suspect it's the (unused; and removed from later HW spins) Zigbee
354 * radio -- SiliconLabs EM3581 Zigbee? There's no driver or binding for
355 * this at the moment.
356 */
357 spidev@0 {
358 compatible = "spidev";
359 reg = <0>;
360 spi-max-frequency = <24000000>;
361 };
362 };
363
364 &blsp1_uart1 {
365 pinctrl-0 = <&serial_0_pins>;
366 pinctrl-names = "default";
367 status = "okay";
368 };
369
370 &blsp1_uart2 {
371 pinctrl-0 = <&serial_1_pins>;
372 pinctrl-names = "default";
373 status = "okay";
374 };
375
376 &gmac {
377 status = "okay";
378 };
379
380 &mdio {
381 status = "okay";
382 pinctrl-0 = <&mdio_pins>;
383 pinctrl-names = "default";
384 };
385
386 &prng {
387 status = "okay";
388 };
389
390 &sdhci {
391 status = "okay";
392 pinctrl-0 = <&sd_0_pins>;
393 pinctrl-names = "default";
394 clock-frequency = <192000000>;
395 vqmmc-supply = <&vqmmc>;
396 non-removable;
397 };
398
399 &switch {
400 status = "okay";
401 };
402
403 &swport4 {
404 status = "okay";
405
406 label = "lan";
407 };
408
409 &swport5 {
410 status = "okay";
411 };
412
413 &usb2 {
414 status = "okay";
415 };
416
417 &usb2_hs_phy {
418 status = "okay";
419 };
420
421 &usb3 {
422 status = "okay";
423 };
424
425 &usb3_ss_phy {
426 status = "okay";
427 };
428
429 &usb3_hs_phy {
430 status = "okay";
431 };
432
433 &vqmmc {
434 status = "okay";
435 };
436
437 &watchdog {
438 status = "okay";
439 };
440
441 &wifi0 {
442 status = "okay";
443 qcom,ath10k-calibration-variant = "GO_GALE";
444 };
445
446 &wifi1 {
447 status = "okay";
448 pinctrl-0 = <&wifi1_1_pins>;
449 pinctrl-names = "default";
450 qcom,ath10k-calibration-variant = "GO_GALE";
451 };