ipq40xx: use existing labels for watchdog 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 rng@22000 {
32 status = "okay";
33 };
34
35 counter@4a1000 {
36 compatible = "qcom,qca-gcnt";
37 reg = <0x4a1000 0x4>;
38 };
39
40 tcsr@1949000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1949000 0x100>;
43 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
44 };
45
46 tcsr@194b000 {
47 /* select hostmode */
48 compatible = "qcom,tcsr";
49 reg = <0x194b000 0x100>;
50 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
51 status = "okay";
52 };
53
54 ess_tcsr@1953000 {
55 compatible = "qcom,tcsr";
56 reg = <0x1953000 0x1000>;
57 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
58 };
59
60 tcsr@1957000 {
61 compatible = "qcom,tcsr";
62 reg = <0x1957000 0x100>;
63 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
64 };
65
66 crypto@8e3a000 {
67 status = "okay";
68 };
69 };
70
71 keys {
72 compatible = "gpio-keys";
73
74 reset {
75 label = "reset";
76 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 mode {
81 label = "mode";
82 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RFKILL>;
84 };
85
86 led {
87 label = "led";
88 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_WPS_BUTTON>;
90 };
91 };
92
93 leds {
94 compatible = "gpio-leds";
95
96 led_status_blue: status-blue {
97 function = LED_FUNCTION_STATUS;
98 color = <LED_COLOR_ID_BLUE>;
99 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
100 };
101
102 led_status_red: status-red {
103 function = LED_FUNCTION_STATUS;
104 color = <LED_COLOR_ID_RED>;
105 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
106 panic-indicator;
107 };
108
109 led_status_green: status-green {
110 function = LED_FUNCTION_STATUS;
111 color = <LED_COLOR_ID_GREEN>;
112 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
113 };
114
115 wlan {
116 function = LED_FUNCTION_WLAN;
117 color = <LED_COLOR_ID_GREEN>;
118 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
119 };
120
121 ethernet {
122 label = "green:ethernet";
123 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
124 };
125
126 wan {
127 function = LED_FUNCTION_WAN;
128 color = <LED_COLOR_ID_GREEN>;
129 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
130 };
131
132 lan1 {
133 label = "green:lan1";
134 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
135 };
136
137 lan2 {
138 label = "green:lan2";
139 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
140 };
141
142 lan3 {
143 label = "green:lan3";
144 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
145 };
146
147 lan4 {
148 label = "green:lan4";
149 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
150 };
151
152 poe {
153 label = "red:poe";
154 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
155 };
156 };
157 };
158
159 &watchdog {
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 };