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