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