e2d435133b7edf8498dd80d10a344ae6679d0ed8
[openwrt/openwrt.git] / target / linux / ipq40xx / files-6.6 / arch / arm / boot / dts / qcom / qcom-ipq4019-rtl30vw.dts
1 // SPDX-License-Identifier: ISC
2 // Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 // Copyright (c) 2019, Cezary Jackiewicz <cezary@eko.one.pl>.
4 // Copyright (c) 2020, Pawel Dembicki <paweldembicki@gmail.com>.
5
6 #include "qcom-ipq4019.dtsi"
7 #include <dt-bindings/soc/qcom,tcsr.h>
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "Cell C RTL30VW";
14 compatible = "cellc,rtl30vw";
15
16 aliases {
17 led-boot = &led_power_blue;
18 led-failsafe = &led_power_red;
19 led-running = &led_power_blue;
20 led-upgrade = &led_power_red;
21 };
22
23 chosen {
24 bootargs-append = "ubi.mtd=ubifs root=/dev/ubiblock0_0 rootfstype=squashfs ro";
25 };
26
27 led_spi {
28 compatible = "spi-gpio";
29 #address-cells = <1>;
30 #size-cells = <0>;
31 num-chipselects = <1>;
32
33 mosi-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
34 cs-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
35 sck-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
36
37 led_gpio: led_gpio@0 {
38 compatible = "fairchild,74hc595";
39 reg = <0>;
40 gpio-controller;
41 #gpio-cells = <2>;
42 registers-number = <2>;
43 spi-max-frequency = <1000000>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 led_power_blue: power_blue {
51 gpios = <&led_gpio 0 GPIO_ACTIVE_HIGH>;
52 function = LED_FUNCTION_POWER;
53 color = <LED_COLOR_ID_BLUE>;
54 default-state = "on";
55 };
56
57 led_power_red: power_red {
58 gpios = <&led_gpio 1 GPIO_ACTIVE_HIGH>;
59 function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_RED>;
61 };
62
63 tp28 {
64 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
65 label = "ext:tp28";
66 default-state = "keep";
67 };
68
69 tp27 {
70 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
71 label = "ext:tp27";
72 default-state = "keep";
73 };
74
75 wlan2g {
76 gpios = <&led_gpio 8 GPIO_ACTIVE_HIGH>;
77 label = "blue:wlan2g";
78 linux,default-trigger = "phy0tpt";
79 };
80
81 wlan5g {
82 gpios = <&led_gpio 9 GPIO_ACTIVE_HIGH>;
83 label = "blue:wlan5g";
84 linux,default-trigger = "phy1tpt";
85 };
86
87 wps {
88 gpios = <&led_gpio 10 GPIO_ACTIVE_HIGH>;
89 function = LED_FUNCTION_WPS;
90 color = <LED_COLOR_ID_BLUE>;
91 };
92
93 voip {
94 gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
95 label = "blue:voip";
96 };
97
98 s1 {
99 gpios = <&led_gpio 12 GPIO_ACTIVE_HIGH>;
100 label = "blue:s1";
101 };
102
103 s2 {
104 gpios = <&led_gpio 13 GPIO_ACTIVE_HIGH>;
105 label = "blue:s2";
106 };
107
108 s3 {
109 gpios = <&led_gpio 14 GPIO_ACTIVE_HIGH>;
110 label = "blue:s3";
111 };
112
113 s4 {
114 gpios = <&led_gpio 15 GPIO_ACTIVE_HIGH>;
115 label = "blue:s4";
116 };
117
118 signal {
119 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
120 label = "red:signal";
121 };
122 };
123
124 keys {
125 compatible = "gpio-keys";
126
127 wps {
128 label = "wps";
129 linux,code = <KEY_WPS_BUTTON>;
130 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
131 };
132
133 reset {
134 label = "reset";
135 linux,code = <KEY_RESTART>;
136 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
137 };
138 };
139
140 soc {
141 rng@22000 {
142 status = "okay";
143 };
144
145 mdio@90000 {
146 status = "okay";
147 };
148
149 tcsr@1949000 {
150 compatible = "qcom,tcsr";
151 reg = <0x1949000 0x100>;
152 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
153 };
154
155 tcsr@194b000 {
156 /* select hostmode */
157 compatible = "qcom,tcsr";
158 reg = <0x194b000 0x100>;
159 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
160 status = "okay";
161 };
162
163 ess_tcsr@1953000 {
164 compatible = "qcom,tcsr";
165 reg = <0x1953000 0x1000>;
166 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
167 };
168
169 tcsr@1957000 {
170 compatible = "qcom,tcsr";
171 reg = <0x1957000 0x100>;
172 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
173 };
174
175 crypto@8e3a000 {
176 status = "okay";
177 };
178
179 watchdog@b017000 {
180 status = "okay";
181 };
182 };
183 };
184
185 &blsp_dma {
186 status = "okay";
187 };
188
189 &blsp1_spi1 {
190 pinctrl-0 = <&spi_0_pins>;
191 pinctrl-names = "default";
192 status = "okay";
193 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 59 GPIO_ACTIVE_HIGH>;
194
195 flash@0 {
196 /*"n25q128a11" is required for proper nand recognition in u-boot. */
197 compatible = "jedec,spi-nor", "n25q128a11";
198 #address-cells = <1>;
199 #size-cells = <1>;
200 reg = <0>;
201 spi-max-frequency = <24000000>;
202
203 partitions {
204 compatible = "fixed-partitions";
205 #address-cells = <1>;
206 #size-cells = <1>;
207
208 partition@0 {
209 label = "0:SBL1";
210 reg = <0x0 0x40000>;
211 read-only;
212 };
213
214 partition@40000 {
215 label = "0:MIBIB";
216 reg = <0x40000 0x20000>;
217 read-only;
218 };
219
220 partition@60000 {
221 label = "0:QSEE";
222 reg = <0x60000 0x60000>;
223 read-only;
224 };
225
226 partition@c0000 {
227 label = "0:CDT";
228 reg = <0xc0000 0x10000>;
229 read-only;
230 };
231
232 partition@d0000 {
233 label = "0:DDRPARAMS";
234 reg = <0xd0000 0x10000>;
235 read-only;
236 };
237
238 partition@e0000 {
239 label = "0:APPSBLENV";
240 reg = <0xe0000 0x10000>;
241 read-only;
242 };
243
244 partition@f0000 {
245 label = "0:APPSBL";
246 reg = <0xf0000 0x80000>;
247 read-only;
248 };
249
250 partition@170000 {
251 label = "0:ART";
252 reg = <0x170000 0x10000>;
253 read-only;
254 };
255
256 partition@180000 {
257 label = "0:BOOTCONFIG";
258 reg = <0x180000 0x10000>;
259 read-only;
260 };
261 };
262 };
263
264 flash@1 {
265 /*
266 * Factory U-boot looks in 0:BOOTCONFIG partition for active
267 * partitions settings and mangle partition config. So kernel
268 * /kernel_1 and rootfs/rootfs_1 pairs can be swaped.
269 * It isn't a problem but we never can be sure where OFW put
270 * factory images. "spinand,mt29f" value is required for proper
271 * nand recognition in u-boot.
272 */
273 compatible = "spi-nand","spinand,mt29f";
274 #address-cells = <1>;
275 #size-cells = <0>;
276 reg = <1>;
277 spi-max-frequency = <24000000>;
278
279 partitions {
280 compatible = "fixed-partitions";
281 #address-cells = <1>;
282 #size-cells = <1>;
283
284 partition@0 {
285 label = "kernel";
286 reg = <0x0 0x400000>;
287 };
288
289 partition@400000 {
290 label = "rootfs";
291 reg = <0x400000 0x2000000>;
292 };
293
294 partition@2400000 {
295 label = "kernel_1";
296 reg = <0x2400000 0x400000>;
297 };
298
299 partition@2800000 {
300 label = "rootfs_1";
301 reg = <0x2800000 0x2000000>;
302 };
303
304 partition@4800000 {
305 label = "ubifs";
306 reg = <0x4800000 0x3800000>;
307 };
308 };
309 };
310 };
311
312 &blsp1_uart1 {
313 pinctrl-0 = <&serial_pins>;
314 pinctrl-names = "default";
315 status = "okay";
316 };
317
318 &cryptobam {
319 status = "okay";
320 };
321
322 &tlmm {
323 serial_pins: serial_pinmux {
324 mux {
325 pins = "gpio60", "gpio61";
326 function = "blsp_uart0";
327 bias-disable;
328 };
329 };
330
331 spi_0_pins: spi_0_pinmux {
332 pinmux {
333 function = "blsp_spi0";
334 pins = "gpio55", "gpio56", "gpio57";
335 drive-strength = <12>;
336 bias-disable;
337 };
338
339 pinmux_cs {
340 function = "gpio";
341 pins = "gpio54", "gpio59";
342 drive-strength = <2>;
343 bias-disable;
344 output-high;
345 };
346 };
347 };
348
349 &usb2_hs_phy {
350 status = "okay";
351 };
352
353 &usb2 {
354 status = "okay";
355 };
356
357 &usb3_ss_phy {
358 status = "okay";
359 };
360
361 &usb3_hs_phy {
362 status = "okay";
363 };
364
365 &usb3 {
366 status = "okay";
367 };
368
369 &wifi0 {
370 status = "okay";
371 qcom,ath10k-calibration-variant = "cellc,rtl30vw";
372 };
373
374 &wifi1 {
375 status = "okay";
376 qcom,ath10k-calibration-variant = "cellc,rtl30vw";
377 };
378
379 &gmac {
380 status = "okay";
381 };
382
383 &switch {
384 status = "okay";
385 };
386
387 &swport3 {
388 status = "okay";
389
390 label = "lan1";
391 };
392
393 &swport4 {
394 status = "okay";
395
396 label = "lan2";
397 };