82a981b5faacfc61cec026b443e0059a48ef50d4
[openwrt/staging/hauke.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8071-ax3600.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Robert Marko <robimarko@gmail.com> */
3
4 #include "ipq8074-512m.dtsi"
5 #include "ipq8074-ac-cpu.dtsi"
6 #include "ipq8074-ess.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9
10 / {
11 aliases {
12 serial0 = &blsp1_uart5;
13 led-boot = &led_system_yellow;
14 led-failsafe = &led_system_yellow;
15 led-running = &led_system_blue;
16 led-upgrade = &led_system_yellow;
17 label-mac-device = &dp2;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 bootargs-append = " root=/dev/ubiblock0_0";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34 };
35
36 &tlmm {
37 mdio_pins: mdio-pins {
38 mdc {
39 pins = "gpio68";
40 function = "mdc";
41 drive-strength = <8>;
42 bias-pull-up;
43 };
44
45 mdio {
46 pins = "gpio69";
47 function = "mdio";
48 drive-strength = <8>;
49 bias-pull-up;
50 };
51 };
52 };
53
54 &blsp1_uart5 {
55 status = "okay";
56 };
57
58 &prng {
59 status = "okay";
60 };
61
62 &cryptobam {
63 status = "okay";
64 };
65
66 &crypto {
67 status = "okay";
68 };
69
70 &qpic_bam {
71 status = "okay";
72 };
73
74 &qpic_nand {
75 status = "okay";
76
77 /*
78 * Bootloader will find the NAND DT node by the compatible and
79 * then "fixup" it by adding the partitions from the SMEM table
80 * using the legacy bindings thus making it impossible for us
81 * to change the partition table or utilize NVMEM for calibration.
82 * So add a dummy partitions node that bootloader will populate
83 * and set it as disabled so the kernel ignores it instead of
84 * printing warnings due to the broken way bootloader adds the
85 * partitions.
86 */
87 partitions {
88 status = "disabled";
89 };
90
91 nand@0 {
92 reg = <0>;
93 nand-ecc-strength = <4>;
94 nand-ecc-step-size = <512>;
95 nand-bus-width = <8>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "0:sbl1";
104 reg = <0x0 0x100000>;
105 read-only;
106 };
107
108 partition@100000 {
109 label = "0:mibib";
110 reg = <0x100000 0x100000>;
111 read-only;
112 };
113
114 partition@200000 {
115 label = "0:qsee";
116 reg = <0x200000 0x300000>;
117 read-only;
118 };
119
120 partition@500000 {
121 label = "0:devcfg";
122 reg = <0x500000 0x80000>;
123 read-only;
124 };
125
126 partition@580000 {
127 label = "0:rpm";
128 reg = <0x580000 0x80000>;
129 read-only;
130 };
131
132 partition@600000 {
133 label = "0:cdt";
134 reg = <0x600000 0x80000>;
135 read-only;
136 };
137
138 partition@680000 {
139 label = "0:appsblenv";
140 reg = <0x680000 0x80000>;
141 };
142
143 partition@700000 {
144 label = "0:appsbl";
145 reg = <0x700000 0x100000>;
146 read-only;
147 };
148
149 partition@800000 {
150 label = "0:art";
151 reg = <0x800000 0x80000>;
152 read-only;
153
154 compatible = "nvmem-cells";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 macaddr_dp2: macaddr@6 {
159 reg = <0x6 0x6>;
160 };
161
162 macaddr_dp3: macaddr@c {
163 reg = <0xc 0x6>;
164 };
165
166 macaddr_dp4: macaddr@12 {
167 reg = <0x12 0x6>;
168 };
169
170 macaddr_dp5: macaddr@18 {
171 reg = <0x18 0x6>;
172 };
173
174 caldata_qca9889: caldata@4d000 {
175 reg = <0x33000 0x844>;
176 };
177 };
178
179 partition@880000 {
180 label = "bdata";
181 reg = <0x880000 0x80000>;
182 };
183
184 partition@900000 {
185 /* This is crash + crash_syslog parts combined */
186 label = "pstore";
187 reg = <0x900000 0x100000>;
188 };
189
190 /* Make the first rootfs a dedicated ubi partition for kernel */
191 partition@a00000 {
192 label = "ubi_kernel";
193 reg = <0xa00000 0x23c0000>;
194 };
195
196 /* Place the real rootfs in the original second rootfs and
197 * expand it to the end of the nand
198 */
199 rootfs: partition@2dc0000 {
200 label = "rootfs";
201 reg = <0x2dc0000 0xd240000>;
202 };
203 };
204 };
205 };
206
207 &mdio {
208 status = "okay";
209
210 pinctrl-0 = <&mdio_pins>;
211 pinctrl-names = "default";
212 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
213
214 qca8075_1: ethernet-phy@1 {
215 compatible = "ethernet-phy-ieee802.3-c22";
216 reg = <1>;
217 };
218
219 qca8075_2: ethernet-phy@2 {
220 compatible = "ethernet-phy-ieee802.3-c22";
221 reg = <2>;
222 };
223
224 qca8075_3: ethernet-phy@3 {
225 compatible = "ethernet-phy-ieee802.3-c22";
226 reg = <3>;
227 };
228
229 qca8075_4: ethernet-phy@4 {
230 compatible = "ethernet-phy-ieee802.3-c22";
231 reg = <4>;
232 };
233 };
234
235 &switch {
236 status = "okay";
237
238 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
239 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
240 switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
241 switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
242 switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
243 bm_tick_mode = <0>; /* bm tick mode */
244 tm_tick_mode = <0>; /* tm tick mode */
245
246 qcom,port_phyinfo {
247 port@1 {
248 port_id = <2>;
249 phy_address = <1>;
250 };
251 port@2 {
252 port_id = <3>;
253 phy_address = <2>;
254 };
255 port@3 {
256 port_id = <4>;
257 phy_address = <3>;
258 };
259 port@4 {
260 port_id = <5>;
261 phy_address = <4>;
262 };
263 };
264 };
265
266 &edma {
267 status = "okay";
268 };
269
270 &dp2 {
271 status = "okay";
272 phy-handle = <&qca8075_1>;
273 label = "wan";
274 nvmem-cells = <&macaddr_dp2>;
275 nvmem-cell-names = "mac-address";
276 };
277
278 &dp3 {
279 status = "okay";
280 phy-handle = <&qca8075_2>;
281 label = "lan1";
282 nvmem-cells = <&macaddr_dp3>;
283 nvmem-cell-names = "mac-address";
284 };
285
286 &dp4 {
287 status = "okay";
288 phy-handle = <&qca8075_3>;
289 label = "lan2";
290 nvmem-cells = <&macaddr_dp4>;
291 nvmem-cell-names = "mac-address";
292 };
293
294 &dp5 {
295 status = "okay";
296 phy-handle = <&qca8075_4>;
297 label = "lan3";
298 nvmem-cells = <&macaddr_dp5>;
299 nvmem-cell-names = "mac-address";
300 };
301
302 &wifi {
303 status = "okay";
304
305 qcom,ath11k-fw-memory-mode = <1>;
306 };