perf: fix build on PowerPC
[openwrt/openwrt.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 = "green:power";
25 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 internet {
30 label = "green:internet";
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 };
33
34 wlan2g {
35 label = "green:wlan2g";
36 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39
40 usb {
41 label = "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 = "green:wps";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 };
51
52 lan {
53 label = "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 &spi {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <25000000>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x000000 0x020000>;
115 read-only;
116 };
117
118 partition@20000 {
119 compatible = "tplink,firmware";
120 label = "firmware";
121 reg = <0x020000 0x730000>;
122 };
123
124 info: partition@750000 {
125 label = "info";
126 reg = <0x750000 0x010000>;
127 read-only;
128 };
129
130 partition@760000 {
131 label = "tplink";
132 reg = <0x760000 0x090000>;
133 read-only;
134 };
135
136 art: partition@7f0000 {
137 label = "art";
138 reg = <0x7f0000 0x010000>;
139 read-only;
140 };
141 };
142 };
143 };
144
145 &eth0 {
146 status = "okay";
147
148 phy-handle = <&swphy4>;
149
150 mtd-mac-address = <&info 0x8>;
151 mtd-mac-address-increment = <1>;
152 };
153
154 &eth1 {
155 compatible = "syscon", "simple-mfd";
156 };
157
158 &wmac {
159 status = "okay";
160
161 mtd-cal-data = <&art 0x1000>;
162 mtd-mac-address = <&info 0x8>;
163 };
164
165 &pcie0 {
166 status = "okay";
167
168 wifi@0,0 {
169 compatible = "pci168c,0050";
170 reg = <0x0000 0 0 0 0>;
171 };
172 };
173
174 &usb_phy {
175 status = "okay";
176 };
177
178 &usb0 {
179 #address-cells = <1>;
180 #size-cells = <0>;
181 status = "okay";
182
183 hub_port0: port@1 {
184 reg = <1>;
185 #trigger-source-cells = <0>;
186 };
187 };