ath79: enable UART in SoC DTSI files
[openwrt/staging/thess.git] / target / linux / ath79 / dts / qca9531_tplink_tl-mr6400-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-mr6400-v1", "qca,qca9531";
10 model = "TP-Link TL-MR6400 v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 /* D12 */
24 wan {
25 label = "white:wan";
26 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 };
28
29 /* D11 */
30 4g {
31 label = "white:4g";
32 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
33 };
34
35 /* D5 */
36 wps {
37 label = "white:wps";
38 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
39 };
40
41 /* D3 */
42 wlan {
43 label = "white:wlan";
44 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
45 linux,default-trigger = "phy0tpt";
46 };
47
48 /* D2 */
49 led_power: power {
50 label = "white:power";
51 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
52 };
53
54 /* D4 */
55 lan {
56 label = "white:lan";
57 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 /* SW2 */
65 reset {
66 label = "Reset button";
67 linux,code = <KEY_RESTART>;
68 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
69 debounce-interval = <60>;
70 };
71
72 /* SW3 */
73 rfkill {
74 label = "RF kill button";
75 linux,code = <KEY_RFKILL>;
76 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
77 debounce-interval = <60>;
78 };
79 };
80
81 gpio-export {
82 compatible = "gpio-export";
83
84 gpio_usb_power {
85 gpio-export,name = "tp-link:power:lte";
86 gpio-export,output = <0>;
87 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
88 };
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <25000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 uboot: partition@0 {
106 label = "u-boot";
107 reg = <0x000000 0x020000>;
108 read-only;
109 };
110
111 partition@20000 {
112 compatible = "tplink,firmware";
113 label = "firmware";
114 reg = <0x020000 0x7d0000>;
115 };
116
117 art: partition@7f0000 {
118 label = "art";
119 reg = <0x7f0000 0x010000>;
120 read-only;
121 };
122 };
123 };
124 };
125
126 &eth0 {
127 status = "okay";
128
129 phy-handle = <&swphy0>;
130
131 mtd-mac-address = <&uboot 0x1fc00>;
132 mtd-mac-address-increment = <1>;
133 };
134
135 &eth1 {
136 mtd-mac-address = <&uboot 0x1fc00>;
137 mtd-mac-address-increment = <(-1)>;
138 };
139
140 &wmac {
141 status = "okay";
142
143 mtd-cal-data = <&art 0x1000>;
144 mtd-mac-address = <&uboot 0x1fc00>;
145 };
146
147 &usb0 {
148 #address-cells = <1>;
149 #size-cells = <0>;
150 status = "okay";
151
152 hub_port: port@1 {
153 reg = <1>;
154 #trigger-source-cells = <0>;
155 };
156 };
157
158 &usb_phy {
159 status = "okay";
160 };