8c32b9eb36ee997cbe2699c188c646580824787e
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.19 / 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
8 / {
9 model = "ASUS RT-AC58U";
10 compatible = "asus,rt-ac58u", "qcom,ipq4019";
11
12 memory {
13 device_type = "memory";
14 reg = <0x80000000 0x8000000>;
15 };
16
17 aliases {
18 led-boot = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 chosen {
25 bootargs-append = " ubi.mtd=UBI_DEV";
26 };
27
28 soc {
29 mdio@90000 {
30 status = "okay";
31 };
32
33 ess-psgmii@98000 {
34 status = "okay";
35 };
36
37 tcsr@1949000 {
38 compatible = "qcom,tcsr";
39 reg = <0x1949000 0x100>;
40 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
41 };
42
43 tcsr@194b000 {
44 compatible = "qcom,tcsr";
45 reg = <0x194b000 0x100>;
46 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
47 };
48
49 ess_tcsr@1953000 {
50 compatible = "qcom,tcsr";
51 reg = <0x1953000 0x1000>;
52 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
53 };
54
55 tcsr@1957000 {
56 compatible = "qcom,tcsr";
57 reg = <0x1957000 0x100>;
58 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
59 };
60
61 usb2@60f8800 {
62 status = "okay";
63 };
64
65 usb3@8af8800 {
66 status = "okay";
67 };
68
69 crypto@8e3a000 {
70 status = "okay";
71 };
72
73 wifi@a000000 {
74 status = "okay";
75 qcom,ath10k-calibration-variant = "RT-AC58U";
76 };
77
78 wifi@a800000 {
79 status = "okay";
80 qcom,ath10k-calibration-variant = "RT-AC58U";
81 };
82
83 watchdog@b017000 {
84 status = "okay";
85 };
86
87 ess-switch@c000000 {
88 status = "okay";
89 };
90
91 edma@c080000 {
92 status = "okay";
93 };
94 };
95
96 gpio-keys {
97 compatible = "gpio-keys";
98
99 reset {
100 label = "reset";
101 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
102 linux,code = <KEY_RESTART>;
103 };
104
105 wps {
106 label = "wps";
107 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
108 linux,code = <KEY_WPS_BUTTON>;
109 };
110 };
111
112 gpio-leds {
113 compatible = "gpio-leds";
114
115 power: status {
116 label = "rt-ac58u:blue:status";
117 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
118 };
119
120 wan {
121 label = "rt-ac58u:blue:wan";
122 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
123 };
124
125 wlan2G {
126 label = "rt-ac58u:blue:wlan2G";
127 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
128 };
129
130 wan5G {
131 label = "rt-ac58u:blue:wlan5G";
132 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
133 };
134
135 usb {
136 label = "rt-ac58u:blue:usb";
137 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
138 };
139
140 lan {
141 label = "rt-ac58u:blue:lan";
142 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
143 };
144 };
145 };
146
147 &cryptobam {
148 status = "okay";
149 };
150
151 &blsp_dma {
152 status = "okay";
153 };
154
155 &tlmm {
156 serial_pins: serial_pinmux {
157 mux {
158 pins = "gpio60", "gpio61";
159 function = "blsp_uart0";
160 bias-disable;
161 };
162 };
163
164 spi_0_pins: spi_0_pinmux {
165 mux {
166 function = "blsp_spi0";
167 pins = "gpio55", "gpio56", "gpio57";
168 drive-strength = <12>;
169 bias-disable;
170 };
171
172 mux_cs {
173 function = "gpio";
174 pins = "gpio54", "gpio59";
175 drive-strength = <2>;
176 bias-disable;
177 output-high;
178 };
179 };
180 };
181
182 &blsp1_spi1 { /* BLSP1 QUP1 */
183 pinctrl-0 = <&spi_0_pins>;
184 pinctrl-names = "default";
185 status = "okay";
186 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
187 <&tlmm 59 GPIO_ACTIVE_HIGH>;
188
189 flash@0 {
190 /*
191 * U-boot looks for "n25q128a11" node,
192 * if we don't have it, it will spit out the following warning:
193 * "ipq: fdt fixup unable to find compatible node".
194 */
195 compatible = "jedec,spi-nor";
196 reg = <0>;
197 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
198 spi-max-frequency = <24000000>;
199
200 partitions {
201 compatible = "fixed-partitions";
202 #address-cells = <1>;
203 #size-cells = <1>;
204
205 partition0@0 {
206 label = "SBL1";
207 reg = <0x00000000 0x00040000>;
208 read-only;
209 };
210 partition1@40000 {
211 label = "MIBIB";
212 reg = <0x00040000 0x00020000>;
213 read-only;
214 };
215 partition2@60000 {
216 label = "QSEE";
217 reg = <0x00060000 0x00060000>;
218 read-only;
219 };
220 partition3@c0000 {
221 label = "CDT";
222 reg = <0x000c0000 0x00010000>;
223 read-only;
224 };
225 partition4@d0000 {
226 label = "DDRPARAMS";
227 reg = <0x000d0000 0x00010000>;
228 read-only;
229 };
230 partition5@e0000 {
231 label = "APPSBLENV"; /* uboot env*/
232 reg = <0x000e0000 0x00010000>;
233 read-only;
234 };
235 partition5@f0000 {
236 label = "APPSBL"; /* uboot */
237 reg = <0x000f0000 0x00080000>;
238 read-only;
239 };
240 partition5@170000 {
241 label = "ART";
242 reg = <0x00170000 0x00010000>;
243 read-only;
244 };
245 /* 0x00180000 - 0x00200000 unused */
246 };
247 };
248
249 spi-nand@1 {
250 compatible = "spi-nand";
251 reg = <1>;
252 spi-max-frequency = <24000000>;
253
254 /*
255 * U-boot looks for "spinand,mt29f" node,
256 * if we don't have it, it will spit out the following warning:
257 * "ipq: fdt fixup unable to find compatible node".
258 */
259
260 partitions {
261 compatible = "fixed-partitions";
262 #address-cells = <1>;
263 #size-cells = <1>;
264
265 partition@0 {
266 label = "ubi";
267 reg = <0x00000000 0x08000000>;
268 };
269 };
270 };
271 };
272
273 &blsp1_uart1 {
274 pinctrl-0 = <&serial_pins>;
275 pinctrl-names = "default";
276 status = "okay";
277 };
278
279 &usb3_ss_phy {
280 status = "okay";
281 };
282
283 &usb3_hs_phy {
284 status = "okay";
285 };
286
287 &usb2_hs_phy {
288 status = "okay";
289 };