ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / qca9531_tplink_tl-mr3420-v3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
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-mr3420-v3", "qca,qca9531";
11 model = "TP-Link TL-MR3420 v3";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 label-mac-device = &wmac;
19
20 };
21
22 led_spi {
23 compatible = "spi-gpio";
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 sck-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
28 mosi-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
29 cs-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
30 num-chipselects = <1>;
31
32 led_gpio: led_gpio@0 {
33 compatible = "fairchild,74hc595";
34 reg = <0>;
35 gpio-controller;
36 #gpio-cells = <2>;
37 registers-number = <1>;
38 spi-max-frequency = <10000000>;
39 };
40 };
41
42 gpio-export {
43 compatible = "gpio-export";
44
45 gpio_shift_register_oe {
46 gpio-export,name = "tp-link:oe:sr";
47 gpio-export,output = <0>;
48 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
49 };
50
51 gpio_shift_register_reset {
52 gpio-export,name = "tp-link:reset:sr";
53 gpio-export,output = <1>;
54 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 leds {
59 compatible = "gpio-leds";
60
61 led_system: system {
62 label = "tp-link:green:system";
63 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
64 default-state = "on";
65 };
66
67 lan4 {
68 label = "tp-link:green:lan4";
69 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
70 };
71
72 lan3 {
73 label = "tp-link:green:lan3";
74 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
75 };
76
77 lan2 {
78 label = "tp-link:green:lan2";
79 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
80 };
81
82 lan1 {
83 label = "tp-link:green:lan1";
84 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
85 };
86
87 wan {
88 label = "tp-link:green:wan";
89 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
90 };
91
92 wan_fail {
93 label = "tp-link:orange:wan";
94 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
95 };
96
97 wlan {
98 label = "tp-link:green:wlan";
99 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
100 linux,default-trigger = "phy0tpt";
101 };
102
103 usb {
104 label = "tp-link:green:usb";
105 gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
106 trigger-sources = <&hub_port>;
107 linux,default-trigger = "usbport";
108 };
109
110 qss {
111 label = "tp-link:green:qss";
112 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
113 };
114 };
115
116 keys {
117 compatible = "gpio-keys";
118
119 reset {
120 label = "Reset button";
121 linux,code = <KEY_RESTART>;
122 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
123 debounce-interval = <60>;
124 };
125
126 rfkill {
127 label = "RF kill button";
128 linux,code = <KEY_RFKILL>;
129 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
130 debounce-interval = <60>;
131 };
132 };
133
134 };
135
136 &uart {
137 status = "okay";
138 };
139
140 &spi {
141 status = "okay";
142
143 num-cs = <1>;
144
145 flash@0 {
146 compatible = "jedec,spi-nor";
147 reg = <0>;
148 spi-max-frequency = <25000000>;
149
150 partitions {
151 compatible = "fixed-partitions";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 uboot: partition@0 {
156 label = "u-boot";
157 reg = <0x000000 0x020000>;
158 read-only;
159 };
160
161 partition@20000 {
162 compatible = "tplink,firmware";
163 label = "firmware";
164 reg = <0x020000 0x3d0000>;
165 };
166
167 art: partition@3f0000 {
168 label = "art";
169 reg = <0x3f0000 0x010000>;
170 read-only;
171 };
172 };
173 };
174 };
175
176 &eth1 {
177 mtd-mac-address = <&uboot 0x1fc00>;
178 };
179
180 &eth0 {
181 status = "okay";
182
183 phy-handle = <&swphy4>;
184
185 mtd-mac-address = <&uboot 0x1fc00>;
186 mtd-mac-address-increment = <1>;
187 };
188
189 &wmac {
190 status = "okay";
191
192 mtd-cal-data = <&art 0x1000>;
193 mtd-mac-address = <&uboot 0x1fc00>;
194 };
195
196 &usb0 {
197 #address-cells = <1>;
198 #size-cells = <0>;
199 status = "okay";
200
201 hub_port: port@1 {
202 reg = <1>;
203 #trigger-source-cells = <0>;
204 };
205 };
206
207 &usb_phy {
208 status = "okay";
209 };