qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12
[openwrt/staging/robimarko.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 qca8075_1: ethernet-phy@19 {
234 compatible = "ethernet-phy-ieee802.3-c22";
235 reg = <0x19>;
236 };
237
238 qca8075_2: ethernet-phy@1a {
239 compatible = "ethernet-phy-ieee802.3-c22";
240 reg = <0x1a>;
241 };
242
243 qca8075_3: ethernet-phy@1b {
244 compatible = "ethernet-phy-ieee802.3-c22";
245 reg = <0x1b>;
246 };
247 };
248
249 &switch {
250 status = "okay";
251
252 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
253 switch_wan_bmp = <ESS_PORT5>;
254 malibu_first_phy_addr = <0x18>;
255 switch_mac_mode = <MAC_MODE_QSGMII>;
256 switch_mac_mode1 = <MAC_MODE_USXGMII>;
257 switch_mac_mode2 = <MAC_MODE_USXGMII>;
258
259 qcom,port_phyinfo {
260 port@2 {
261 port_id = <2>;
262 phy_address = <0x19>;
263 };
264
265 port@3 {
266 port_id = <3>;
267 phy_address = <0x1a>;
268 };
269
270 port@4 {
271 port_id = <4>;
272 phy_address = <0x1b>;
273 };
274
275 port@5 {
276 port_id = <5>;
277 ethernet-phy-ieee802.3-c45;
278 phy_address = <0x0>;
279 };
280
281 port@6 {
282 port_id = <6>;
283 ethernet-phy-ieee802.3-c45;
284 phy_address = <0x8>;
285 };
286 };
287 };
288
289 &edma {
290 status = "okay";
291 };
292
293 &dp2 {
294 status = "okay";
295 phy-handle = <&qca8075_1>;
296 label = "lan4";
297 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
298 nvmem-cell-names = "mac-address";
299 };
300
301 &dp3 {
302 status = "okay";
303 phy-handle = <&qca8075_2>;
304 label = "lan3";
305 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
306 nvmem-cell-names = "mac-address";
307 };
308
309 &dp4 {
310 status = "okay";
311 phy-handle = <&qca8075_3>;
312 label = "lan2";
313 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
314 nvmem-cell-names = "mac-address";
315 };
316
317 &dp5_syn {
318 status = "okay";
319 phy-handle = <&aqr113c_1>;
320 label = "wan";
321 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
322 nvmem-cell-names = "mac-address";
323 };
324
325 &dp6_syn {
326 status = "okay";
327 phy-handle = <&aqr113c_2>;
328 label = "lan1";
329 nvmem-cells = <&macaddr_appsblenv_ethaddr>;
330 nvmem-cell-names = "mac-address";
331 };
332
333 &ssphy_0 {
334 status = "okay";
335 };
336
337 &qusb_phy_0 {
338 status = "okay";
339 };
340
341 &usb_0 {
342 status = "okay";
343
344 vbus-supply = <&reg_usb_vbus>;
345 };
346
347 &wifi {
348 status = "okay";
349
350 qcom,ath11k-calibration-variant = "Buffalo-WXR-5950AX12";
351 };