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