ipq40xx: use existing labels for prng 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 crypto@8e3a000 {
63 status = "okay";
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys";
69
70 reset {
71 label = "reset";
72 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 mode {
77 label = "mode";
78 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_RFKILL>;
80 };
81
82 led {
83 label = "led";
84 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_WPS_BUTTON>;
86 };
87 };
88
89 leds {
90 compatible = "gpio-leds";
91
92 led_status_blue: status-blue {
93 function = LED_FUNCTION_STATUS;
94 color = <LED_COLOR_ID_BLUE>;
95 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
96 };
97
98 led_status_red: status-red {
99 function = LED_FUNCTION_STATUS;
100 color = <LED_COLOR_ID_RED>;
101 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
102 panic-indicator;
103 };
104
105 led_status_green: status-green {
106 function = LED_FUNCTION_STATUS;
107 color = <LED_COLOR_ID_GREEN>;
108 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
109 };
110
111 wlan {
112 function = LED_FUNCTION_WLAN;
113 color = <LED_COLOR_ID_GREEN>;
114 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
115 };
116
117 ethernet {
118 label = "green:ethernet";
119 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
120 };
121
122 wan {
123 function = LED_FUNCTION_WAN;
124 color = <LED_COLOR_ID_GREEN>;
125 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
126 };
127
128 lan1 {
129 label = "green:lan1";
130 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
131 };
132
133 lan2 {
134 label = "green:lan2";
135 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
136 };
137
138 lan3 {
139 label = "green:lan3";
140 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
141 };
142
143 lan4 {
144 label = "green:lan4";
145 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
146 };
147
148 poe {
149 label = "red:poe";
150 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
151 };
152 };
153 };
154
155 &watchdog {
156 status = "okay";
157 };
158
159 &prng {
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 };