ath79: add support for Ubiquiti UniFi AC-Pro
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tl-wr1043n.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 "qca956x.dtsi"
8
9 / {
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 aliases {
15 led-status = &system;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 system: system {
22 label = "tp-link:green:system";
23 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "heartbeat";
25 };
26
27 usb {
28 label = "tp-link:green:usb";
29 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
30 default-state = "off";
31 trigger-sources = <&hub_port0>;
32 linux,default-trigger = "usbport";
33 };
34
35 wifi_green {
36 label = "tp-link:green:wlan";
37 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
38 default-state = "off";
39 linux,default-trigger = "phy0tpt";
40 };
41
42 wifi_wps {
43 label = "tp-link:green:wps";
44 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
45 default-state = "off";
46 };
47
48 wan {
49 label = "tp-link:green:wan";
50 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
51 default-state = "off";
52 };
53
54 lan1 {
55 label = "tp-link:green:lan1";
56 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
57 default-state = "off";
58 };
59
60 lan2 {
61 label = "tp-link:green:lan2";
62 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
63 default-state = "off";
64 };
65
66 lan3 {
67 label = "tp-link:green:lan3";
68 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
69 default-state = "off";
70 };
71
72 lan4 {
73 label = "tp-link:green:lan4";
74 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
75 default-state = "off";
76 };
77 };
78
79 keys {
80 compatible = "gpio-keys";
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 reset {
85 label = "Reset button";
86 linux,code = <KEY_RESTART>;
87 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
88 debounce-interval = <60>;
89 };
90
91 wifi {
92 label = "RFKILL button";
93 linux,code = <KEY_RFKILL>;
94 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
95 debounce-interval = <60>;
96 };
97 };
98
99 gpio-export {
100 compatible = "gpio-export";
101 #size-cells = <0>;
102
103 gpio_usb_power {
104 gpio-export,name = "tp-link:power:usb";
105 gpio-export,output = <1>;
106 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
107 };
108 };
109 };
110
111 &uart {
112 status = "okay";
113 };
114
115 &gpio {
116 status = "okay";
117 };
118
119 &usb_phy0 {
120 status = "okay";
121 };
122
123 &usb0 {
124 status = "okay";
125
126 hub_port0: port@1 {
127 reg = <1>;
128 #trigger-source-cells = <0>;
129 };
130 };
131
132 &spi {
133 status = "okay";
134 num-cs = <1>;
135
136 flash@0 {
137 #address-cells = <1>;
138 #size-cells = <1>;
139 compatible = "jedec,spi-nor";
140 reg = <0>;
141 spi-max-frequency = <25000000>;
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "u-boot";
150 reg = <0x000000 0x020000>;
151 read-only;
152 };
153
154 partition@20000 {
155 label = "firmware";
156 reg = <0x020000 0xf30000>;
157 };
158
159 info: partition@f50000 {
160 label = "product-info";
161 reg = <0xf50000 0x020000>;
162 read-only;
163 };
164
165 partition@f70000 {
166 label = "config";
167 reg = <0xf70000 0x050000>;
168 read-only;
169 };
170
171 partition@fc0000 {
172 label = "partition-table";
173 reg = <0xfc0000 0x010000>;
174 read-only;
175 };
176
177 partition@fd0000 {
178 label = "logs";
179 reg = <0xfd0000 0x020000>;
180 read-only;
181 };
182
183 art: partition@ff0000 {
184 label = "ART";
185 reg = <0xff0000 0x010000>;
186 read-only;
187 };
188 };
189 };
190 };
191
192 &mdio0 {
193 status = "okay";
194
195 phy-mask = <0>;
196 phy0: ethernet-phy@0 {
197 reg = <0>;
198 phy-mode = "sgmii";
199
200 qca,ar8327-initvals = <
201 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
202 0x7c 0x0000007e /* PORT0_STATUS */
203 >;
204 };
205 };
206
207 &eth0 {
208 status = "okay";
209
210 mtd-mac-address = <&info 0x8>;
211 phy-handle = <&phy0>;
212 };
213
214 &wmac {
215 status = "okay";
216 mtd-cal-data = <&art 0x1000>;
217 mtd-mac-address = <&info 0x8>;
218 };