qualcommax: ipq60xx: add yuncore fap650 support
[openwrt/staging/xback.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq6018-fap650.dts
1 // SPDX-License-Identifier: MIT, GPL-2.0 or later
2 /* Copyright (c) 2023, Ruslan Isaev <legale.legale@gmail.com> */
3
4 /dts-v1/;
5
6 #include "ipq6018-512m.dtsi"
7 #include "ipq6018-cp-cpu.dtsi"
8 #include "ipq6018-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12
13 / {
14 model = "Yuncore FAP650";
15 compatible = "yuncore,fap650", "qcom,ipq6018";
16
17 aliases {
18 ethernet0 = &dp5;
19 ethernet1 = &dp4;
20 ethernet2 = &dp3;
21 ethernet3 = &dp2;
22 ethernet4 = &dp1;
23 label-mac-device = &dp5;
24 serial0 = &blsp1_uart3;
25 led-boot = &led_system;
26 led-failsafe = &led_system;
27 led-running = &led_system;
28 led-upgrade = &led_system;
29 };
30
31 chosen {
32 stdout-path = "serial0:115200n8";
33 bootargs-append = " root=/dev/ubiblock0_1";
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led_system: system {
50 color = <LED_COLOR_ID_RED>;
51 function = LED_FUNCTION_STATUS;
52 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
53 };
54
55 wlan2g {
56 color = <LED_COLOR_ID_GREEN>;
57 function = LED_FUNCTION_WLAN_2GHZ;
58 gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
59 };
60
61 wlan5g {
62 color = <LED_COLOR_ID_BLUE>;
63 function = LED_FUNCTION_WLAN_5GHZ;
64 gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
65 };
66 };
67 };
68
69 &blsp1_uart3 {
70 pinctrl-0 = <&serial_3_pins>;
71 pinctrl-names = "default";
72 status = "okay";
73 };
74
75 &tlmm {
76 mdio_pins: mdio-pins {
77 mdc {
78 pins = "gpio64";
79 function = "mdc";
80 drive-strength = <8>;
81 bias-pull-up;
82 };
83
84 mdio {
85 pins = "gpio65";
86 function = "mdio";
87 drive-strength = <8>;
88 bias-pull-up;
89 };
90 };
91 };
92
93 &mdio {
94 status = "okay";
95 pinctrl-0 = <&mdio_pins>;
96 pinctrl-names = "default";
97 reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
98 reset-delay-us = <10000>;
99 reset-post-delay-us = <50000>;
100
101 ethernet-phy-package@0 {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 compatible = "qcom,qca8075-package";
105 reg = <0>;
106
107 qcom,package-mode = "psgmii";
108
109 qca8075_0: ethernet-phy@0 {
110 compatible = "ethernet-phy-ieee802.3-c22";
111 reg = <0>;
112 };
113
114 qca8075_1: ethernet-phy@1 {
115 compatible = "ethernet-phy-ieee802.3-c22";
116 reg = <1>;
117 };
118
119 qca8075_2: ethernet-phy@2 {
120 compatible = "ethernet-phy-ieee802.3-c22";
121 reg = <2>;
122 };
123
124 qca8075_3: ethernet-phy@3 {
125 compatible = "ethernet-phy-ieee802.3-c22";
126 reg = <3>;
127 };
128
129 qca8075_4: ethernet-phy@4 {
130 compatible = "ethernet-phy-ieee802.3-c22";
131 reg = <4>;
132 };
133 };
134 };
135
136 &switch {
137 status = "okay";
138 switch_lan_bmp = <(ESS_PORT1|ESS_PORT2|ESS_PORT3|ESS_PORT4)>; /* lan port bitmap */
139 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
140 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
141
142 qcom,port_phyinfo {
143 port@1 {
144 port_id = <1>;
145 phy_address = <0>;
146 };
147
148 port@2 {
149 port_id = <2>;
150 phy_address = <1>;
151 };
152
153 port@3 {
154 port_id = <3>;
155 phy_address = <2>;
156 };
157
158 port@4 {
159 port_id = <4>;
160 phy_address = <3>;
161 };
162
163 port@5 {
164 port_id = <5>;
165 phy_address = <4>;
166 };
167 };
168 };
169
170 &usb2 {
171 status = "okay";
172 };
173
174 &usb3 {
175 status = "okay";
176 };
177
178 &edma {
179 status = "okay";
180 };
181
182 &dp1 {
183 status = "okay";
184 phy-handle = <&qca8075_0>;
185 label = "lan1";
186 };
187
188 &dp2 {
189 status = "okay";
190 phy-handle = <&qca8075_1>;
191 label = "lan2";
192 };
193
194 &dp3 {
195 status = "okay";
196 phy-handle = <&qca8075_2>;
197 label = "lan3";
198 };
199
200 &dp4 {
201 status = "okay";
202 phy-handle = <&qca8075_3>;
203 label = "lan4";
204 };
205
206 &dp5 {
207 status = "okay";
208 phy-handle = <&qca8075_4>;
209 phy-mode = "psgmii";
210 label = "wan";
211 };
212
213 &qpic_bam {
214 status = "okay";
215 };
216
217 &blsp1_spi1 {
218 status = "okay";
219
220 flash@0 {
221 #address-cells = <1>;
222 #size-cells = <1>;
223 reg = <0>;
224 compatible = "jedec,spi-nor";
225 spi-max-frequency = <50000000>;
226
227 partitions {
228 compatible = "fixed-partitions";
229
230 partition@0 {
231 reg = <0x00000000 0x000c0000>;
232 label = "0:sbl1";
233 };
234
235 partition@c0000 {
236 reg = <0x000c0000 0x00010000>;
237 label = "0:mibib";
238 };
239
240 partition@d0000 {
241 reg = <0x000d0000 0x00020000>;
242 label = "0:bootconfig";
243 };
244
245 partition@f0000 {
246 reg = <0x000f0000 0x00020000>;
247 label = "0:bootconfig1";
248 };
249
250 partition@110000 {
251 reg = <0x00110000 0x001a0000>;
252 label = "0:qsee";
253 };
254
255 partition@2b0000 {
256 reg = <0x002b0000 0x001a0000>;
257 label = "0:qsee_1";
258 };
259
260 partition@450000 {
261 reg = <0x00450000 0x00010000>;
262 label = "0:devcfg";
263 };
264
265 partition@460000 {
266 reg = <0x00460000 0x00010000>;
267 label = "0:devcfg_1";
268 };
269
270 partition@470000 {
271 reg = <0x00470000 0x00040000>;
272 label = "0:rpm";
273 };
274
275 partition@4b0000 {
276 reg = <0x004b0000 0x00040000>;
277 label = "0:rpm_1";
278 };
279
280 partition@4f0000 {
281 reg = <0x004f0000 0x00010000>;
282 label = "0:cdt";
283 };
284
285 partition@500000 {
286 reg = <0x00500000 0x00010000>;
287 label = "0:cdt_1";
288 };
289
290 partition@510000 {
291 reg = <0x00510000 0x00010000>;
292 label = "0:appsblenv";
293 };
294
295 partition@520000 {
296 reg = <0x00520000 0x000a0000>;
297 label = "0:appsbl";
298 };
299
300 partition@5c0000 {
301 reg = <0x005c0000 0x000a0000>;
302 label = "0:appsbl_1";
303 };
304
305 partition@660000 {
306 reg = <0x00660000 0x00040000>;
307 label = "0:art";
308 };
309 };
310 };
311 };
312
313 &qpic_nand {
314 status = "okay";
315
316 nand@0 {
317 reg = <0>;
318
319 nand-ecc-strength = <4>;
320 nand-ecc-step-size = <512>;
321 nand-bus-width = <8>;
322
323 partitions {
324 compatible = "fixed-partitions";
325 #address-cells = <1>;
326 #size-cells = <1>;
327
328 partition@0 {
329 label = "rootfs";
330 reg = <0x00000000 0x03c00000>;
331 };
332
333 partition@3c00000 {
334 label = "rootfs_1";
335 reg = <0x03c00000 0x03c00000>;
336 };
337 };
338 };
339 };
340
341 &wifi {
342 qcom,ath11k-calibration-variant = "Yuncore-FAP650";
343 qcom,ath11k-fw-memory-mode = <1>;
344 status = "okay";
345 };
346
347 &qusb_phy_0 {
348 status = "okay";
349 };
350
351 &qusb_phy_1 {
352 status = "okay";
353 };
354
355 &ssphy_0 {
356 status = "okay";
357 };
358
359 &usb3 {
360 status = "okay";
361 };
362
363 &usb2 {
364 status = "okay";
365 };