537dd52032d2400bb3c20b7cfd0c269af5a47fd6
[openwrt/staging/hauke.git] / target / linux / ipq807x / files / arch / arm64 / boot / dts / qcom / ipq8074-nbg7815.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /*
3 * Copyright (c) 2022, Karol Przybylski <itor@o2.pl>
4 * Copyright (c) 2023, Andre Valentin <avalentin@marcant.net>
5 */
6
7 /dts-v1/;
8
9 #include "ipq8074.dtsi"
10 #include "ipq8074-hk-cpu.dtsi"
11 #include "ipq8074-ess.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/leds/common.h>
14 #include <dt-bindings/input/input.h>
15
16
17 / {
18 model = "Zyxel NBG7815";
19 compatible = "zyxel,nbg7815", "qcom,ipq8074";
20
21 aliases {
22 serial0 = &blsp1_uart5;
23 serial1 = &blsp1_uart3;
24 /* Alias as required by u-boot to patch MAC addresses */
25 ethernet0 = &dp1;
26 label-mac-device = &dp1;
27 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
33 keys {
34 compatible = "gpio-keys";
35
36 reset {
37 label = "reset";
38 linux,code = <KEY_RESTART>;
39 gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
40 };
41 };
42 };
43
44 &tlmm {
45 mdio_pins: mdio-pins {
46 mdc {
47 pins = "gpio68";
48 function = "mdc";
49 drive-strength = <8>;
50 bias-pull-up;
51 };
52
53 mdio {
54 pins = "gpio69";
55 function = "mdio";
56 drive-strength = <8>;
57 bias-pull-up;
58 };
59 };
60 };
61
62
63 &blsp1_uart3 {
64 status = "okay";
65 };
66
67 &blsp1_uart5 {
68 status = "okay";
69 };
70
71 &prng {
72 status = "okay";
73 };
74
75 &cryptobam {
76 status = "okay";
77 };
78
79 &crypto {
80 status = "okay";
81 };
82
83 &qpic_bam {
84 status = "okay";
85 };
86
87
88 &blsp1_spi1 {
89 pinctrl-0 = <&spi_0_pins>;
90 pinctrl-names = "default";
91 cs-gpios = <0>;
92 status = "okay";
93
94 /*
95 * Bootloader will find the NAND DT node by the compatible and
96 * then "fixup" it by adding the partitions from the SMEM table
97 * using the legacy bindings thus making it impossible for us
98 * to change the partition table or utilize NVMEM for calibration.
99 * So add a dummy partitions node that bootloader will populate
100 * and set it as disabled so the kernel ignores it instead of
101 * printing warnings due to the broken way bootloader adds the
102 * partitions.
103 */
104 partitions {
105 status = "disabled";
106 };
107
108
109 flash@0 {
110 #address-cells = <1>;
111 #size-cells = <1>;
112 reg = <0>;
113 compatible = "jedec,spi-nor";
114 spi-max-frequency = <50000000>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 partition@0 {
122 label = "0:sbl1";
123 reg = <0x0 0x50000>;
124 read-only;
125 };
126
127 partition@50000 {
128 label = "0:mibib";
129 reg = <0x50000 0x10000>;
130 read-only;
131 };
132
133 partition@60000 {
134 label = "0:bootconfig";
135 reg = <0x60000 0x20000>;
136 read-only;
137 };
138
139 partition@80000 {
140 label = "0:bootconfig1";
141 reg = <0x80000 0x20000>;
142 read-only;
143 };
144
145 partition@a0000 {
146 label = "0:qsee";
147 reg = <0xa0000 0x180000>;
148 read-only;
149 };
150
151 partition@220000 {
152 label = "0:qsee_1";
153 reg = <0x220000 0x180000>;
154 read-only;
155 };
156
157 partition@3a0000 {
158 label = "0:devcfg";
159 reg = <0x3a0000 0x10000>;
160 read-only;
161 };
162
163 partition@3b0000 {
164 label = "0:devcfg_1";
165 reg = <0x3b0000 0x10000>;
166 read-only;
167 };
168
169 partition@3c0000 {
170 label = "0:apdp";
171 reg = <0x3c0000 0x10000>;
172 read-only;
173 };
174
175 partition@3d0000 {
176 label = "0:apdp_1";
177 reg = <0x3d0000 0x10000>;
178 read-only;
179 };
180
181 partition@3e0000 {
182 label = "0:rpm";
183 reg = <0x3e0000 0x40000>;
184 read-only;
185 };
186
187 partition@420000 {
188 label = "0:rpm_1";
189 reg = <0x420000 0x40000>;
190 read-only;
191 };
192
193 partition@460000 {
194 label = "0:cdt";
195 reg = <0x460000 0x10000>;
196 read-only;
197 };
198
199 partition@470000 {
200 label = "0:cdt_1";
201 reg = <0x470000 0x10000>;
202 read-only;
203 };
204
205 partition@480000 {
206 label = "0:appsbl";
207 reg = <0x480000 0xc0000>;
208 read-only;
209 };
210
211 partition@540000 {
212 label = "0:appsbl_1";
213 reg = <0x540000 0xc0000>;
214 read-only;
215 };
216
217 partition@600000 {
218 compatible = "u-boot,env";
219 label = "0:appsblenv";
220 reg = <0x600000 0x10000>;
221
222 macaddr_lan: ethaddr {
223 };
224 };
225
226 partition@610000 {
227 label = "0:art";
228 reg = <0x610000 0x40000>;
229 read-only;
230 };
231
232 partition@650000 {
233 label = "0:ethphyfw";
234 reg = <0x650000 0x80000>;
235 read-only;
236 };
237
238 partition@6d0000 {
239 label = "0:crt";
240 reg = <0x6d0000 0x10000>;
241 read-only;
242 };
243
244 partition@6e0000 {
245 label = "dual_flag";
246 reg = <0x6e0000 0x10000>;
247 };
248
249 partition@6f0000 {
250 label = "reserved";
251 reg = <0x6f0000 0x110000>;
252 read-only;
253 };
254 };
255 };
256 };
257
258 &mdio {
259 status = "okay";
260 pinctrl-0 = <&mdio_pins>;
261 pinctrl-names = "default";
262 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
263
264 qca8075_1: ethernet-phy@0 {
265 compatible = "ethernet-phy-ieee802.3-c22";
266 reg = <0>;
267 };
268
269 qca8075_2: ethernet-phy@1 {
270 compatible = "ethernet-phy-ieee802.3-c22";
271 reg = <1>;
272 };
273
274 qca8075_3: ethernet-phy@2 {
275 compatible = "ethernet-phy-ieee802.3-c22";
276 reg = <2>;
277 };
278
279 qca8075_4: ethernet-phy@3 {
280 compatible = "ethernet-phy-ieee802.3-c22";
281 reg = <3>;
282 };
283
284 qca8081: ethernet-phy@4{
285 compatible = "ethernet-phy-id004d.d101";
286 reg = <28>;
287 reset-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
288 };
289
290 aqr113c: ethernet-phy@5 {
291 compatible = "ethernet-phy-ieee802.3-c45";
292 reg = <8>;
293 reset-gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
294 };
295 };
296
297 &switch {
298 status = "okay";
299
300 switch_cpu_bmp = <0x1>;
301 switch_lan_bmp = <0x3e>;
302 switch_wan_bmp = <0x40>;
303 switch_mac_mode = <0x0>;
304 switch_mac_mode1 = <0xf>;
305 switch_mac_mode2 = <0xd>;
306 bm_tick_mode = <0>;
307 tm_tick_mode = <0>;
308
309 qcom,port_phyinfo {
310 port@0 {
311 port_id = <1>;
312 phy_address = <0>;
313 };
314
315 port@1 {
316 port_id = <2>;
317 phy_address = <1>;
318 };
319
320 port@2 {
321 port_id = <3>;
322 phy_address = <2>;
323 };
324
325 port@3 {
326 port_id = <4>;
327 phy_address = <3>;
328 };
329
330 port@4 {
331 port_id = <5>;
332 phy_address = <28>;
333 port_mac_sel = "QGMAC_PORT";
334 };
335
336 port@5 {
337 port_id = <6>;
338 ethernet-phy-ieee802.3-c45;
339 phy_address = <8>;
340 };
341 };
342 };
343
344 &edma {
345 status = "okay";
346 };
347
348 &dp1 {
349 status = "okay";
350 phy-handle = <&qca8075_1>;
351 label = "lan1";
352 nvmem-cells = <&macaddr_lan>;
353 nvmem-cell-names = "mac-address-ascii";
354 };
355
356 &dp2 {
357 status = "okay";
358 phy-handle = <&qca8075_2>;
359 label = "lan2";
360 nvmem-cells = <&macaddr_lan>;
361 nvmem-cell-names = "mac-address-ascii";
362 };
363
364 &dp3 {
365 status = "okay";
366 phy-handle = <&qca8075_3>;
367 label = "lan3";
368 nvmem-cells = <&macaddr_lan>;
369 nvmem-cell-names = "mac-address-ascii";
370 };
371
372 &dp4 {
373 status = "okay";
374 phy-handle = <&qca8075_4>;
375 label = "lan4";
376 nvmem-cells = <&macaddr_lan>;
377 nvmem-cell-names = "mac-address-ascii";
378 };
379
380 &dp5 {
381 status = "okay";
382 phy-handle = <&qca8081>;
383 label = "wan";
384 nvmem-cells = <&macaddr_lan>;
385 nvmem-cell-names = "mac-address-ascii";
386 mac-address-increment = <1>;
387 };
388
389 &dp6_syn {
390 status = "okay";
391 phy-handle = <&aqr113c>;
392 label = "10g";
393 nvmem-cells = <&macaddr_lan>;
394 nvmem-cell-names = "mac-address-ascii";
395 };
396
397 &blsp1_i2c2 {
398 pinctrl-0 = <&i2c_0_pins>;
399 pinctrl-names = "default";
400 status = "okay";
401
402 tmp103@70 {
403 compatible = "ti,tmp103";
404 reg = <0x70>;
405 };
406 };
407
408 &sdhc_1 {
409 status = "okay";
410 /* unstable, problem with the hs400 > h200 speed switch */
411 /delete-property/ mmc-hs400-1_8v;
412 mmc-hs200-1_8v;
413 mmc-ddr-1_8v;
414 vqmmc-supply = <&l11>;
415 };
416
417 &ssphy_0 {
418 status = "okay";
419 };
420
421 &qusb_phy_0 {
422 status = "okay";
423 };
424
425 &ssphy_1 {
426 status = "okay";
427 };
428
429 &qusb_phy_1 {
430 status = "okay";
431 };
432
433 &usb_0 {
434 status = "okay";
435 };
436
437 &usb_1 {
438 status = "okay";
439 };
440
441 &wifi {
442 status = "okay";
443
444 qcom,ath11k-calibration-variant = "Zyxel-NBG7815";
445 };