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