qualcommax: switch to qca8081 upstream PHY driver
[openwrt/staging/nbd.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-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
166
167 leds {
168 #address-cells = <1>;
169 #size-cells = <0>;
170
171 led@0 {
172 reg = <0>;
173 color = <LED_COLOR_ID_GREEN>;
174 function = LED_FUNCTION_WAN;
175 default-state = "keep";
176 };
177
178 led@1 {
179 reg = <1>;
180 color = <LED_COLOR_ID_YELLOW>;
181 function = LED_FUNCTION_WAN;
182 default-state = "keep";
183 };
184 };
185 };
186 };
187
188 &switch {
189 status = "okay";
190
191 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
192 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
193 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
194 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
195
196 qcom,port_phyinfo {
197 port@1 {
198 port_id = <1>;
199 phy_address = <0>;
200 };
201 port@2 {
202 port_id = <2>;
203 phy_address = <1>;
204 };
205 port@3 {
206 port_id = <3>;
207 phy_address = <2>;
208 };
209 port@4 {
210 port_id = <4>;
211 phy_address = <3>;
212 };
213 port@6 {
214 port_id = <6>;
215 phy_address = <28>;
216 port_mac_sel = "QGMAC_PORT";
217 };
218 };
219 };
220
221 &edma {
222 status = "okay";
223 };
224
225 &dp1 {
226 status = "okay";
227 phy-handle = <&qca8075_0>;
228 label = "lan4";
229 };
230
231 &dp2 {
232 status = "okay";
233 phy-handle = <&qca8075_1>;
234 label = "lan3";
235 };
236
237 &dp3 {
238 status = "okay";
239 phy-handle = <&qca8075_2>;
240 label = "lan2";
241 };
242
243 &dp4 {
244 status = "okay";
245 phy-handle = <&qca8075_3>;
246 label = "lan1";
247 };
248
249 &dp6_syn {
250 status = "okay";
251 phy-handle = <&qca8081>;
252 label = "wan";
253 };
254
255 &wifi {
256 status = "okay";
257 qcom,ath11k-calibration-variant = "Dynalink-DL-WRX36";
258 };