ipq40xx: use existing labels for crypto node
[openwrt/openwrt.git] / target / linux / ipq40xx / files-6.6 / arch / arm / boot / dts / qcom / qcom-ipq4019-hap-ac3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Robert Marko <robimarko@gmail.com> */
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/soc/qcom,tcsr.h>
9
10 / {
11 model = "MikroTik hAP ac3";
12 compatible = "mikrotik,hap-ac3";
13
14 memory {
15 device_type = "memory";
16 reg = <0x80000000 0x10000000>;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 };
22
23 aliases {
24 led-boot = &led_status_blue;
25 led-failsafe = &led_status_red;
26 led-running = &led_status_blue;
27 led-upgrade = &led_status_red;
28 };
29
30 soc {
31 counter@4a1000 {
32 compatible = "qcom,qca-gcnt";
33 reg = <0x4a1000 0x4>;
34 };
35
36 tcsr@1949000 {
37 compatible = "qcom,tcsr";
38 reg = <0x1949000 0x100>;
39 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
40 };
41
42 tcsr@194b000 {
43 /* select hostmode */
44 compatible = "qcom,tcsr";
45 reg = <0x194b000 0x100>;
46 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
47 status = "okay";
48 };
49
50 ess_tcsr@1953000 {
51 compatible = "qcom,tcsr";
52 reg = <0x1953000 0x1000>;
53 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
54 };
55
56 tcsr@1957000 {
57 compatible = "qcom,tcsr";
58 reg = <0x1957000 0x100>;
59 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys";
65
66 reset {
67 label = "reset";
68 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_RESTART>;
70 };
71
72 mode {
73 label = "mode";
74 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RFKILL>;
76 };
77
78 led {
79 label = "led";
80 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_WPS_BUTTON>;
82 };
83 };
84
85 leds {
86 compatible = "gpio-leds";
87
88 led_status_blue: status-blue {
89 function = LED_FUNCTION_STATUS;
90 color = <LED_COLOR_ID_BLUE>;
91 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
92 };
93
94 led_status_red: status-red {
95 function = LED_FUNCTION_STATUS;
96 color = <LED_COLOR_ID_RED>;
97 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
98 panic-indicator;
99 };
100
101 led_status_green: status-green {
102 function = LED_FUNCTION_STATUS;
103 color = <LED_COLOR_ID_GREEN>;
104 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
105 };
106
107 wlan {
108 function = LED_FUNCTION_WLAN;
109 color = <LED_COLOR_ID_GREEN>;
110 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
111 };
112
113 ethernet {
114 label = "green:ethernet";
115 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
116 };
117
118 wan {
119 function = LED_FUNCTION_WAN;
120 color = <LED_COLOR_ID_GREEN>;
121 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
122 };
123
124 lan1 {
125 label = "green:lan1";
126 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
127 };
128
129 lan2 {
130 label = "green:lan2";
131 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
132 };
133
134 lan3 {
135 label = "green:lan3";
136 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
137 };
138
139 lan4 {
140 label = "green:lan4";
141 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
142 };
143
144 poe {
145 label = "red:poe";
146 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
147 };
148 };
149 };
150
151 &watchdog {
152 status = "okay";
153 };
154
155 &prng {
156 status = "okay";
157 };
158
159 &crypto {
160 status = "okay";
161 };
162
163 &tlmm {
164 serial_pins: serial_pinmux {
165 mux {
166 pins = "gpio16", "gpio17";
167 function = "blsp_uart0";
168 bias-disable;
169 };
170 };
171
172 spi_0_pins: spi_0_pinmux {
173 pin {
174 function = "blsp_spi0";
175 pins = "gpio13", "gpio14", "gpio15";
176 drive-strength = <12>;
177 bias-disable;
178 };
179
180 pin_cs {
181 function = "gpio";
182 pins = "gpio12";
183 drive-strength = <2>;
184 bias-disable;
185 output-high;
186 };
187 };
188
189 nand_pins: nand_pins {
190 pullups {
191 pins = "gpio53", "gpio58", "gpio59";
192 function = "qpic";
193 bias-pull-up;
194 };
195
196 pulldowns {
197 pins = "gpio55", "gpio56", "gpio57", "gpio60",
198 "gpio62", "gpio63", "gpio64", "gpio65",
199 "gpio66", "gpio67", "gpio68", "gpio69";
200 function = "qpic";
201 bias-pull-down;
202 };
203 };
204
205 enable-usb-power {
206 gpio-hog;
207 gpios = <44 GPIO_ACTIVE_HIGH>;
208 output-high;
209 line-name = "enable USB power";
210 };
211 };
212
213 &blsp_dma {
214 status = "okay";
215 };
216
217 &blsp1_spi1 {
218 status = "okay";
219
220 pinctrl-0 = <&spi_0_pins>;
221 pinctrl-names = "default";
222 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
223
224 flash@0 {
225 reg = <0>;
226 compatible = "jedec,spi-nor";
227 spi-max-frequency = <40000000>;
228
229 partitions {
230 compatible = "fixed-partitions";
231 #address-cells = <1>;
232 #size-cells = <1>;
233
234 partition@0 {
235 label = "Qualcomm";
236 reg = <0x0 0x80000>;
237 read-only;
238 };
239
240 partition@80000 {
241 compatible = "mikrotik,routerboot-partitions";
242 #address-cells = <1>;
243 #size-cells = <1>;
244 label = "RouterBoot";
245 reg = <0x80000 0x80000>;
246
247 hard_config {
248 read-only;
249 size = <0x2000>;
250 };
251
252 dtb_config {
253 read-only;
254 };
255
256 soft_config {
257 };
258 };
259 };
260 };
261 };
262
263 &qpic_bam {
264 status = "okay";
265 };
266
267 &nand {
268 status = "okay";
269
270 pinctrl-0 = <&nand_pins>;
271 pinctrl-names = "default";
272
273 nand@0 {
274 partitions {
275 compatible = "fixed-partitions";
276 #address-cells = <1>;
277 #size-cells = <1>;
278
279 partition@0 {
280 label = "kernel";
281 reg = <0x0 0xa00000>;
282 };
283
284 partition@a00000 {
285 label = "ubi";
286 reg = <0xa00000 0x7600000>;
287 };
288 };
289 };
290 };
291
292 &blsp1_uart1 {
293 status = "okay";
294
295 pinctrl-0 = <&serial_pins>;
296 pinctrl-names = "default";
297 };
298
299 &cryptobam {
300 status = "okay";
301 };
302
303 &usb2 {
304 status = "okay";
305 };
306
307 &usb2_hs_phy {
308 status = "okay";
309 };
310
311 &mdio {
312 status = "okay";
313 };
314
315 &gmac {
316 status = "okay";
317 };
318
319 &switch {
320 status = "okay";
321 };
322
323 &swport1 {
324 status = "okay";
325 label = "lan4";
326 };
327
328 &swport2 {
329 status = "okay";
330 label = "lan3";
331 };
332
333 &swport3 {
334 status = "okay";
335 label = "lan2";
336 };
337
338 &swport4 {
339 status = "okay";
340 label = "lan1";
341 };
342
343 &swport5 {
344 status = "okay";
345 };
346
347 &wifi0 {
348 status = "okay";
349
350 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";
351 };
352
353 &wifi1 {
354 status = "okay";
355
356 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";
357 };