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