ipq40xx: Use upstream SPI-NAND driver instead of MT29F
[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", "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                 #address-cells = <1>;
191                 #size-cells = <0>;
192                 /*
193                  * U-boot looks for "n25q128a11" node,
194                  * if we don't have it, it will spit out the following warning:
195                  * "ipq: fdt fixup unable to find compatible node".
196                  */
197                 compatible = "jedec,spi-nor";
198                 reg = <0>;
199                 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
200                 spi-max-frequency = <24000000>;
201
202                 partitions {
203                         compatible = "fixed-partitions";
204                         #address-cells = <1>;
205                         #size-cells = <1>;
206
207                         partition0@0 {
208                                 label = "SBL1";
209                                 reg = <0x00000000 0x00040000>;
210                                 read-only;
211                         };
212                         partition1@40000 {
213                                 label = "MIBIB";
214                                 reg = <0x00040000 0x00020000>;
215                                 read-only;
216                         };
217                         partition2@60000 {
218                                 label = "QSEE";
219                                 reg = <0x00060000 0x00060000>;
220                                 read-only;
221                         };
222                         partition3@c0000 {
223                                 label = "CDT";
224                                 reg = <0x000c0000 0x00010000>;
225                                 read-only;
226                         };
227                         partition4@d0000 {
228                                 label = "DDRPARAMS";
229                                 reg = <0x000d0000 0x00010000>;
230                                 read-only;
231                         };
232                         partition5@e0000 {
233                                 label = "APPSBLENV"; /* uboot env*/
234                                 reg = <0x000e0000 0x00010000>;
235                                 read-only;
236                         };
237                         partition5@f0000 {
238                                 label = "APPSBL"; /* uboot */
239                                 reg = <0x000f0000 0x00080000>;
240                                 read-only;
241                         };
242                         partition5@170000 {
243                                 label = "ART";
244                                 reg = <0x00170000 0x00010000>;
245                                 read-only;
246                         };
247                         /* 0x00180000 - 0x00200000 unused */
248                 };
249         };
250
251         spi-nand@1 {
252                 #address-cells = <1>;
253                 #size-cells = <0>;
254                 compatible = "spi-nand";
255                 reg = <1>;
256                 spi-max-frequency = <24000000>;
257
258                 /*
259                  * U-boot looks for "spinand,mt29f" node,
260                  * if we don't have it, it will spit out the following warning:
261                  * "ipq: fdt fixup unable to find compatible node".
262                  */
263
264                 partitions {
265                         compatible = "fixed-partitions";
266                         #address-cells = <1>;
267                         #size-cells = <1>;
268
269                         partition@0 {
270                                 label = "ubi";
271                                 reg = <0x00000000 0x08000000>;
272                         };
273                 };
274         };
275 };
276
277 &blsp1_uart1 {
278         pinctrl-0 = <&serial_pins>;
279         pinctrl-names = "default";
280         status = "okay";
281 };
282
283 &usb3_ss_phy {
284         status = "okay";
285 };
286
287 &usb3_hs_phy {
288         status = "okay";
289 };
290
291 &usb2_hs_phy {
292         status = "okay";
293 };