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