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