ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-rt-ac42u.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/leds/common.h>
7 #include <dt-bindings/soc/qcom,tcsr.h>
8
9 / {
10 model = "ASUS RT-AC42U";
11 compatible = "asus,rt-ac42u";
12
13 memory {
14 device_type = "memory";
15 reg = <0x80000000 0x10000000>; /* 256MB */
16 };
17
18 aliases {
19 led-boot = &led_power;
20 led-failsafe = &led_power;
21 led-running = &led_power;
22 led-upgrade = &led_power;
23 };
24
25 soc {
26 rng@22000 {
27 status = "okay";
28 };
29
30 mdio@90000 {
31 status = "okay";
32 };
33
34 tcsr@1949000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1949000 0x100>;
37 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
38 };
39
40 tcsr@194b000 {
41 compatible = "qcom,tcsr";
42 reg = <0x194b000 0x100>;
43 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
44 };
45
46 ess_tcsr@1953000 {
47 compatible = "qcom,tcsr";
48 reg = <0x1953000 0x1000>;
49 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
50 };
51
52 tcsr@1957000 {
53 compatible = "qcom,tcsr";
54 reg = <0x1957000 0x100>;
55 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
56 };
57
58 usb3@8af8800 {
59 status = "okay";
60
61 dwc3@8a00000 {
62 #address-cells = <1>;
63 #size-cells = <0>;
64
65 usb3_port1: port@1 {
66 reg = <1>;
67 #trigger-source-cells = <0>;
68 };
69
70 usb3_port2: port@2 {
71 reg = <2>;
72 #trigger-source-cells = <0>;
73 };
74 };
75 };
76
77 crypto@8e3a000 {
78 status = "okay";
79 };
80
81 watchdog@b017000 {
82 status = "okay";
83 };
84 };
85
86 keys {
87 compatible = "gpio-keys";
88
89 reset {
90 label = "reset";
91 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_RESTART>;
93 };
94
95 wps {
96 label = "wps";
97 gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_WPS_BUTTON>;
99 };
100 };
101
102 leds {
103 compatible = "gpio-leds";
104
105 led_power: led-0 {
106 color = <LED_COLOR_ID_BLUE>;
107 function = LED_FUNCTION_STATUS;
108 gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
109 function = LED_FUNCTION_STATUS;
110 color = <LED_COLOR_ID_BLUE>;
111 };
112
113 led-1 {
114 color = <LED_COLOR_ID_BLUE>;
115 function = LED_FUNCTION_WAN;
116 gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>;
117 linux,default-trigger = "90000.mdio-1:04:link";
118 };
119
120 led-2 {
121 color = <LED_COLOR_ID_RED>;
122 function = LED_FUNCTION_WAN;
123 gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
124 linux,default-trigger = "none";
125 };
126
127 led-3 {
128 color = <LED_COLOR_ID_BLUE>;
129 function = LED_FUNCTION_WLAN;
130 function-enumerator = <0>;
131 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
132 linux,default-trigger = "phy1tpt";
133 };
134
135 led-4 {
136 color = <LED_COLOR_ID_BLUE>;
137 function = LED_FUNCTION_WLAN;
138 function-enumerator = <1>;
139 gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
140 linux,default-trigger = "phy0tpt";
141 };
142
143 led-5 {
144 color = <LED_COLOR_ID_BLUE>;
145 function = LED_FUNCTION_LAN;
146 function-enumerator = <1>;
147 gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
148 };
149
150 led-6 {
151 color = <LED_COLOR_ID_BLUE>;
152 function = LED_FUNCTION_LAN;
153 function-enumerator = <2>;
154 gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
155 };
156
157 led-7 {
158 color = <LED_COLOR_ID_BLUE>;
159 function = LED_FUNCTION_LAN;
160 function-enumerator = <3>;
161 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
162 };
163
164 led-8 {
165 color = <LED_COLOR_ID_BLUE>;
166 function = LED_FUNCTION_LAN;
167 function-enumerator = <4>;
168 gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
169 };
170 };
171 };
172
173 &cryptobam {
174 status = "okay";
175 };
176
177 &blsp_dma {
178 status = "okay";
179 };
180
181 &qpic_bam {
182 status = "okay";
183 };
184
185 &tlmm {
186 serial_0_pins: serial0_pinmux {
187 mux {
188 pins = "gpio16", "gpio17";
189 function = "blsp_uart0";
190 bias-disable;
191 };
192 };
193
194 nand_pins: nand_pins {
195 pullups {
196 pins = "gpio53", "gpio58", "gpio59";
197 function = "qpic";
198 bias-pull-up;
199 };
200
201 pulldowns {
202 pins = "gpio55", "gpio56", "gpio57", "gpio60",
203 "gpio62", "gpio63", "gpio64", "gpio65",
204 "gpio66", "gpio67", "gpio69";
205 function = "qpic";
206 bias-pull-down;
207 };
208 };
209 };
210
211 &blsp1_uart1 {
212 pinctrl-0 = <&serial_0_pins>;
213 pinctrl-names = "default";
214 status = "okay";
215 };
216
217 &nand {
218 pinctrl-0 = <&nand_pins>;
219 pinctrl-names = "default";
220 status = "okay";
221
222 nand@0 {
223 partitions {
224 compatible = "fixed-partitions";
225 #address-cells = <1>;
226 #size-cells = <1>;
227
228 partition@0 {
229 label = "SBL1";
230 reg = <0x00000000 0x00080000>;
231 read-only;
232 };
233 partition@80000 {
234 label = "MIBIB";
235 reg = <0x00080000 0x00080000>;
236 read-only;
237 };
238 partition@100000 {
239 label = "QSEE";
240 reg = <0x00100000 0x00100000>;
241 read-only;
242 };
243 partition@200000 {
244 label = "CDT";
245 reg = <0x00200000 0x00080000>;
246 read-only;
247 };
248 partition@280000 {
249 label = "APPSBL";
250 reg = <0x00280000 0x00140000>;
251 read-only;
252 };
253 partition@3C0000 {
254 label = "APPSBLENV";
255 reg = <0x003C0000 0x00040000>;
256 read-only;
257 };
258 partition@400000 {
259 label = "ubi";
260 reg = <0x00400000 0x07C00000>;
261 };
262 };
263 };
264 };
265
266 &usb3_ss_phy {
267 status = "okay";
268 };
269
270 &usb3_hs_phy {
271 status = "okay";
272 };
273
274 &gmac {
275 status = "okay";
276 };
277
278 &switch {
279 status = "okay";
280 };
281
282 &swport1 {
283 status = "okay";
284 };
285
286 &swport2 {
287 status = "okay";
288 };
289
290 &swport3 {
291 status = "okay";
292 };
293
294 &swport4 {
295 status = "okay";
296 };
297
298 &swport5 {
299 status = "okay";
300 };
301
302 &wifi0 {
303 status = "okay";
304 qcom,ath10k-calibration-variant = "ASUS-RT-AC42U";
305 };
306
307 &pcie0 {
308 status = "okay";
309 perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
310 wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
311 clkreq-gpio = <&tlmm 39 GPIO_ACTIVE_LOW>;
312
313 bridge@0,0 {
314 reg = <0x00000000 0 0 0 0>;
315 #address-cells = <3>;
316 #size-cells = <2>;
317 ranges;
318
319 wifi2: wifi@1,0 {
320 compatible = "qcom,ath10k";
321 reg = <0x00010000 0 0 0 0>;
322
323 qcom,ath10k-calibration-variant = "ASUS-RT-AC42U";
324 };
325 };
326 };