ipq40xx: Use constant to set gpio active low/high
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.14 / arch / arm / boot / dts / qcom-ipq4018-rt-ac58u.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 *
3 * Permission to use, copy, modify, and/or distribute this software for any
4 * purpose with or without fee is hereby granted, provided that the above
5 * copyright notice and this permission notice appear in all copies.
6 *
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 *
15 */
16
17 #include "qcom-ipq4019.dtsi"
18 #include "qcom-ipq4019-bus.dtsi"
19 #include <dt-bindings/gpio/gpio.h>
20 #include <dt-bindings/input/input.h>
21 #include <dt-bindings/soc/qcom,tcsr.h>
22
23 / {
24 model = "ASUS RT-AC58U";
25 compatible = "asus,rt-ac58u", "qcom,ipq4019";
26
27 memory {
28 device_type = "memory";
29 reg = <0x80000000 0x8000000>;
30 };
31
32 aliases {
33 led-boot = &power;
34 led-failsafe = &power;
35 led-running = &power;
36 led-upgrade = &power;
37 };
38
39 reserved-memory {
40 #address-cells = <0x1>;
41 #size-cells = <0x1>;
42 ranges;
43
44 smem@87e00000 {
45 reg = <0x87e00000 0x080000>;
46 no-map;
47 };
48
49 tz@87e80000 {
50 reg = <0x87e80000 0x180000>;
51 no-map;
52 };
53 };
54
55 soc {
56 mdio@90000 {
57 status = "okay";
58 };
59
60 ess-psgmii@98000 {
61 status = "okay";
62 };
63
64 tcsr@1949000 {
65 compatible = "qcom,tcsr";
66 reg = <0x1949000 0x100>;
67 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
68 };
69
70 tcsr@194b000 {
71 compatible = "qcom,tcsr";
72 reg = <0x194b000 0x100>;
73 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
74 };
75
76 ess_tcsr@1953000 {
77 compatible = "qcom,tcsr";
78 reg = <0x1953000 0x1000>;
79 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
80 };
81
82 tcsr@1957000 {
83 compatible = "qcom,tcsr";
84 reg = <0x1957000 0x100>;
85 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
86 };
87
88 usb2@60f8800 {
89 status = "okay";
90 };
91
92 serial@78af000 {
93 pinctrl-0 = <&serial_pins>;
94 pinctrl-names = "default";
95 status = "okay";
96 };
97
98 usb3@8af8800 {
99 status = "okay";
100 };
101
102 crypto@8e3a000 {
103 status = "okay";
104 };
105
106 wifi@a000000 {
107 status = "okay";
108 qcom,ath10k-calibration-variant = "ASUS-RT-AC58U";
109 };
110
111 wifi@a800000 {
112 status = "okay";
113 qcom,ath10k-calibration-variant = "ASUS-RT-AC58U";
114 };
115
116 watchdog@b017000 {
117 status = "okay";
118 };
119
120 ess-switch@c000000 {
121 status = "okay";
122 };
123
124 edma@c080000 {
125 status = "okay";
126 };
127 };
128
129 gpio-keys {
130 compatible = "gpio-keys";
131
132 reset {
133 label = "reset";
134 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
135 linux,code = <KEY_RESTART>;
136 };
137
138 wps {
139 label = "wps";
140 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
141 linux,code = <KEY_WPS_BUTTON>;
142 };
143 };
144
145 gpio-leds {
146 compatible = "gpio-leds";
147
148 power: status {
149 label = "rt-ac58u:blue:status";
150 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
151 };
152
153 wan {
154 label = "rt-ac58u:blue:wan";
155 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
156 };
157
158 wlan2G {
159 label = "rt-ac58u:blue:wlan2G";
160 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
161 };
162
163 wan5G {
164 label = "rt-ac58u:blue:wlan5G";
165 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
166 };
167
168 usb {
169 label = "rt-ac58u:blue:usb";
170 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
171 };
172
173 lan {
174 label = "rt-ac58u:blue:lan";
175 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
176 };
177 };
178 };
179
180 &cryptobam {
181 status = "okay";
182 };
183
184 &blsp_dma {
185 status = "okay";
186 };
187
188 &tlmm {
189 serial_pins: serial_pinmux {
190 mux {
191 pins = "gpio60", "gpio61";
192 function = "blsp_uart0";
193 bias-disable;
194 };
195 };
196
197 spi_0_pins: spi_0_pinmux {
198 mux {
199 function = "blsp_spi0";
200 pins = "gpio55", "gpio56", "gpio57";
201 drive-strength = <12>;
202 bias-disable;
203 };
204
205 mux_cs {
206 function = "gpio";
207 pins = "gpio54", "gpio59";
208 drive-strength = <2>;
209 bias-disable;
210 output-high;
211 };
212 };
213 };
214
215 &spi_0 { /* BLSP1 QUP1 */
216 pinctrl-0 = <&spi_0_pins>;
217 pinctrl-names = "default";
218 status = "okay";
219 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
220 <&tlmm 59 GPIO_ACTIVE_HIGH>;
221
222 m25p80@0 {
223 #address-cells = <1>;
224 #size-cells = <0>;
225 /*
226 * U-boot looks for "n25q128a11" node,
227 * if we don't have it, it will spit out the following warning:
228 * "ipq: fdt fixup unable to find compatible node".
229 */
230 compatible = "jedec,spi-nor";
231 reg = <0>;
232 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
233 spi-max-frequency = <24000000>;
234
235 partitions {
236 compatible = "fixed-partitions";
237 #address-cells = <1>;
238 #size-cells = <1>;
239
240 partition0@0 {
241 label = "SBL1";
242 reg = <0x00000000 0x00040000>;
243 read-only;
244 };
245 partition1@40000 {
246 label = "MIBIB";
247 reg = <0x00040000 0x00020000>;
248 read-only;
249 };
250 partition2@60000 {
251 label = "QSEE";
252 reg = <0x00060000 0x00060000>;
253 read-only;
254 };
255 partition3@c0000 {
256 label = "CDT";
257 reg = <0x000c0000 0x00010000>;
258 read-only;
259 };
260 partition4@d0000 {
261 label = "DDRPARAMS";
262 reg = <0x000d0000 0x00010000>;
263 read-only;
264 };
265 partition5@e0000 {
266 label = "APPSBLENV"; /* uboot env*/
267 reg = <0x000e0000 0x00010000>;
268 read-only;
269 };
270 partition5@f0000 {
271 label = "APPSBL"; /* uboot */
272 reg = <0x000f0000 0x00080000>;
273 read-only;
274 };
275 partition5@170000 {
276 label = "ART";
277 reg = <0x00170000 0x00010000>;
278 read-only;
279 };
280 /* 0x00180000 - 0x00200000 unused */
281 };
282 };
283
284 mt29f@1 {
285 #address-cells = <1>;
286 #size-cells = <0>;
287 compatible = "spinand,mt29f";
288 reg = <1>;
289 spi-max-frequency = <24000000>;
290
291 partitions {
292 compatible = "fixed-partitions";
293 #address-cells = <1>;
294 #size-cells = <1>;
295
296 partition0@0 {
297 label = "ubi";
298 reg = <0x00000000 0x08000000>;
299 };
300 };
301 };
302 };
303
304 &usb3_ss_phy {
305 status = "okay";
306 };
307
308 &usb3_hs_phy {
309 status = "okay";
310 };
311
312 &usb2_hs_phy {
313 status = "okay";
314 };