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