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