4f5a29cfa01eaf80c1bce7872ddb274dc366b2b3
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / qca9531_tplink_tl-wr902ac-v1.dts
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 "qca953x.dtsi"
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 chosen {
22 bootargs = "console=ttyS0,115200n8";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_power: power {
29 label = "tp-link:green:power";
30 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
31 default-state = "on";
32 };
33
34 internet {
35 label = "tp-link:green:internet";
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan2g {
40 label = "tp-link:green:wlan2g";
41 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy0tpt";
43 };
44
45 usb {
46 label = "tp-link:green:usb";
47 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
48 trigger-sources = <&hub_port0>;
49 linux,default-trigger = "usbport";
50 };
51
52 wps {
53 label = "tp-link:green:wps";
54 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
55 };
56
57 lan {
58 label = "tp-link:green:lan";
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 &uart {
105 status = "okay";
106 };
107
108 &spi {
109 status = "okay";
110
111 flash@0 {
112 compatible = "jedec,spi-nor";
113 reg = <0>;
114 spi-max-frequency = <25000000>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 partition@0 {
122 label = "u-boot";
123 reg = <0x000000 0x020000>;
124 read-only;
125 };
126
127 partition@20000 {
128 compatible = "tplink,firmware";
129 label = "firmware";
130 reg = <0x020000 0x730000>;
131 };
132
133 tplink: partition@750000 {
134 label = "tplink";
135 reg = <0x750000 0x0a0000>;
136 read-only;
137 };
138
139 art: partition@7f0000 {
140 label = "art";
141 reg = <0x7f0000 0x010000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 phy-handle = <&swphy4>;
152
153 mtd-mac-address = <&tplink 0x8>;
154 mtd-mac-address-increment = <1>;
155 };
156
157 &eth1 {
158 compatible = "syscon", "simple-mfd";
159 };
160
161 &wmac {
162 status = "okay";
163
164 mtd-cal-data = <&art 0x1000>;
165 mtd-mac-address = <&tplink 0x8>;
166 };
167
168 &pcie0 {
169 status = "okay";
170
171 wifi@0,0 {
172 compatible = "pci168c,0050";
173 reg = <0x0000 0 0 0 0>;
174 };
175 };
176
177 &usb_phy {
178 status = "okay";
179 };
180
181 &usb0 {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 status = "okay";
185
186 hub_port0: port@1 {
187 reg = <1>;
188 #trigger-source-cells = <0>;
189 };
190 };