qualcommax: convert qca807x PHY to PHY package implementation
[openwrt/staging/jow.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8074-wxr-5950ax12.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074.dtsi"
6 #include "ipq8074-hk-cpu.dtsi"
7 #include "ipq8074-ess.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 model = "Buffalo WXR-5950AX12";
14 compatible = "buffalo,wxr-5950ax12", "qcom,ipq8074";
15
16 aliases {
17 serial0 = &blsp1_uart5;
18 led-boot = &led_power_white;
19 led-failsafe = &led_power_red;
20 led-running = &led_power_white;
21 led-upgrade = &led_power_white;
22 label-mac-device = &dp5_syn;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 bootargs-append = " ubi.mtd=user_property root=/dev/ubiblock1_0";
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 led-0 {
34 gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
35 color = <LED_COLOR_ID_WHITE>;
36 };
37
38 led-1 {
39 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
40 color = <LED_COLOR_ID_RED>;
41 };
42
43 led_power_red: led-2 {
44 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
45 color = <LED_COLOR_ID_RED>;
46 function = LED_FUNCTION_POWER;
47 };
48
49 led_power_white: led-3 {
50 gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
51 color = <LED_COLOR_ID_WHITE>;
52 function = LED_FUNCTION_POWER;
53 };
54
55 led-4 {
56 gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
57 color = <LED_COLOR_ID_WHITE>;
58 };
59
60 led-5 {
61 gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>;
62 color = <LED_COLOR_ID_RED>;
63 };
64
65 led-6 {
66 gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
67 color = <LED_COLOR_ID_RED>;
68 function = LED_FUNCTION_WLAN;
69 };
70
71 led-7 {
72 gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
73 color = <LED_COLOR_ID_WHITE>;
74 function = LED_FUNCTION_WLAN;
75 };
76 };
77
78 keys {
79 compatible = "gpio-keys";
80
81 /*
82 * mode: 3x position switch
83 *
84 * - ROUTER
85 * - AP
86 * - WB (Wireless Bridge)
87 */
88 ap {
89 label = "mode-ap";
90 gpios = <&tlmm 29 GPIO_ACTIVE_LOW>;
91 linux,code = <BTN_0>;
92 };
93
94 bridge {
95 label = "mode-wb";
96 gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
97 linux,code = <BTN_1>;
98 };
99
100 /*
101 * op: 2x position switch
102 *
103 * - AUTO
104 * - MANUAL (select Router/AP/WB manually)
105 */
106 manual {
107 label = "op-manual";
108 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
109 linux,code = <BTN_2>;
110 };
111
112 wps {
113 label = "wps";
114 gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
115 linux,code = <KEY_WPS_BUTTON>;
116 };
117
118 reset {
119 label = "reset";
120 gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
121 linux,code = <KEY_RESTART>;
122 };
123 };
124
125 reg_usb_vbus: regulator-5v-vbus {
126 compatible = "regulator-fixed";
127 regulator-name = "vbus";
128 regulator-min-microvolt = <5000000>;
129 regulator-max-microvolt = <5000000>;
130 gpio = <&tlmm 64 GPIO_ACTIVE_HIGH>;
131 enable-active-high;
132 regulator-always-on;
133 };
134 };
135
136 &tlmm {
137 mdio_pins: mdio-pins {
138 mdc {
139 pins = "gpio68";
140 function = "mdc";
141 drive-strength = <8>;
142 bias-pull-up;
143 };
144
145 mdio {
146 pins = "gpio69";
147 function = "mdio";
148 drive-strength = <8>;
149 bias-pull-up;
150 };
151 };
152 };
153
154 &blsp1_uart5 {
155 status = "okay";
156 };
157
158 &prng {
159 status = "okay";
160 };
161
162 &cryptobam {
163 status = "okay";
164 };
165
166 &crypto {
167 status = "okay";
168 };
169
170 &qpic_bam {
171 status = "okay";
172 };
173
174 &qpic_nand {
175 status = "okay";
176
177 nand@0 {
178 reg = <0>;
179 nand-ecc-strength = <4>;
180 nand-ecc-step-size = <512>;
181 nand-bus-width = <8>;
182
183 partitions {
184 compatible = "qcom,smem-part";
185
186 partition-0-appsblenv {
187 compatible = "fixed-partitions";
188 label = "0:appsblenv";
189 read-only;
190 #address-cells = <1>;
191 #size-cells = <1>;
192
193 partition@0 {
194 compatible = "u-boot,env";
195 label = "env-data";
196 reg = <0x0 0x40000>;
197
198 macaddr_appsblenv_ethaddr: ethaddr {
199 };
200 };
201 };
202 };
203 };
204 };
205
206 &mdio {
207 status = "okay";
208 pinctrl-0 = <&mdio_pins>;
209 pinctrl-names = "default";
210 /*
211 * RESET pins of phy chips
212 *
213 * WXR-5950AX12 has 2x RESET pins for QCA8075 and AQR113C.
214 * The pin of QCA8075 is for the chip and not phys in the chip, the
215 * pin of AQR113C is for 2x chips. So both pins are not appropriate
216 * to declare them as reset-gpios in phy nodes.
217 * Multiple entries in reset-gpios of mdio may not be supported, but
218 * leave the following as-is to show that the those reset pin exists.
219 */
220 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>, /* QCA8075 RESET */
221 <&tlmm 63 GPIO_ACTIVE_LOW>; /* AQR113C RESET (2x) */
222
223 aqr113c_1: ethernet-phy@0 {
224 compatible = "ethernet-phy-ieee802.3-c45";
225 reg = <0x0>;
226 };
227
228 aqr113c_2: ethernet-phy@8 {
229 compatible = "ethernet-phy-ieee802.3-c45";
230 reg = <0x8>;
231 };
232
233 ethernet-phy-package@17 {
234 #address-cells = <1>;
235 #size-cells = <0>;
236 compatible = "qcom,qca8075-package";
237 reg = <0x18>;
238
239 qcom,package-mode = "qsgmii";
240
241 qca8075_1: ethernet-phy@19 {
242 compatible = "ethernet-phy-ieee802.3-c22";
243 reg = <0x19>;
244 };
245
246 qca8075_2: ethernet-phy@1a {
247 compatible = "ethernet-phy-ieee802.3-c22";
248 reg = <0x1a>;
249 };
250
251 qca8075_3: ethernet-phy@1b {
252 compatible = "ethernet-phy-ieee802.3-c22";
253 reg = <0x1b>;
254 };
255 };
256 };
257
258 &switch {
259 status = "okay";
260
261 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
262 switch_wan_bmp = <ESS_PORT5>;
263 switch_mac_mode = <MAC_MODE_QSGMII>;
264 switch_mac_mode1 = <MAC_MODE_USXGMII>;
265 switch_mac_mode2 = <MAC_MODE_USXGMII>;
266
267 qcom,port_phyinfo {
268 port@2 {
269 port_id = <2>;
270 phy_address = <0x19>;
271 };
272
273 port@3 {
274 port_id = <3>;
275 phy_address = <0x1a>;
276 };
277
278 port@4 {
279 port_id = <4>;
280 phy_address = <0x1b>;
281 };
282
283 port@5 {
284 port_id = <5>;
285 ethernet-phy-ieee802.3-c45;
286 phy_address = <0x0>;
287 };
288
289 port@6 {
290 port_id = <6>;
291 ethernet-phy-ieee802.3-c45;
292 phy_address = <0x8>;
293 };
294 };
295 };
296
297 &edma {
298 status = "okay";
299 };
300
301 &dp2 {
302 status = "okay";
303 phy-mode = "qsgmii";
304 phy-handle = <&qca8075_1>;
305 label = "lan4";
306 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
307 nvmem-cell-names = "mac-address";
308 };
309
310 &dp3 {
311 status = "okay";
312 phy-mode = "qsgmii";
313 phy-handle = <&qca8075_2>;
314 label = "lan3";
315 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
316 nvmem-cell-names = "mac-address";
317 };
318
319 &dp4 {
320 status = "okay";
321 phy-mode = "qsgmii";
322 phy-handle = <&qca8075_3>;
323 label = "lan2";
324 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
325 nvmem-cell-names = "mac-address";
326 };
327
328 &dp5_syn {
329 status = "okay";
330 phy-handle = <&aqr113c_1>;
331 label = "wan";
332 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
333 nvmem-cell-names = "mac-address";
334 };
335
336 &dp6_syn {
337 status = "okay";
338 phy-handle = <&aqr113c_2>;
339 label = "lan1";
340 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
341 nvmem-cell-names = "mac-address";
342 };
343
344 &ssphy_0 {
345 status = "okay";
346 };
347
348 &qusb_phy_0 {
349 status = "okay";
350 };
351
352 &usb_0 {
353 status = "okay";
354
355 vbus-supply = <&reg_usb_vbus>;
356 };
357
358 &wifi {
359 status = "okay";
360
361 qcom,ath11k-calibration-variant = "Buffalo-WXR-5950AX12";
362 };