fb0cec59f7e1330d161d6878694db1fc25fb17c6
[openwrt/openwrt.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-wtr-m2133hp.dts
1 // SPDX-License-Identifier: ISC
2 /*
3 * Copyright (c) 2015 - 2016, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2020 Yanase Yuki <dev@zpc.sakura.ne.jp>
5 */
6
7 #include "qcom-ipq4019.dtsi"
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/soc/qcom,tcsr.h>
11
12 / {
13 model = "Buffalo WTR-M2133HP";
14 compatible = "buffalo,wtr-m2133hp", "qcom,ipq4019";
15
16 memory {
17 device_type = "memory";
18 reg = <0x80000000 0x20000000>;
19 };
20
21 chosen {
22 /*
23 * U-Boot adds "ubi.mtd=rootfs root=mtd:ubi_rootfs" to
24 * kernel command line. But we use different partition names,
25 * so we have to set correct parameters.
26 */
27 bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
28 };
29
30 aliases {
31 led-boot = &led_power_blue;
32 led-failsafe = &led_power_orange;
33 led-running = &led_power_white;
34 led-upgrade = &led_power_blue;
35 label-mac-device = &gmac0;
36 };
37
38 soc {
39 rng@22000 {
40 status = "okay";
41 };
42
43 tcsr@1949000 {
44 compatible = "qcom,tcsr";
45 reg = <0x1949000 0x100>;
46 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
47 };
48
49 tcsr@194b000 {
50 compatible = "qcom,tcsr";
51 reg = <0x194b000 0x100>;
52 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
53 status = "okay";
54 };
55
56 ess_tcsr@1953000 {
57 compatible = "qcom,tcsr";
58 reg = <0x1953000 0x1000>;
59 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
60 };
61
62 tcsr@1957000 {
63 compatible = "qcom,tcsr";
64 reg = <0x1957000 0x100>;
65 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
66 };
67
68 crypto@8e3a000 {
69 status = "okay";
70 };
71
72 watchdog@b017000 {
73 status = "okay";
74 };
75
76 ess-switch@c000000 {
77 status = "okay";
78 switch_lan_bmp = <0x1c>;
79 };
80
81 ess-psgmii@98000 {
82 status = "okay";
83 };
84
85 edma@c080000 {
86 status = "okay";
87 };
88
89 usb3@8af8800 {
90 status = "okay";
91 };
92 };
93
94 leds {
95 compatible = "gpio-leds";
96
97 led_power_white: power_white {
98 label = "white:power";
99 gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
100 };
101
102 led_power_orange: power_orange {
103 label = "orange:power";
104 gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
105 };
106
107 led_power_blue: power_blue {
108 label = "blue:power";
109 gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
110 };
111
112 router_white {
113 label = "white:router";
114 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
115 };
116
117 router_orange {
118 label = "orange:router";
119 gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
120 };
121
122 internet_white {
123 label = "white:internet";
124 gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
125 };
126
127 internet_orange {
128 label = "orange:internet";
129 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
130 };
131
132 wireless_white {
133 label = "white:wireless";
134 gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
135 };
136
137 wireless_orange {
138 label = "orange:wireless";
139 gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>;
140 };
141 };
142
143 keys {
144 compatible = "gpio-keys";
145
146 auto_mode {
147 label = "auto_mode";
148 gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
149 linux,code = <BTN_0>;
150 linux,input-type = <EV_SW>;
151 };
152
153 router_mode {
154 label = "router_mode";
155 gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
156 linux,code = <BTN_1>;
157 linux,input-type = <EV_SW>;
158 };
159
160 ap_mode {
161 label = "ap_mode";
162 gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
163 linux,code = <BTN_2>;
164 linux,input-type = <EV_SW>;
165 };
166
167 reset {
168 label = "reset";
169 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
170 linux,code = <KEY_RESTART>;
171 };
172
173 wps {
174 label = "AOSS Button";
175 gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
176 linux,code = <KEY_WPS_BUTTON>;
177 };
178 };
179 };
180
181 &tlmm {
182 serial_0_pins: serial0_pinmux {
183 mux {
184 pins = "gpio16", "gpio17";
185 function = "blsp_uart0";
186 bias-disable;
187 };
188 };
189
190 mdio_pins: mdio_pinmux {
191 mux_1 {
192 pins = "gpio6";
193 function = "mdio";
194 bias-pull-up;
195 };
196
197 mux_2 {
198 pins = "gpio7";
199 function = "mdc";
200 bias-pull-up;
201 };
202 };
203
204 nand_pins: nand_pins {
205 pullups {
206 pins = "gpio52", "gpio53", "gpio58",
207 "gpio59";
208 function = "qpic";
209 bias-pull-up;
210 };
211
212 pulldowns {
213 pins = "gpio54", "gpio55", "gpio56",
214 "gpio57", "gpio60", "gpio61",
215 "gpio62", "gpio63", "gpio64",
216 "gpio65", "gpio66", "gpio67",
217 "gpio68", "gpio69";
218 function = "qpic";
219 bias-pull-down;
220 };
221 };
222
223 usb_power {
224 line-name = "USB power";
225 gpios = <34 GPIO_ACTIVE_HIGH>;
226 gpio-hog;
227 output-high;
228 };
229 };
230
231 &blsp_dma {
232 status = "okay";
233 };
234
235 &blsp1_uart1 {
236 pinctrl-0 = <&serial_0_pins>;
237 pinctrl-names = "default";
238 status = "okay";
239 };
240
241 &cryptobam {
242 status = "okay";
243 };
244
245 &pcie0 {
246 status = "okay";
247
248 bridge@0,0 {
249 reg = <0x00000000 0 0 0 0>;
250 #address-cells = <3>;
251 #size-cells = <2>;
252 ranges;
253
254 wifi@0,0 {
255 compatible = "qcom,ath10k";
256 reg = <0 0 0 0 0>;
257
258 qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
259 };
260 };
261 };
262
263 &qpic_bam {
264 status = "okay";
265 };
266
267 &nand {
268 pinctrl-0 = <&nand_pins>;
269 pinctrl-names = "default";
270 status = "okay";
271
272 nand@0 {
273 partitions {
274 compatible = "fixed-partitions";
275 #address-cells = <1>;
276 #size-cells = <1>;
277
278 partition@0 {
279 label = "SBL1";
280 reg = <0x0000000 0x0100000>;
281 read-only;
282 };
283
284 partition@100000 {
285 label = "MIBIB";
286 reg = <0x0100000 0x0100000>;
287 read-only;
288 };
289
290 partition@200000 {
291 label = "BOOTCONFIG";
292 reg = <0x0200000 0x0100000>;
293 read-only;
294 };
295
296 partition@300000 {
297 label = "QSEE";
298 reg = <0x0300000 0x0100000>;
299 read-only;
300 };
301
302 partition@400000 {
303 label = "QSEE_1";
304 reg = <0x0400000 0x0100000>;
305 read-only;
306 };
307
308 partition@500000 {
309 label = "CDT";
310 reg = <0x0500000 0x0080000>;
311 read-only;
312 };
313
314 partition@580000 {
315 label = "CDT_1";
316 reg = <0x0580000 0x0080000>;
317 read-only;
318 };
319
320 partition@600000 {
321 label = "BOOTCONFIG1";
322 reg = <0x0600000 0x0080000>;
323 read-only;
324 };
325
326 partition@680000 {
327 label = "APPSBLENV";
328 reg = <0x0680000 0x0080000>;
329 };
330
331 partition@700000 {
332 label = "APPSBL";
333 reg = <0x0700000 0x0200000>;
334 read-only;
335 };
336
337 partition@900000 {
338 label = "APPSBL_1";
339 reg = <0x0900000 0x0200000>;
340 read-only;
341 };
342
343 art: partition@b00000 {
344 label = "ART";
345 reg = <0x0b00000 0x0080000>;
346 read-only;
347 };
348
349 partition@b80000 {
350 label = "ART_1";
351 reg = <0x0b80000 0x0080000>;
352 read-only;
353 };
354
355 orgdata: partition@c00000 {
356 label = "ORGDATA";
357 reg = <0x0c00000 0x0080000>;
358 read-only;
359 };
360
361 partition@c80000 {
362 label = "ORGDATA_1";
363 reg = <0x0c80000 0x0080000>;
364 read-only;
365 };
366
367 partition@d00000 {
368 label = "ubi";
369 reg = <0x0d00000 0x2900000>;
370 };
371
372 partition@3600000 {
373 label = "rootfs_recover";
374 reg = <0x3600000 0x2900000>;
375 read-only;
376 };
377
378 partition@5f00000 {
379 label = "user_property";
380 reg = <0x5f00000 0x1a20000>;
381 read-only;
382 };
383 };
384 };
385 };
386
387 &wifi0 {
388 status = "okay";
389 qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
390 ieee80211-freq-limit = <2400000 2483000>;
391 };
392
393 &wifi1 {
394 status = "okay";
395 qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
396 };
397
398 &mdio {
399 status = "okay";
400 pinctrl-0 = <&mdio_pins>;
401 pinctrl-names = "default";
402 reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
403 };
404
405 &gmac0 {
406 nvmem-cells = <&macaddr_orgdata_20>;
407 nvmem-cell-names = "mac-address";
408 };
409
410 &gmac1 {
411 nvmem-cells = <&macaddr_orgdata_20>;
412 nvmem-cell-names = "mac-address";
413 };
414
415 &usb3_ss_phy {
416 status = "okay";
417 };
418
419 &usb3_hs_phy {
420 status = "okay";
421 };
422
423 &orgdata {
424 compatible = "nvmem-cells";
425 #address-cells = <1>;
426 #size-cells = <1>;
427
428 macaddr_orgdata_20: macaddr@20 {
429 reg = <0x20 0x6>;
430 };
431 };