4e2b4574d386d2f1403c8a41ca0862e3574b5cd7
[openwrt/staging/stintel.git] / target / linux / ipq40xx / files-6.1 / arch / arm / boot / dts / 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 usb2: usb2@60f8800 {
67 status = "okay";
68 };
69
70 crypto@8e3a000 {
71 status = "okay";
72 };
73
74 watchdog@b017000 {
75 status = "okay";
76 };
77 };
78
79 keys {
80 compatible = "gpio-keys";
81
82 reset {
83 label = "reset";
84 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_RESTART>;
86 };
87
88 mode {
89 label = "mode";
90 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RFKILL>;
92 };
93
94 led {
95 label = "led";
96 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_WPS_BUTTON>;
98 };
99 };
100
101 leds {
102 compatible = "gpio-leds";
103
104 led_status_blue: status-blue {
105 function = LED_FUNCTION_STATUS;
106 color = <LED_COLOR_ID_BLUE>;
107 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
108 };
109
110 led_status_red: status-red {
111 function = LED_FUNCTION_STATUS;
112 color = <LED_COLOR_ID_RED>;
113 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
114 panic-indicator;
115 };
116
117 led_status_green: status-green {
118 function = LED_FUNCTION_STATUS;
119 color = <LED_COLOR_ID_GREEN>;
120 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
121 };
122
123 wlan {
124 function = LED_FUNCTION_WLAN;
125 color = <LED_COLOR_ID_GREEN>;
126 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
127 };
128
129 ethernet {
130 label = "green:ethernet";
131 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
132 };
133
134 wan {
135 function = LED_FUNCTION_WAN;
136 color = <LED_COLOR_ID_GREEN>;
137 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
138 };
139
140 lan1 {
141 label = "green:lan1";
142 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
143 };
144
145 lan2 {
146 label = "green:lan2";
147 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
148 };
149
150 lan3 {
151 label = "green:lan3";
152 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
153 };
154
155 lan4 {
156 label = "green:lan4";
157 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
158 };
159
160 poe {
161 label = "red:poe";
162 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
163 };
164 };
165 };
166
167 &tlmm {
168 serial_pins: serial_pinmux {
169 mux {
170 pins = "gpio16", "gpio17";
171 function = "blsp_uart0";
172 bias-disable;
173 };
174 };
175
176 spi_0_pins: spi_0_pinmux {
177 pin {
178 function = "blsp_spi0";
179 pins = "gpio13", "gpio14", "gpio15";
180 drive-strength = <12>;
181 bias-disable;
182 };
183
184 pin_cs {
185 function = "gpio";
186 pins = "gpio12";
187 drive-strength = <2>;
188 bias-disable;
189 output-high;
190 };
191 };
192
193 nand_pins: nand_pins {
194 pullups {
195 pins = "gpio53", "gpio58", "gpio59";
196 function = "qpic";
197 bias-pull-up;
198 };
199
200 pulldowns {
201 pins = "gpio55", "gpio56", "gpio57", "gpio60",
202 "gpio62", "gpio63", "gpio64", "gpio65",
203 "gpio66", "gpio67", "gpio68", "gpio69";
204 function = "qpic";
205 bias-pull-down;
206 };
207 };
208
209 enable-usb-power {
210 gpio-hog;
211 gpios = <44 GPIO_ACTIVE_HIGH>;
212 output-high;
213 line-name = "enable USB power";
214 };
215 };
216
217 &blsp_dma {
218 status = "okay";
219 };
220
221 &blsp1_spi1 {
222 status = "okay";
223
224 pinctrl-0 = <&spi_0_pins>;
225 pinctrl-names = "default";
226 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
227
228 flash@0 {
229 reg = <0>;
230 compatible = "jedec,spi-nor";
231 spi-max-frequency = <40000000>;
232
233 partitions {
234 compatible = "fixed-partitions";
235 #address-cells = <1>;
236 #size-cells = <1>;
237
238 partition@0 {
239 label = "Qualcomm";
240 reg = <0x0 0x80000>;
241 read-only;
242 };
243
244 partition@80000 {
245 compatible = "mikrotik,routerboot-partitions";
246 #address-cells = <1>;
247 #size-cells = <1>;
248 label = "RouterBoot";
249 reg = <0x80000 0x80000>;
250
251 hard_config {
252 read-only;
253 size = <0x2000>;
254 };
255
256 dtb_config {
257 read-only;
258 };
259
260 soft_config {
261 };
262 };
263 };
264 };
265 };
266
267 &qpic_bam {
268 status = "okay";
269 };
270
271 &nand {
272 status = "okay";
273
274 pinctrl-0 = <&nand_pins>;
275 pinctrl-names = "default";
276
277 nand@0 {
278 partitions {
279 compatible = "fixed-partitions";
280 #address-cells = <1>;
281 #size-cells = <1>;
282
283 partition@0 {
284 label = "kernel";
285 reg = <0x0 0xa00000>;
286 };
287
288 partition@a00000 {
289 label = "ubi";
290 reg = <0xa00000 0x7600000>;
291 };
292 };
293 };
294 };
295
296 &blsp1_uart1 {
297 status = "okay";
298
299 pinctrl-0 = <&serial_pins>;
300 pinctrl-names = "default";
301 };
302
303 &cryptobam {
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 };