ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9531_tplink_tl-wr902ac-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,tl-wr902ac-v1", "qca,qca9531";
11 model = "TP-Link TL-WR902AC v1";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &wmac;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 function = LED_FUNCTION_POWER;
26 color = <LED_COLOR_ID_GREEN>;
27 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
28 default-state = "on";
29 };
30
31 internet {
32 label = "green:internet";
33 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
34 };
35
36 wlan2g {
37 label = "green:wlan2g";
38 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "phy0tpt";
40 };
41
42 usb {
43 function = LED_FUNCTION_USB;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
46 trigger-sources = <&hub_port0>;
47 linux,default-trigger = "usbport";
48 };
49
50 wps {
51 function = LED_FUNCTION_WPS;
52 color = <LED_COLOR_ID_GREEN>;
53 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
54 };
55
56 lan {
57 function = LED_FUNCTION_LAN;
58 color = <LED_COLOR_ID_GREEN>;
59 gpios = <&gpio 15 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 3 GPIO_ACTIVE_LOW>;
70 };
71
72 wps {
73 label = "WPS button";
74 linux,code = <KEY_WPS_BUTTON>;
75 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
76 };
77
78 sw1 {
79 label = "Mode switch 1";
80 linux,input-type = <EV_SW>;
81 linux,code = <BTN_0>;
82 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
83 };
84
85 sw2 {
86 label = "Mode switch 2";
87 linux,input-type = <EV_SW>;
88 linux,code = <BTN_1>;
89 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
90 };
91 };
92
93 gpio-export {
94 compatible = "gpio-export";
95
96 gpio_usb_power {
97 gpio-export,name = "tp-link:power:usb";
98 gpio-export,output = <1>;
99 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
100 };
101 };
102 };
103
104 &spi {
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 reg = <0>;
110 spi-max-frequency = <25000000>;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 partition@0 {
118 label = "u-boot";
119 reg = <0x000000 0x020000>;
120 read-only;
121 };
122
123 partition@20000 {
124 compatible = "tplink,firmware";
125 label = "firmware";
126 reg = <0x020000 0x730000>;
127 };
128
129 info: partition@750000 {
130 label = "info";
131 reg = <0x750000 0x010000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 macaddr_info_8: macaddr@8 {
140 compatible = "mac-base";
141 reg = <0x8 0x6>;
142 #nvmem-cell-cells = <1>;
143 };
144 };
145 };
146
147 partition@760000 {
148 label = "tplink";
149 reg = <0x760000 0x090000>;
150 read-only;
151 };
152
153 art: partition@7f0000 {
154 label = "art";
155 reg = <0x7f0000 0x010000>;
156 read-only;
157
158 nvmem-layout {
159 compatible = "fixed-layout";
160 #address-cells = <1>;
161 #size-cells = <1>;
162
163 cal_art_5000: calibration@5000 {
164 reg = <0x5000 0x844>;
165 };
166 };
167 };
168 };
169 };
170 };
171
172 &eth0 {
173 status = "okay";
174
175 phy-handle = <&swphy4>;
176
177 nvmem-cells = <&macaddr_info_8 1>;
178 nvmem-cell-names = "mac-address";
179 };
180
181 &eth1 {
182 compatible = "syscon", "simple-mfd";
183 };
184
185 &wmac {
186 status = "okay";
187
188 mtd-cal-data = <&art 0x1000>;
189 nvmem-cells = <&macaddr_info_8 0>;
190 nvmem-cell-names = "mac-address";
191 };
192
193 &pcie0 {
194 status = "okay";
195
196 wifi@0,0 {
197 compatible = "pci168c,0050";
198 reg = <0x0000 0 0 0 0>;
199 nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
200 nvmem-cell-names = "calibration", "mac-address";
201 };
202 };
203
204 &usb_phy {
205 status = "okay";
206 };
207
208 &usb0 {
209 status = "okay";
210 };