qualcommax: convert qca807x PHY to PHY package implementation
[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 ethernet-phy-package@0 {
217 #address-cells = <1>;
218 #size-cells = <0>;
219 compatible = "qcom,qca8075-package";
220 reg = <0>;
221
222 qca8075_1: ethernet-phy@1 {
223 compatible = "ethernet-phy-ieee802.3-c22";
224 reg = <1>;
225 };
226
227 qca8075_2: ethernet-phy@2 {
228 compatible = "ethernet-phy-ieee802.3-c22";
229 reg = <2>;
230 };
231
232 qca8075_3: ethernet-phy@3 {
233 compatible = "ethernet-phy-ieee802.3-c22";
234 reg = <3>;
235 };
236
237 qca8075_4: ethernet-phy@4 {
238 compatible = "ethernet-phy-ieee802.3-c22";
239 reg = <4>;
240 };
241 };
242 };
243
244 &switch {
245 status = "okay";
246
247 switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
248 switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
249 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
250
251 qcom,port_phyinfo {
252 port@2 {
253 port_id = <2>;
254 phy_address = <1>;
255 };
256 port@3 {
257 port_id = <3>;
258 phy_address = <2>;
259 };
260 port@4 {
261 port_id = <4>;
262 phy_address = <3>;
263 };
264 port@5 {
265 port_id = <5>;
266 phy_address = <4>;
267 };
268 };
269 };
270
271 &edma {
272 status = "okay";
273 };
274
275 &dp2 {
276 status = "okay";
277 phy-handle = <&qca8075_1>;
278 label = "wan";
279 nvmem-cells = <&macaddr_dp2>;
280 nvmem-cell-names = "mac-address";
281 };
282
283 &dp3 {
284 status = "okay";
285 phy-handle = <&qca8075_2>;
286 label = "lan1";
287 nvmem-cells = <&macaddr_dp3>;
288 nvmem-cell-names = "mac-address";
289 };
290
291 &dp4 {
292 status = "okay";
293 phy-handle = <&qca8075_3>;
294 label = "lan2";
295 nvmem-cells = <&macaddr_dp4>;
296 nvmem-cell-names = "mac-address";
297 };
298
299 &dp5 {
300 status = "okay";
301 phy-handle = <&qca8075_4>;
302 label = "lan3";
303 nvmem-cells = <&macaddr_dp5>;
304 nvmem-cell-names = "mac-address";
305 };
306
307 &wifi {
308 status = "okay";
309
310 qcom,ath11k-fw-memory-mode = <1>;
311 };