qualcommax: use defines for MAC mode setting
[openwrt/staging/jow.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 };
168
169 &switch {
170 status = "okay";
171
172 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
173 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
174 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
175 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
176 bm_tick_mode = <0>; /* bm tick mode */
177 tm_tick_mode = <0>; /* tm tick mode */
178
179 qcom,port_phyinfo {
180 port@0 {
181 port_id = <1>;
182 phy_address = <0>;
183 };
184 port@1 {
185 port_id = <2>;
186 phy_address = <1>;
187 };
188 port@2 {
189 port_id = <3>;
190 phy_address = <2>;
191 };
192 port@3 {
193 port_id = <4>;
194 phy_address = <3>;
195 };
196 port@5 {
197 port_id = <6>;
198 phy_address = <28>;
199 port_mac_sel = "QGMAC_PORT";
200 };
201 };
202 };
203
204 &edma {
205 status = "okay";
206 };
207
208 &dp1 {
209 status = "okay";
210 phy-handle = <&qca8075_0>;
211 label = "lan4";
212 };
213
214 &dp2 {
215 status = "okay";
216 phy-handle = <&qca8075_1>;
217 label = "lan3";
218 };
219
220 &dp3 {
221 status = "okay";
222 phy-handle = <&qca8075_2>;
223 label = "lan2";
224 };
225
226 &dp4 {
227 status = "okay";
228 phy-handle = <&qca8075_3>;
229 label = "lan1";
230 };
231
232 &dp6_syn {
233 status = "okay";
234 phy-handle = <&qca8081>;
235 label = "wan";
236 };
237
238 &wifi {
239 status = "okay";
240 qcom,ath11k-calibration-variant = "Dynalink-DL-WRX36";
241 };