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