ath79: move dts-v1 statement to ath79.dtsi
[openwrt/staging/hauke.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
8 / {
9 compatible = "tplink,tl-wr902ac-v1", "qca,qca9531";
10 model = "TP-Link TL-WR902AC v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 label = "tp-link:green:power";
25 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 internet {
30 label = "tp-link:green:internet";
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 };
33
34 wlan2g {
35 label = "tp-link:green:wlan2g";
36 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39
40 usb {
41 label = "tp-link:green:usb";
42 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
43 trigger-sources = <&hub_port0>;
44 linux,default-trigger = "usbport";
45 };
46
47 wps {
48 label = "tp-link:green:wps";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 };
51
52 lan {
53 label = "tp-link:green:lan";
54 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
55 };
56 };
57
58 keys {
59 compatible = "gpio-keys";
60
61 reset {
62 label = "Reset button";
63 linux,code = <KEY_RESTART>;
64 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
65 };
66
67 wps {
68 label = "WPS button";
69 linux,code = <KEY_WPS_BUTTON>;
70 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
71 };
72
73 sw1 {
74 label = "Mode switch 1";
75 linux,input-type = <EV_SW>;
76 linux,code = <BTN_0>;
77 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
78 };
79
80 sw2 {
81 label = "Mode switch 2";
82 linux,input-type = <EV_SW>;
83 linux,code = <BTN_1>;
84 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
85 };
86 };
87
88 gpio-export {
89 compatible = "gpio-export";
90
91 gpio_usb_power {
92 gpio-export,name = "tp-link:power:usb";
93 gpio-export,output = <1>;
94 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
95 };
96 };
97 };
98
99 &uart {
100 status = "okay";
101 };
102
103 &spi {
104 status = "okay";
105
106 flash@0 {
107 compatible = "jedec,spi-nor";
108 reg = <0>;
109 spi-max-frequency = <25000000>;
110
111 partitions {
112 compatible = "fixed-partitions";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 partition@0 {
117 label = "u-boot";
118 reg = <0x000000 0x020000>;
119 read-only;
120 };
121
122 partition@20000 {
123 compatible = "tplink,firmware";
124 label = "firmware";
125 reg = <0x020000 0x730000>;
126 };
127
128 info: partition@750000 {
129 label = "info";
130 reg = <0x750000 0x010000>;
131 read-only;
132 };
133
134 partition@760000 {
135 label = "tplink";
136 reg = <0x760000 0x090000>;
137 read-only;
138 };
139
140 art: partition@7f0000 {
141 label = "art";
142 reg = <0x7f0000 0x010000>;
143 read-only;
144 };
145 };
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 phy-handle = <&swphy4>;
153
154 mtd-mac-address = <&info 0x8>;
155 mtd-mac-address-increment = <1>;
156 };
157
158 &eth1 {
159 compatible = "syscon", "simple-mfd";
160 };
161
162 &wmac {
163 status = "okay";
164
165 mtd-cal-data = <&art 0x1000>;
166 mtd-mac-address = <&info 0x8>;
167 };
168
169 &pcie0 {
170 status = "okay";
171
172 wifi@0,0 {
173 compatible = "pci168c,0050";
174 reg = <0x0000 0 0 0 0>;
175 };
176 };
177
178 &usb_phy {
179 status = "okay";
180 };
181
182 &usb0 {
183 #address-cells = <1>;
184 #size-cells = <0>;
185 status = "okay";
186
187 hub_port0: port@1 {
188 reg = <1>;
189 #trigger-source-cells = <0>;
190 };
191 };