52af1f125e26d884873983d4ee3b124765f6cd0f
[openwrt/staging/blocktrron.git] / target / linux / ipq40xx / files-6.1 / arch / arm / boot / dts / qcom-ipq4019-hap-ac3-lte6-kit.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 LTE6 kit";
12 compatible = "mikrotik,hap-ac3-lte6-kit";
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
73 leds {
74 compatible = "gpio-leds";
75
76 led_status_blue: status-blue {
77 function = LED_FUNCTION_STATUS;
78 color = <LED_COLOR_ID_BLUE>;
79 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
80 };
81
82 led_status_red: status-red {
83 function = LED_FUNCTION_STATUS;
84 color = <LED_COLOR_ID_RED>;
85 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
86 panic-indicator;
87 };
88
89 led_status_green: status-green {
90 function = LED_FUNCTION_STATUS;
91 color = <LED_COLOR_ID_GREEN>;
92 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
93 };
94
95 wlan {
96 function = LED_FUNCTION_WLAN;
97 color = <LED_COLOR_ID_GREEN>;
98 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
99 };
100
101 ethernet {
102 label = "green:ethernet";
103 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
104 };
105
106 wan {
107 function = LED_FUNCTION_WAN;
108 color = <LED_COLOR_ID_GREEN>;
109 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
110 };
111
112 lan1 {
113 label = "green:lan1";
114 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
115 };
116
117 lan2 {
118 label = "green:lan2";
119 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
120 };
121
122 lan3 {
123 label = "green:lan3";
124 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
125 };
126
127 lan4 {
128 label = "green:lan4";
129 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
130 };
131 };
132 };
133
134 &tlmm {
135 serial_pins: serial_pinmux {
136 mux {
137 pins = "gpio16", "gpio17";
138 function = "blsp_uart0";
139 bias-disable;
140 };
141 };
142
143 spi_0_pins: spi_0_pinmux {
144 pin {
145 function = "blsp_spi0";
146 pins = "gpio13", "gpio14", "gpio15";
147 drive-strength = <12>;
148 bias-disable;
149 };
150
151 pin_cs {
152 function = "gpio";
153 pins = "gpio12";
154 drive-strength = <2>;
155 bias-disable;
156 output-high;
157 };
158 };
159
160 enable-usb-power {
161 gpio-hog;
162 gpios = <44 GPIO_ACTIVE_HIGH>;
163 output-high;
164 line-name = "enable USB power";
165 };
166
167 enable-mpcie-power {
168 gpio-hog;
169 gpios = <51 GPIO_ACTIVE_HIGH>;
170 output-high;
171 line-name = "enable mPCI-E power";
172 };
173
174 };
175
176 &blsp_dma {
177 status = "okay";
178 };
179
180 &blsp1_spi1 {
181 status = "okay";
182
183 pinctrl-0 = <&spi_0_pins>;
184 pinctrl-names = "default";
185 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
186
187 flash@0 {
188 reg = <0>;
189 compatible = "jedec,spi-nor";
190 spi-max-frequency = <10000000>;
191 #address-cells = <1>;
192 #size-cells = <1>;
193
194
195 partitions {
196 compatible = "fixed-partitions";
197
198 partition@0 {
199 label = "Qualcomm";
200 reg = <0x0 0x80000>;
201 read-only;
202 };
203
204 partition@80000 {
205 compatible = "mikrotik,routerboot-partitions";
206 label = "RouterBoot";
207 reg = <0x80000 0x80000>;
208
209 hard_config {
210 size = <0x2000>;
211 };
212
213 dtb_config {
214 read-only;
215 };
216
217 soft_config {
218 };
219 };
220
221 partition@110000 {
222 compatible = "mikrotik,minor";
223 label = "firmware";
224 reg = <0x110000 0xef0000>;
225 };
226 };
227 };
228 };
229
230 &qpic_bam {
231 status = "okay";
232 };
233
234 &blsp1_uart1 {
235 status = "okay";
236 pinctrl-0 = <&serial_pins>;
237 pinctrl-names = "default";
238 };
239
240 &cryptobam {
241 status = "okay";
242 };
243
244 &usb3_ss_phy {
245 status = "okay";
246 };
247
248 &usb3_hs_phy {
249 status = "okay";
250 };
251
252 &usb3 {
253 status = "okay";
254 };
255
256 &usb2_hs_phy {
257 status = "okay";
258 };
259
260 &usb2 {
261 status = "okay";
262 };
263
264 &mdio {
265 status = "okay";
266 };
267
268 &gmac {
269 status = "okay";
270 };
271
272 &switch {
273 status = "okay";
274 };
275
276 &swport1 {
277 status = "okay";
278 label = "lan4";
279 };
280
281 &swport2 {
282 status = "okay";
283 label = "lan3";
284 };
285
286 &swport3 {
287 status = "okay";
288 label = "lan2";
289 };
290
291 &swport4 {
292 status = "okay";
293 label = "lan1";
294 };
295
296 &swport5 {
297 status = "okay";
298 };
299
300 &wifi0 {
301 status = "okay";
302 };
303
304 &wifi1 {
305 status = "okay";
306 };
307
308 &crypto {
309 status = "okay";
310 };
311
312 &watchdog {
313 status = "okay";
314 };
315
316 &prng {
317 status = "okay";
318 };