2bb2cce157ca45729dd0514a8f607e463b2f30d0
[openwrt/staging/robimarko.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 nvmem-layout {
155 compatible = "fixed-layout";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 macaddr_dp2: macaddr@6 {
160 reg = <0x6 0x6>;
161 };
162
163 macaddr_dp3: macaddr@c {
164 reg = <0xc 0x6>;
165 };
166
167 macaddr_dp4: macaddr@12 {
168 reg = <0x12 0x6>;
169 };
170
171 macaddr_dp5: macaddr@18 {
172 reg = <0x18 0x6>;
173 };
174
175 caldata_qca9889: caldata@4d000 {
176 reg = <0x33000 0x844>;
177 };
178 };
179 };
180
181 partition@880000 {
182 label = "bdata";
183 reg = <0x880000 0x80000>;
184 };
185
186 partition@900000 {
187 /* This is crash + crash_syslog parts combined */
188 label = "pstore";
189 reg = <0x900000 0x100000>;
190 };
191
192 /* Make the first rootfs a dedicated ubi partition for kernel */
193 partition@a00000 {
194 label = "ubi_kernel";
195 reg = <0xa00000 0x23c0000>;
196 };
197
198 /* Place the real rootfs in the original second rootfs and
199 * expand it to the end of the nand
200 */
201 rootfs: partition@2dc0000 {
202 label = "rootfs";
203 reg = <0x2dc0000 0xd240000>;
204 };
205 };
206 };
207 };
208
209 &mdio {
210 status = "okay";
211
212 pinctrl-0 = <&mdio_pins>;
213 pinctrl-names = "default";
214 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
215
216 qca8075_1: ethernet-phy@1 {
217 compatible = "ethernet-phy-ieee802.3-c22";
218 reg = <1>;
219 };
220
221 qca8075_2: ethernet-phy@2 {
222 compatible = "ethernet-phy-ieee802.3-c22";
223 reg = <2>;
224 };
225
226 qca8075_3: ethernet-phy@3 {
227 compatible = "ethernet-phy-ieee802.3-c22";
228 reg = <3>;
229 };
230
231 qca8075_4: ethernet-phy@4 {
232 compatible = "ethernet-phy-ieee802.3-c22";
233 reg = <4>;
234 };
235 };
236
237 &switch {
238 status = "okay";
239
240 switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
241 switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
242 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
243
244 qcom,port_phyinfo {
245 port@2 {
246 port_id = <2>;
247 phy_address = <1>;
248 };
249 port@3 {
250 port_id = <3>;
251 phy_address = <2>;
252 };
253 port@4 {
254 port_id = <4>;
255 phy_address = <3>;
256 };
257 port@5 {
258 port_id = <5>;
259 phy_address = <4>;
260 };
261 };
262 };
263
264 &edma {
265 status = "okay";
266 };
267
268 &dp2 {
269 status = "okay";
270 phy-handle = <&qca8075_1>;
271 label = "wan";
272 nvmem-cells = <&macaddr_dp2>;
273 nvmem-cell-names = "mac-address";
274 };
275
276 &dp3 {
277 status = "okay";
278 phy-handle = <&qca8075_2>;
279 label = "lan1";
280 nvmem-cells = <&macaddr_dp3>;
281 nvmem-cell-names = "mac-address";
282 };
283
284 &dp4 {
285 status = "okay";
286 phy-handle = <&qca8075_3>;
287 label = "lan2";
288 nvmem-cells = <&macaddr_dp4>;
289 nvmem-cell-names = "mac-address";
290 };
291
292 &dp5 {
293 status = "okay";
294 phy-handle = <&qca8075_4>;
295 label = "lan3";
296 nvmem-cells = <&macaddr_dp5>;
297 nvmem-cell-names = "mac-address";
298 };
299
300 &wifi {
301 status = "okay";
302
303 qcom,ath11k-fw-memory-mode = <1>;
304 };