b1acb0b22bbbc407575819cc06fc656a330a8ae9
[openwrt/staging/jow.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 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 macaddr_uboot_1fc00: macaddr@1fc00 {
116 reg = <0x1fc00 0x6>;
117 };
118 };
119 };
120
121 partition@20000 {
122 compatible = "tplink,firmware";
123 label = "firmware";
124 reg = <0x020000 0x7d0000>;
125 };
126
127 art: partition@7f0000 {
128 label = "art";
129 reg = <0x7f0000 0x010000>;
130 read-only;
131 };
132 };
133 };
134 };
135
136 &eth0 {
137 status = "okay";
138
139 phy-handle = <&swphy0>;
140
141 nvmem-cells = <&macaddr_uboot_1fc00>;
142 nvmem-cell-names = "mac-address";
143 mac-address-increment = <1>;
144 };
145
146 &eth1 {
147 nvmem-cells = <&macaddr_uboot_1fc00>;
148 nvmem-cell-names = "mac-address";
149 mac-address-increment = <(-1)>;
150 };
151
152 &wmac {
153 status = "okay";
154
155 mtd-cal-data = <&art 0x1000>;
156 nvmem-cells = <&macaddr_uboot_1fc00>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &usb0 {
161 status = "okay";
162 };
163
164 &usb_phy {
165 status = "okay";
166 };