f046bdcb5e92bdf1ac899471b87b63dbd9839707
[openwrt/staging/rmilecki.git] / target / linux / ipq40xx / files-4.14 / 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 = &led_power;
19 led-failsafe = &led_power;
20 led-running = &led_power;
21 led-upgrade = &led_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 usb3@8af8800 {
62 status = "okay";
63
64 dwc3@8a00000 {
65 #address-cells = <1>;
66 #size-cells = <0>;
67
68 usb3_port1: port@1 {
69 reg = <1>;
70 #trigger-source-cells = <0>;
71 };
72 };
73 };
74
75 crypto@8e3a000 {
76 status = "okay";
77 };
78
79 wifi@a000000 {
80 status = "okay";
81 qcom,ath10k-calibration-variant = "RT-AC58U";
82 };
83
84 wifi@a800000 {
85 status = "okay";
86 qcom,ath10k-calibration-variant = "RT-AC58U";
87 };
88
89 watchdog@b017000 {
90 status = "okay";
91 };
92
93 ess-switch@c000000 {
94 status = "okay";
95 };
96
97 edma@c080000 {
98 status = "okay";
99 };
100 };
101
102 keys {
103 compatible = "gpio-keys";
104
105 reset {
106 label = "reset";
107 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
108 linux,code = <KEY_RESTART>;
109 };
110
111 wps {
112 label = "wps";
113 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
114 linux,code = <KEY_WPS_BUTTON>;
115 };
116 };
117
118 leds {
119 compatible = "gpio-leds";
120
121 led_power: status {
122 label = "rt-ac58u:blue:status";
123 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
124 };
125
126 wan {
127 label = "rt-ac58u:blue:wan";
128 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
129 };
130
131 wlan2G {
132 label = "rt-ac58u:blue:wlan2G";
133 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
134 linux,default-trigger = "phy0tpt";
135 };
136
137 wlan5G {
138 label = "rt-ac58u:blue:wlan5G";
139 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
140 linux,default-trigger = "phy1tpt";
141 };
142
143 usb {
144 label = "rt-ac58u:blue:usb";
145 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
146 trigger-sources = <&usb3_port1>;
147 linux,default-trigger = "usbport";
148 };
149
150 lan {
151 label = "rt-ac58u:blue:lan";
152 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
153 };
154 };
155 };
156
157 &cryptobam {
158 status = "okay";
159 };
160
161 &blsp_dma {
162 status = "okay";
163 };
164
165 &tlmm {
166 serial_pins: serial_pinmux {
167 mux {
168 pins = "gpio60", "gpio61";
169 function = "blsp_uart0";
170 bias-disable;
171 };
172 };
173
174 spi_0_pins: spi_0_pinmux {
175 mux {
176 function = "blsp_spi0";
177 pins = "gpio55", "gpio56", "gpio57";
178 drive-strength = <12>;
179 bias-disable;
180 };
181
182 mux_cs {
183 function = "gpio";
184 pins = "gpio54", "gpio59";
185 drive-strength = <2>;
186 bias-disable;
187 output-high;
188 };
189 };
190 };
191
192 &blsp1_spi1 { /* BLSP1 QUP1 */
193 pinctrl-0 = <&spi_0_pins>;
194 pinctrl-names = "default";
195 status = "okay";
196 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
197 <&tlmm 59 GPIO_ACTIVE_HIGH>;
198
199 flash@0 {
200 #address-cells = <1>;
201 #size-cells = <0>;
202 /*
203 * U-boot looks for "n25q128a11" node,
204 * if we don't have it, it will spit out the following warning:
205 * "ipq: fdt fixup unable to find compatible node".
206 */
207 compatible = "jedec,spi-nor";
208 reg = <0>;
209 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
210 spi-max-frequency = <30000000>;
211
212 partitions {
213 compatible = "fixed-partitions";
214 #address-cells = <1>;
215 #size-cells = <1>;
216
217 partition0@0 {
218 label = "SBL1";
219 reg = <0x00000000 0x00040000>;
220 read-only;
221 };
222 partition1@40000 {
223 label = "MIBIB";
224 reg = <0x00040000 0x00020000>;
225 read-only;
226 };
227 partition2@60000 {
228 label = "QSEE";
229 reg = <0x00060000 0x00060000>;
230 read-only;
231 };
232 partition3@c0000 {
233 label = "CDT";
234 reg = <0x000c0000 0x00010000>;
235 read-only;
236 };
237 partition4@d0000 {
238 label = "DDRPARAMS";
239 reg = <0x000d0000 0x00010000>;
240 read-only;
241 };
242 partition5@e0000 {
243 label = "APPSBLENV"; /* uboot env*/
244 reg = <0x000e0000 0x00010000>;
245 read-only;
246 };
247 partition5@f0000 {
248 label = "APPSBL"; /* uboot */
249 reg = <0x000f0000 0x00080000>;
250 read-only;
251 };
252 partition5@170000 {
253 label = "ART";
254 reg = <0x00170000 0x00010000>;
255 read-only;
256 };
257 /* 0x00180000 - 0x00200000 unused */
258 };
259 };
260
261 flash@1 {
262 #address-cells = <1>;
263 #size-cells = <0>;
264 compatible = "spinand,mt29f";
265 reg = <1>;
266 spi-max-frequency = <30000000>;
267
268 /*
269 * U-boot looks for "spinand,mt29f" node,
270 * if we don't have it, it will spit out the following warning:
271 * "ipq: fdt fixup unable to find compatible node".
272 */
273
274 partitions {
275 compatible = "fixed-partitions";
276 #address-cells = <1>;
277 #size-cells = <1>;
278
279 partition@0 {
280 label = "ubi";
281 reg = <0x00000000 0x08000000>;
282 };
283 };
284 };
285 };
286
287 &blsp1_uart1 {
288 pinctrl-0 = <&serial_pins>;
289 pinctrl-names = "default";
290 status = "okay";
291 };
292
293 &usb3_ss_phy {
294 status = "okay";
295 };
296
297 &usb3_hs_phy {
298 status = "okay";
299 };