ath79: add WNDR3700 and WNDR3700v2
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_tl-re450-v2.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 "qca956x.dtsi"
8
9 / {
10         compatible = "tplink,re450-v2", "qca,qca9563";
11         model = "TP-Link RE450 v2";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-status = &system;
19                 mdio-gpio0 = &mdio2;
20         };
21
22         leds {
23                 compatible = "gpio-leds";
24
25                 system: power {
26                         label = "tp-link:blue:power";
27                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
28                 };
29
30                 wlan2g {
31                         label = "tp-link:blue:wlan2g";
32                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
33                         default-state = "off";
34                         linux,default-trigger = "phy1tpt";
35                 };
36
37                 wlan5g {
38                         label = "tp-link:blue:wlan5g";
39                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
40                         default-state = "off";
41                         linux,default-trigger = "phy0tpt";
42                 };
43
44                 lan_link {
45                         label = "tp-link:green:lan_link";
46                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
47                         default-state = "off";
48                 };
49
50                 lan_data {
51                         label = "tp-link:green:lan_data";
52                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
53                         default-state = "off";
54                 };
55
56                 wps_blue {
57                         label = "tp-link:blue:wps";
58                         gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
59                         default-state = "off";
60                 };
61
62                 wps_red {
63                         label = "tp-link:red:wps";
64                         gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
65                         default-state = "off";
66                 };
67         };
68
69         keys {
70                 compatible = "gpio-keys";
71
72                 reset {
73                         label = "Reset button";
74                         linux,code = <KEY_RESTART>;
75                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
76                         debounce-interval = <60>;
77                 };
78
79                 power {
80                         label = "Power button";
81                         linux,code = <KEY_POWER>;
82                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
83                         debounce-interval = <60>;
84                 };
85
86                 leds {
87                         label = "LED control button";
88                         linux,code = <BTN_0>;
89                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
90                         debounce-interval = <60>;
91                 };
92
93                 wps {
94                         label = "WPS button";
95                         linux,code = <KEY_WPS_BUTTON>;
96                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
97                         debounce-interval = <60>;
98                 };
99         };
100
101         mdio2: mdio {
102                 compatible = "virtual,mdio-gpio";
103
104                 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */
105                         <&gpio 4 GPIO_ACTIVE_HIGH>; /* MDIO */
106                 #address-cells = <1>;
107                 #size-cells = <0>;
108
109                 phy0: ethernet-phy@4 {
110                         reg = <4>;
111                         device_type = "ethernet-phy";
112                         reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
113                 };
114         };
115 };
116
117 &pcie {
118         status = "okay";
119 };
120
121 &uart {
122         status = "okay";
123 };
124
125 &gpio {
126         status = "okay";
127 };
128
129 &spi {
130         status = "okay";
131         num-cs = <1>;
132
133         flash@0 {
134                 compatible = "jedec,spi-nor";
135                 reg = <0>;
136                 spi-max-frequency = <25000000>;
137
138                 partitions {
139                         compatible = "fixed-partitions";
140                         #address-cells = <1>;
141                         #size-cells = <1>;
142
143                         partition@0 {
144                                 label = "u-boot";
145                                 reg = <0x000000 0x020000>;
146                                 read-only;
147                         };
148
149                         partition@20000 {
150                                 label = "firmware";
151                                 reg = <0x020000 0x5e0000>;
152                         };
153
154                         partition@600000 {
155                                 label = "partition-table";
156                                 reg = <0x600000 0x010000>;
157                                 read-only;
158                         };
159
160                         info: partition@610000 {
161                                 label = "product-info";
162                                 reg = <0x610000 0x020000>;
163                                 read-only;
164                         };
165
166                         partition@630000 {
167                                 label = "config";
168                                 reg = <0x630000 0x020000>;
169                                 read-only;
170                         };
171
172                         art: partition@7f0000 {
173                                 label = "art";
174                                 reg = <0x7f0000 0x010000>;
175                                 read-only;
176                         };
177                 };
178         };
179 };
180
181 &eth0 {
182         status = "okay";
183         mtd-mac-address = <&info 0x8>;
184         phy-handle = <&phy0>;
185 };
186
187 &wmac {
188         status = "okay";
189         mtd-cal-data = <&art 0x1000>;
190         mtd-mac-address = <&info 0x8>;
191 };