ipq40xx: only include ath10k-board-qca4019 for the generic subtarget
[openwrt/staging/chunkeey.git] / target / linux / ath79 / dts / qcn5502_tplink_archer-a9-v6.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "TP-Link Archer A9 v6";
10 compatible = "tplink,archer-a9-v6", "qca,qcn5500", "qca,qca9560";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29
30 wps {
31 label = "wps";
32 linux,code = <KEY_WPS_BUTTON>;
33 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_power: power {
42 label = "green:power";
43 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
44 default-state = "on";
45 };
46
47 usb {
48 label = "green:usb";
49 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
50 trigger-sources = <&hub_port0>;
51 linux,default-trigger = "usbport";
52 };
53
54 wan {
55 label = "green:wan";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 };
58
59 wan_orange {
60 label = "orange:wan";
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 };
63
64 wlan2g {
65 label = "green:wlan2g";
66 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy1tpt";
68 };
69
70 wlan5g {
71 label = "green:wlan5g";
72 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
73 linux,default-trigger = "phy0tpt";
74 };
75
76 wps {
77 label = "green:wps";
78 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
79 };
80 };
81 };
82
83 &eth0 {
84 status = "okay";
85
86 pll-data = <0x03000101 0x00000101 0x00001919>;
87
88 phy-mode = "sgmii";
89 phy-handle = <&phy0>;
90
91 nvmem-cells = <&macaddr_info_8>;
92 nvmem-cell-names = "mac-address";
93 };
94
95 &mdio0 {
96 status = "okay";
97
98 phy-mask = <0>;
99
100 phy0: ethernet-phy@0 {
101 reg = <0>;
102 phy-mode = "sgmii";
103 qca,mib-poll-interval = <500>;
104
105 qca,ar8327-initvals = <
106 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
107 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
108 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
109 0x10 0x00000080 /* POWER_ON_STRAP */
110 0x7c 0x0000007e /* PORT0_STATUS */
111 0x94 0x00000200 /* PORT6_STATUS */
112 >;
113 };
114 };
115
116 &pcie {
117 status = "okay";
118
119 wifi@0,0 {
120 compatible = "pci168c,0046";
121 reg = <0 0 0 0 0>;
122
123 nvmem-cells = <&macaddr_info_8>, <&precal_art_5000>;
124 nvmem-cell-names = "mac-address", "pre-calibration";
125
126 mac-address-increment = <(-1)>;
127 };
128 };
129
130 &spi {
131 status = "okay";
132
133 flash@0 {
134 compatible = "jedec,spi-nor";
135 reg = <0>;
136 spi-max-frequency = <25000000>;
137 m25p,fast-read;
138
139 mtdparts: partitions {
140 compatible = "fixed-partitions";
141 #address-cells = <1>;
142 #size-cells = <1>;
143
144 partition@0 {
145 label = "factory-uboot";
146 reg = <0x000000 0x020000>;
147 read-only;
148 };
149
150 partition@20000 {
151 label = "u-boot";
152 reg = <0x020000 0x020000>;
153 read-only;
154 };
155
156 partition@40000 {
157 label = "partition-table";
158 reg = <0x040000 0x010000>;
159 read-only;
160 };
161
162 partition@50000 {
163 label = "art";
164 reg = <0x050000 0x010000>;
165 read-only;
166
167 compatible = "nvmem-cells";
168 #address-cells = <1>;
169 #size-cells = <1>;
170
171 cal_art_1000: cal@1000 {
172 reg = <0x1000 0x440>;
173 };
174
175 precal_art_5000: precal@5000 {
176 reg = <0x5000 0x2f20>;
177 };
178 };
179
180 partition@60000 {
181 label = "info";
182 reg = <0x060000 0x020000>;
183 read-only;
184
185 compatible = "nvmem-cells";
186 #address-cells = <1>;
187 #size-cells = <1>;
188
189 macaddr_info_8: macaddr@8 {
190 reg = <0x8 0x6>;
191 };
192 };
193
194 partition@80000 {
195 label = "user-config";
196 reg = <0x080000 0x040000>;
197 read-only;
198 };
199
200 partition@c0000 {
201 compatible = "denx,uimage";
202 label = "firmware";
203 reg = <0x0c0000 0xf00000>;
204 };
205
206 partition@fc0000 {
207 label = "log";
208 reg = <0xfc0000 0x020000>;
209 read-only;
210 };
211
212 partition@fe0000 {
213 label = "certificate";
214 reg = <0xfe0000 0x010000>;
215 read-only;
216 };
217
218 partition@ff0000 {
219 label = "default-config";
220 reg = <0xff0000 0x010000>;
221 read-only;
222 };
223 };
224 };
225 };
226
227 &usb_phy0 {
228 status = "okay";
229 };
230
231 &usb0 {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 status = "okay";
235
236 hub_port0: port@1 {
237 reg = <1>;
238 #trigger-source-cells = <0>;
239 };
240 };
241
242 &wmac {
243 /* TODO: missing support in ath9k */
244 status = "disabled";
245
246 nvmem-cells = <&cal_art_1000>, <&macaddr_info_8>;
247 nvmem-cell-names = "calibration", "mac-address";
248 };