qualcommax: dts: add reset delay to qca8081 phy
[openwrt/staging/dangole.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-aw1000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2023, Chukun Pan <amadeus@jmu.edu.cn> */
3
4 /dts-v1/;
5
6 #include "ipq8074.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include "ipq8074-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 model = "Arcadyan AW1000";
14 compatible = "arcadyan,aw1000", "qcom,ipq8074";
15
16 aliases {
17 led-boot = &led_power;
18 led-failsafe = &led_power;
19 led-running = &led_power;
20 led-upgrade = &led_power;
21 serial0 = &blsp1_uart5;
22 /*
23 * Aliases as required by u-boot
24 * to patch MAC addresses
25 */
26 ethernet0 = &dp1;
27 ethernet1 = &dp2;
28 ethernet2 = &dp3;
29 ethernet3 = &dp4;
30 ethernet4 = &dp6_syn;
31 label-mac-device = &dp1;
32 };
33
34 chosen {
35 stdout-path = "serial0:115200n8";
36 bootargs-append = " root=/dev/ubiblock0_1";
37 };
38
39 gpio-export {
40 compatible = "gpio-export";
41
42 lte-pwrkey {
43 gpio-export,name = "lte_pwrkey";
44 gpio-export,output = <1>;
45 gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
46 };
47
48 lte-power {
49 gpio-export,name = "lte_power";
50 gpio-export,output = <1>;
51 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
52 };
53
54 lte-reset {
55 gpio-export,name = "lte_reset";
56 gpio-export,output = <1>;
57 gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
58 };
59
60 usb-vbus {
61 gpio-export,name = "usb_vbus";
62 gpio-export,output = <0>;
63 gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys";
69
70 wlan {
71 label = "wlan";
72 linux,code = <KEY_WLAN>;
73 gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
74 };
75
76 wps {
77 label = "wps";
78 linux,code = <KEY_WPS_BUTTON>;
79 gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
80 };
81
82 reset {
83 label = "reset";
84 linux,code = <KEY_RESTART>;
85 gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
86 };
87 };
88
89 led-spi {
90 compatible = "spi-gpio";
91 #address-cells = <1>;
92 #size-cells = <0>;
93
94 sck-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
95 mosi-gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
96
97 led_gpio: led-gpio@0 {
98 compatible = "fairchild,74hc595";
99 reg = <0>;
100 gpio-controller;
101 #gpio-cells = <2>;
102 registers-number = <2>;
103 spi-max-frequency = <1000000>;
104 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
105 };
106 };
107
108 leds {
109 compatible = "gpio-leds";
110
111 led_power: power {
112 label = "green:power";
113 gpios = <&led_gpio 0 GPIO_ACTIVE_HIGH>;
114 };
115
116 wifi {
117 label = "green:wifi";
118 gpios = <&led_gpio 1 GPIO_ACTIVE_HIGH>;
119 };
120
121 internet {
122 label = "green:internet";
123 gpios = <&led_gpio 2 GPIO_ACTIVE_HIGH>;
124 };
125
126 5g-red {
127 label = "red:5g";
128 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
129 };
130
131 5g-green {
132 label = "green:5g";
133 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
134 };
135
136 5g-blue {
137 label = "blue:5g";
138 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
139 };
140
141 signal-red {
142 label = "red:signal";
143 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
144 };
145
146 signal-green {
147 label = "green:signal";
148 gpios = <&led_gpio 8 GPIO_ACTIVE_LOW>;
149 };
150
151 signal-blue {
152 label = "blue:signal";
153 gpios = <&led_gpio 9 GPIO_ACTIVE_LOW>;
154 };
155
156 phone {
157 label = "green:phone";
158 gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
159 };
160 };
161 };
162
163 &tlmm {
164 mdio_pins: mdio-pins {
165 mdc {
166 pins = "gpio68";
167 function = "mdc";
168 drive-strength = <8>;
169 bias-pull-up;
170 };
171
172 mdio {
173 pins = "gpio69";
174 function = "mdio";
175 drive-strength = <8>;
176 bias-pull-up;
177 };
178 };
179 };
180
181 &blsp1_uart5 {
182 status = "okay";
183 };
184
185 &cryptobam {
186 status = "okay";
187 };
188
189 &crypto {
190 status = "okay";
191 };
192
193 &prng {
194 status = "okay";
195 };
196
197 &qpic_bam {
198 status = "okay";
199 };
200
201 &qpic_nand {
202 status = "okay";
203
204 nand@0 {
205 reg = <0>;
206 nand-ecc-strength = <8>;
207 nand-ecc-step-size = <512>;
208 nand-bus-width = <8>;
209
210 partitions {
211 compatible = "qcom,smem-part";
212 };
213 };
214 };
215
216 &qusb_phy_0 {
217 status = "okay";
218 };
219
220 &qusb_phy_1 {
221 status = "okay";
222 };
223
224 &ssphy_0 {
225 status = "okay";
226 };
227
228 &ssphy_1 {
229 status = "okay";
230 };
231
232 &usb_0 {
233 status = "okay";
234 };
235
236 &usb_1 {
237 status = "okay";
238 };
239
240 &mdio {
241 status = "okay";
242
243 pinctrl-0 = <&mdio_pins>;
244 pinctrl-names = "default";
245 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
246
247 qca8075_0: ethernet-phy@0 {
248 compatible = "ethernet-phy-ieee802.3-c22";
249 reg = <0>;
250 };
251
252 qca8075_1: ethernet-phy@1 {
253 compatible = "ethernet-phy-ieee802.3-c22";
254 reg = <1>;
255 };
256
257 qca8075_2: ethernet-phy@2 {
258 compatible = "ethernet-phy-ieee802.3-c22";
259 reg = <2>;
260 };
261
262 qca8075_3: ethernet-phy@3 {
263 compatible = "ethernet-phy-ieee802.3-c22";
264 reg = <3>;
265 };
266
267 qca8081: ethernet-phy@28 {
268 compatible = "ethernet-phy-id004d.d101";
269 reg = <28>;
270 reset-deassert-us = <10000>;
271 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
272 };
273 };
274
275 &switch {
276 status = "okay";
277
278 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
279 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
280 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
281 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
282
283 qcom,port_phyinfo {
284 port@1 {
285 port_id = <1>;
286 phy_address = <0>;
287 };
288 port@2 {
289 port_id = <2>;
290 phy_address = <1>;
291 };
292 port@3 {
293 port_id = <3>;
294 phy_address = <2>;
295 };
296 port@4 {
297 port_id = <4>;
298 phy_address = <3>;
299 };
300 port@6 {
301 port_id = <6>;
302 phy_address = <28>;
303 port_mac_sel = "QGMAC_PORT";
304 };
305 };
306 };
307
308 &edma {
309 status = "okay";
310 };
311
312 &dp1 {
313 status = "okay";
314 phy-handle = <&qca8075_0>;
315 label = "lan1";
316 };
317
318 &dp2 {
319 status = "okay";
320 phy-handle = <&qca8075_1>;
321 label = "lan2";
322 };
323
324 &dp3 {
325 status = "okay";
326 phy-handle = <&qca8075_2>;
327 label = "lan3";
328 };
329
330 &dp4 {
331 status = "okay";
332 phy-handle = <&qca8075_3>;
333 label = "lan4";
334 };
335
336 &dp6_syn {
337 status = "okay";
338 phy-handle = <&qca8081>;
339 label = "wan";
340 };
341
342 &wifi {
343 status = "okay";
344
345 qcom,ath11k-calibration-variant = "Arcadyan-AW1000";
346 };