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