38158fbfa70e1c7ce172f55dd340c407b1605be0
[openwrt/staging/stintel.git] / target / linux / ipq40xx / files-6.1 / arch / arm / boot / dts / qcom-ipq4018-rt-ac58u.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/soc/qcom,tcsr.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "ASUS RT-AC58U";
11 compatible = "asus,rt-ac58u";
12
13 memory {
14 device_type = "memory";
15 reg = <0x80000000 0x8000000>;
16 };
17
18 aliases {
19 led-boot = &led_power;
20 led-failsafe = &led_power;
21 led-running = &led_power;
22 led-upgrade = &led_power;
23 };
24
25 soc {
26 rng@22000 {
27 status = "okay";
28 };
29
30 mdio@90000 {
31 status = "okay";
32 };
33
34 tcsr@1949000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1949000 0x100>;
37 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
38 };
39
40 tcsr@194b000 {
41 compatible = "qcom,tcsr";
42 reg = <0x194b000 0x100>;
43 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
44 };
45
46 ess_tcsr@1953000 {
47 compatible = "qcom,tcsr";
48 reg = <0x1953000 0x1000>;
49 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
50 };
51
52 tcsr@1957000 {
53 compatible = "qcom,tcsr";
54 reg = <0x1957000 0x100>;
55 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
56 };
57
58 usb3@8af8800 {
59 status = "okay";
60
61 dwc3@8a00000 {
62 #address-cells = <1>;
63 #size-cells = <0>;
64
65 usb3_port1: port@1 {
66 reg = <1>;
67 #trigger-source-cells = <0>;
68 };
69
70 usb3_port2: port@2 {
71 reg = <2>;
72 #trigger-source-cells = <0>;
73 };
74 };
75 };
76
77 crypto@8e3a000 {
78 status = "okay";
79 };
80
81 watchdog@b017000 {
82 status = "okay";
83 };
84 };
85
86 keys {
87 compatible = "gpio-keys";
88
89 reset {
90 label = "reset";
91 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_RESTART>;
93 };
94
95 wps {
96 label = "wps";
97 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_WPS_BUTTON>;
99 };
100 };
101
102 leds {
103 compatible = "gpio-leds";
104
105 led_power: led-0 {
106 color = <LED_COLOR_ID_BLUE>;
107 function = LED_FUNCTION_POWER;
108 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
109 panic-indicator;
110 };
111
112 led-1 {
113 color = <LED_COLOR_ID_BLUE>;
114 function = LED_FUNCTION_WAN;
115 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
116 /*
117 * linux,default-trigger = "90000.mdio-1:04:link";
118 * sadly still lacks rx+tx
119 */
120 };
121
122 led-2 {
123 color = <LED_COLOR_ID_BLUE>;
124 function = LED_FUNCTION_WLAN;
125 function-enumerator = <2>;
126 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
127 linux,default-trigger = "phy0tpt";
128 };
129
130 led-3 {
131 color = <LED_COLOR_ID_BLUE>;
132 function = LED_FUNCTION_WLAN;
133 function-enumerator = <5>;
134 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
135 linux,default-trigger = "phy1tpt";
136 };
137
138 led-4 {
139 color = <LED_COLOR_ID_BLUE>;
140 function = LED_FUNCTION_USB;
141 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
142 trigger-sources = <&usb3_port1>, <&usb3_port2>;
143 linux,default-trigger = "usbport";
144 };
145
146 led-5 {
147 color = <LED_COLOR_ID_BLUE>;
148 function = LED_FUNCTION_LAN;
149 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
150 };
151 };
152 };
153
154 &cryptobam {
155 status = "okay";
156 };
157
158 &blsp_dma {
159 status = "okay";
160 };
161
162 &tlmm {
163 serial_pins: serial_pinmux {
164 mux {
165 pins = "gpio60", "gpio61";
166 function = "blsp_uart0";
167 bias-disable;
168 };
169 };
170
171 spi_0_pins: spi_0_pinmux {
172 mux {
173 function = "blsp_spi0";
174 pins = "gpio55", "gpio56", "gpio57";
175 drive-strength = <12>;
176 bias-disable;
177 };
178
179 mux_cs {
180 function = "gpio";
181 pins = "gpio54", "gpio59";
182 drive-strength = <2>;
183 bias-disable;
184 output-high;
185 };
186 };
187 };
188
189 &blsp1_spi1 { /* BLSP1 QUP1 */
190 pinctrl-0 = <&spi_0_pins>;
191 pinctrl-names = "default";
192 status = "okay";
193 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
194 <&tlmm 59 GPIO_ACTIVE_HIGH>;
195
196 flash@0 {
197 /*
198 * U-boot looks for "n25q128a11" node,
199 * if we don't have it, it will spit out the following warning:
200 * "ipq: fdt fixup unable to find compatible node".
201 */
202 compatible = "jedec,spi-nor";
203 reg = <0>;
204 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
205 spi-max-frequency = <30000000>;
206
207 partitions {
208 compatible = "fixed-partitions";
209 #address-cells = <1>;
210 #size-cells = <1>;
211
212 partition@0 {
213 label = "SBL1";
214 reg = <0x00000000 0x00040000>;
215 read-only;
216 };
217 partition@40000 {
218 label = "MIBIB";
219 reg = <0x00040000 0x00020000>;
220 read-only;
221 };
222 partition@60000 {
223 label = "QSEE";
224 reg = <0x00060000 0x00060000>;
225 read-only;
226 };
227 partition@c0000 {
228 label = "CDT";
229 reg = <0x000c0000 0x00010000>;
230 read-only;
231 };
232 partition@d0000 {
233 label = "DDRPARAMS";
234 reg = <0x000d0000 0x00010000>;
235 read-only;
236 };
237 partition@e0000 {
238 label = "APPSBLENV"; /* uboot env*/
239 reg = <0x000e0000 0x00010000>;
240 read-only;
241 };
242 partition@f0000 {
243 label = "APPSBL"; /* uboot */
244 reg = <0x000f0000 0x00080000>;
245 read-only;
246 };
247 partition@170000 {
248 label = "ART";
249 reg = <0x00170000 0x00010000>;
250 read-only;
251 };
252 /* 0x00180000 - 0x00200000 unused */
253 };
254 };
255
256 spi-nand@1 {
257 compatible = "spi-nand";
258 reg = <1>;
259 spi-max-frequency = <30000000>;
260
261 /*
262 * U-boot looks for "spinand,mt29f" node,
263 * if we don't have it, it will spit out the following warning:
264 * "ipq: fdt fixup unable to find compatible node".
265 */
266
267 partitions {
268 compatible = "fixed-partitions";
269 #address-cells = <1>;
270 #size-cells = <1>;
271
272 partition@0 {
273 label = "ubi";
274 reg = <0x00000000 0x08000000>;
275 };
276 };
277 };
278 };
279
280 &blsp1_uart1 {
281 pinctrl-0 = <&serial_pins>;
282 pinctrl-names = "default";
283 status = "okay";
284 };
285
286 &usb3_ss_phy {
287 status = "okay";
288 };
289
290 &usb3_hs_phy {
291 status = "okay";
292 };
293
294 &gmac {
295 status = "okay";
296 };
297
298 &switch {
299 status = "okay";
300 };
301
302 &swport1 {
303 status = "okay";
304 };
305
306 &swport2 {
307 status = "okay";
308 };
309
310 &swport3 {
311 status = "okay";
312 };
313
314 &swport4 {
315 status = "okay";
316 };
317
318 &swport5 {
319 status = "okay";
320 };
321
322 &wifi0 {
323 status = "okay";
324 qcom,ath10k-calibration-variant = "RT-AC58U";
325 };
326
327 &wifi1 {
328 status = "okay";
329 qcom,ath10k-calibration-variant = "RT-AC58U";
330 };