66a14232d725badfc1a8ba9f0ca5180ea2dc527f
[openwrt/staging/robimarko.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 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
58 color = <LED_COLOR_ID_BLUE>;
59 };
60
61 led_system_red: system-red {
62 gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
63 color = <LED_COLOR_ID_RED>;
64 };
65 };
66 };
67
68 &tlmm {
69 mdio_pins: mdio-pins {
70 mdc {
71 pins = "gpio68";
72 function = "mdc";
73 drive-strength = <8>;
74 bias-pull-up;
75 };
76
77 mdio {
78 pins = "gpio69";
79 function = "mdio";
80 drive-strength = <8>;
81 bias-pull-up;
82 };
83 };
84 };
85
86 &blsp1_uart5 {
87 status = "okay";
88 };
89
90 &prng {
91 status = "okay";
92 };
93
94 &cryptobam {
95 status = "okay";
96 };
97
98 &crypto {
99 status = "okay";
100 };
101
102 &qpic_bam {
103 status = "okay";
104 };
105
106 &qpic_nand {
107 status = "okay";
108
109 nand@0 {
110 reg = <0>;
111 nand-ecc-strength = <8>;
112 nand-ecc-step-size = <512>;
113 nand-bus-width = <8>;
114
115 partitions {
116 compatible = "qcom,smem-part";
117 };
118 };
119 };
120
121 &qusb_phy_0 {
122 status = "okay";
123 };
124
125 &ssphy_0 {
126 status = "okay";
127 };
128
129 &usb_0 {
130 status = "okay";
131 };
132
133 &mdio {
134 status = "okay";
135
136 pinctrl-0 = <&mdio_pins>;
137 pinctrl-names = "default";
138 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
139
140 qca8075_0: ethernet-phy@0 {
141 compatible = "ethernet-phy-ieee802.3-c22";
142 reg = <0>;
143 };
144
145 qca8075_1: ethernet-phy@1 {
146 compatible = "ethernet-phy-ieee802.3-c22";
147 reg = <1>;
148 };
149
150 qca8075_2: ethernet-phy@2 {
151 compatible = "ethernet-phy-ieee802.3-c22";
152 reg = <2>;
153 };
154
155 qca8075_3: ethernet-phy@3 {
156 compatible = "ethernet-phy-ieee802.3-c22";
157 reg = <3>;
158 };
159
160 qca8081: ethernet-phy@28 {
161 compatible = "ethernet-phy-id004d.d101";
162 reg = <28>;
163 reset-deassert-us = <10000>;
164 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
165
166 leds {
167 #address-cells = <1>;
168 #size-cells = <0>;
169
170 led@0 {
171 reg = <0>;
172 color = <LED_COLOR_ID_GREEN>;
173 function = LED_FUNCTION_WAN;
174 default-state = "keep";
175 };
176
177 led@1 {
178 reg = <1>;
179 color = <LED_COLOR_ID_YELLOW>;
180 function = LED_FUNCTION_WAN;
181 default-state = "keep";
182 };
183 };
184 };
185 };
186
187 &switch {
188 status = "okay";
189
190 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
191 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
192 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
193 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
194
195 qcom,port_phyinfo {
196 port@1 {
197 port_id = <1>;
198 phy_address = <0>;
199 };
200 port@2 {
201 port_id = <2>;
202 phy_address = <1>;
203 };
204 port@3 {
205 port_id = <3>;
206 phy_address = <2>;
207 };
208 port@4 {
209 port_id = <4>;
210 phy_address = <3>;
211 };
212 port@6 {
213 port_id = <6>;
214 phy_address = <28>;
215 port_mac_sel = "QGMAC_PORT";
216 };
217 };
218 };
219
220 &edma {
221 status = "okay";
222 };
223
224 &dp1 {
225 status = "okay";
226 phy-handle = <&qca8075_0>;
227 label = "lan4";
228 };
229
230 &dp2 {
231 status = "okay";
232 phy-handle = <&qca8075_1>;
233 label = "lan3";
234 };
235
236 &dp3 {
237 status = "okay";
238 phy-handle = <&qca8075_2>;
239 label = "lan2";
240 };
241
242 &dp4 {
243 status = "okay";
244 phy-handle = <&qca8075_3>;
245 label = "lan1";
246 };
247
248 &dp6_syn {
249 status = "okay";
250 phy-handle = <&qca8081>;
251 label = "wan";
252 };
253
254 &wifi {
255 status = "okay";
256 qcom,ath11k-calibration-variant = "Dynalink-DL-WRX36";
257 };