ipq40xx: 6.6: fix DTS to use reference for usb node
[openwrt/staging/nbd.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 watchdog@b017000 {
71 status = "okay";
72 };
73 };
74
75 keys {
76 compatible = "gpio-keys";
77
78 reset {
79 label = "reset";
80 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83
84 mode {
85 label = "mode";
86 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_RFKILL>;
88 };
89
90 led {
91 label = "led";
92 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_WPS_BUTTON>;
94 };
95 };
96
97 leds {
98 compatible = "gpio-leds";
99
100 led_status_blue: status-blue {
101 function = LED_FUNCTION_STATUS;
102 color = <LED_COLOR_ID_BLUE>;
103 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
104 };
105
106 led_status_red: status-red {
107 function = LED_FUNCTION_STATUS;
108 color = <LED_COLOR_ID_RED>;
109 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
110 panic-indicator;
111 };
112
113 led_status_green: status-green {
114 function = LED_FUNCTION_STATUS;
115 color = <LED_COLOR_ID_GREEN>;
116 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
117 };
118
119 wlan {
120 function = LED_FUNCTION_WLAN;
121 color = <LED_COLOR_ID_GREEN>;
122 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
123 };
124
125 ethernet {
126 label = "green:ethernet";
127 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
128 };
129
130 wan {
131 function = LED_FUNCTION_WAN;
132 color = <LED_COLOR_ID_GREEN>;
133 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
134 };
135
136 lan1 {
137 label = "green:lan1";
138 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
139 };
140
141 lan2 {
142 label = "green:lan2";
143 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
144 };
145
146 lan3 {
147 label = "green:lan3";
148 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
149 };
150
151 lan4 {
152 label = "green:lan4";
153 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
154 };
155
156 poe {
157 label = "red:poe";
158 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
159 };
160 };
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 };