6ab63ebde0d55258db63d33c95180f04f749f3bf
[openwrt/openwrt.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 = "tp-link:white:wan";
26 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 };
28
29 /* D11 */
30 4g {
31 label = "tp-link:white:4g";
32 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
33 };
34
35 /* D5 */
36 wps {
37 label = "tp-link:white:wps";
38 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
39 };
40
41 /* D3 */
42 wlan {
43 label = "tp-link:white:wlan";
44 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
45 linux,default-trigger = "phy0tpt";
46 };
47
48 /* D2 */
49 led_power: power {
50 label = "tp-link:white:power";
51 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
52 };
53
54 /* D4 */
55 lan {
56 label = "tp-link: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 &uart {
93 status = "okay";
94 };
95
96 &spi {
97 status = "okay";
98
99 num-cs = <1>;
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <25000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 uboot: partition@0 {
112 label = "u-boot";
113 reg = <0x000000 0x020000>;
114 read-only;
115 };
116
117 partition@20000 {
118 compatible = "tplink,firmware";
119 label = "firmware";
120 reg = <0x020000 0x7d0000>;
121 };
122
123 art: partition@7f0000 {
124 label = "art";
125 reg = <0x7f0000 0x010000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &eth0 {
133 status = "okay";
134
135 phy-handle = <&swphy0>;
136
137 mtd-mac-address = <&uboot 0x1fc00>;
138 mtd-mac-address-increment = <1>;
139 };
140
141 &eth1 {
142 mtd-mac-address = <&uboot 0x1fc00>;
143 mtd-mac-address-increment = <(-1)>;
144 };
145
146 &wmac {
147 status = "okay";
148
149 mtd-cal-data = <&art 0x1000>;
150 mtd-mac-address = <&uboot 0x1fc00>;
151 };
152
153 &usb0 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 status = "okay";
157
158 hub_port: port@1 {
159 reg = <1>;
160 #trigger-source-cells = <0>;
161 };
162 };
163
164 &usb_phy {
165 status = "okay";
166 };