qualcommax: dts: add reset delay to qca8081 phy
[openwrt/staging/dangole.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-dl-wrx36.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2022, Robert Marko <robimarko@gmail.com> */
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 = "Dynalink DL-WRX36";
15 compatible = "dynalink,dl-wrx36", "qcom,ipq8074";
16
17 aliases {
18 led-boot = &led_system_red;
19 led-failsafe = &led_system_red;
20 led-running = &led_system_blue;
21 led-upgrade = &led_system_red;
22 serial0 = &blsp1_uart5;
23 /* Aliases as required by u-boot to patch MAC addresses */
24 ethernet0 = &dp6_syn;
25 ethernet1 = &dp4;
26 ethernet2 = &dp3;
27 ethernet3 = &dp2;
28 ethernet4 = &dp1;
29 label-mac-device = &dp6_syn;
30 };
31
32 chosen {
33 stdout-path = "serial0:115200n8";
34 bootargs-append = " root=/dev/ubiblock0_1";
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45
46 wps {
47 label = "wps";
48 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51 };
52
53 leds {
54 compatible = "gpio-leds";
55
56 led_system_blue: system-blue {
57 label = "blue:system";
58 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
59 color = <LED_COLOR_ID_BLUE>;
60 };
61
62 led_system_red: system-red {
63 label = "red:system";
64 gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
65 color = <LED_COLOR_ID_RED>;
66 };
67 };
68 };
69
70 &tlmm {
71 mdio_pins: mdio-pins {
72 mdc {
73 pins = "gpio68";
74 function = "mdc";
75 drive-strength = <8>;
76 bias-pull-up;
77 };
78
79 mdio {
80 pins = "gpio69";
81 function = "mdio";
82 drive-strength = <8>;
83 bias-pull-up;
84 };
85 };
86 };
87
88 &blsp1_uart5 {
89 status = "okay";
90 };
91
92 &prng {
93 status = "okay";
94 };
95
96 &cryptobam {
97 status = "okay";
98 };
99
100 &crypto {
101 status = "okay";
102 };
103
104 &qpic_bam {
105 status = "okay";
106 };
107
108 &qpic_nand {
109 status = "okay";
110
111 nand@0 {
112 reg = <0>;
113 nand-ecc-strength = <8>;
114 nand-ecc-step-size = <512>;
115 nand-bus-width = <8>;
116
117 partitions {
118 compatible = "qcom,smem-part";
119 };
120 };
121 };
122
123 &qusb_phy_0 {
124 status = "okay";
125 };
126
127 &ssphy_0 {
128 status = "okay";
129 };
130
131 &usb_0 {
132 status = "okay";
133 };
134
135 &mdio {
136 status = "okay";
137
138 pinctrl-0 = <&mdio_pins>;
139 pinctrl-names = "default";
140 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
141
142 qca8075_0: ethernet-phy@0 {
143 compatible = "ethernet-phy-ieee802.3-c22";
144 reg = <0>;
145 };
146
147 qca8075_1: ethernet-phy@1 {
148 compatible = "ethernet-phy-ieee802.3-c22";
149 reg = <1>;
150 };
151
152 qca8075_2: ethernet-phy@2 {
153 compatible = "ethernet-phy-ieee802.3-c22";
154 reg = <2>;
155 };
156
157 qca8075_3: ethernet-phy@3 {
158 compatible = "ethernet-phy-ieee802.3-c22";
159 reg = <3>;
160 };
161
162 qca8081: ethernet-phy@28 {
163 compatible = "ethernet-phy-id004d.d101";
164 reg = <28>;
165 reset-deassert-us = <10000>;
166 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
167
168 leds {
169 #address-cells = <1>;
170 #size-cells = <0>;
171
172 led@0 {
173 reg = <0>;
174 color = <LED_COLOR_ID_GREEN>;
175 function = LED_FUNCTION_WAN;
176 default-state = "keep";
177 };
178
179 led@1 {
180 reg = <1>;
181 color = <LED_COLOR_ID_YELLOW>;
182 function = LED_FUNCTION_WAN;
183 default-state = "keep";
184 };
185 };
186 };
187 };
188
189 &switch {
190 status = "okay";
191
192 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
193 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
194 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
195 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
196
197 qcom,port_phyinfo {
198 port@1 {
199 port_id = <1>;
200 phy_address = <0>;
201 };
202 port@2 {
203 port_id = <2>;
204 phy_address = <1>;
205 };
206 port@3 {
207 port_id = <3>;
208 phy_address = <2>;
209 };
210 port@4 {
211 port_id = <4>;
212 phy_address = <3>;
213 };
214 port@6 {
215 port_id = <6>;
216 phy_address = <28>;
217 port_mac_sel = "QGMAC_PORT";
218 };
219 };
220 };
221
222 &edma {
223 status = "okay";
224 };
225
226 &dp1 {
227 status = "okay";
228 phy-handle = <&qca8075_0>;
229 label = "lan4";
230 };
231
232 &dp2 {
233 status = "okay";
234 phy-handle = <&qca8075_1>;
235 label = "lan3";
236 };
237
238 &dp3 {
239 status = "okay";
240 phy-handle = <&qca8075_2>;
241 label = "lan2";
242 };
243
244 &dp4 {
245 status = "okay";
246 phy-handle = <&qca8075_3>;
247 label = "lan1";
248 };
249
250 &dp6_syn {
251 status = "okay";
252 phy-handle = <&qca8081>;
253 label = "wan";
254 };
255
256 &wifi {
257 status = "okay";
258 qcom,ath11k-calibration-variant = "Dynalink-DL-WRX36";
259 };