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