ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.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         leds {
22                 compatible = "gpio-leds";
23
24                 led_power: power {
25                         label = "tp-link:green:power";
26                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
27                         default-state = "on";
28                 };
29
30                 internet {
31                         label = "tp-link:green:internet";
32                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33                 };
34
35                 wlan2g {
36                         label = "tp-link:green:wlan2g";
37                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38                         linux,default-trigger = "phy0tpt";
39                 };
40
41                 usb {
42                         label = "tp-link:green:usb";
43                         gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
44                         trigger-sources = <&hub_port0>;
45                         linux,default-trigger = "usbport";
46                 };
47
48                 wps {
49                         label = "tp-link:green:wps";
50                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
51                 };
52
53                 lan {
54                         label = "tp-link:green:lan";
55                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
56                 };
57         };
58
59         keys {
60                 compatible = "gpio-keys";
61
62                 reset {
63                         label = "Reset button";
64                         linux,code = <KEY_RESTART>;
65                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
66                 };
67
68                 wps {
69                         label = "WPS button";
70                         linux,code = <KEY_WPS_BUTTON>;
71                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
72                 };
73
74                 sw1 {
75                         label = "Mode switch 1";
76                         linux,input-type = <EV_SW>;
77                         linux,code = <BTN_0>;
78                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
79                 };
80
81                 sw2 {
82                         label = "Mode switch 2";
83                         linux,input-type = <EV_SW>;
84                         linux,code = <BTN_1>;
85                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
86                 };
87         };
88
89         gpio-export {
90                 compatible = "gpio-export";
91
92                 gpio_usb_power {
93                         gpio-export,name = "tp-link:power:usb";
94                         gpio-export,output = <1>;
95                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
96                 };
97         };
98 };
99
100 &uart {
101         status = "okay";
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                         tplink: partition@750000 {
130                                 label = "tplink";
131                                 reg = <0x750000 0x0a0000>;
132                                 read-only;
133                         };
134
135                         art: partition@7f0000 {
136                                 label = "art";
137                                 reg = <0x7f0000 0x010000>;
138                                 read-only;
139                         };
140                 };
141         };
142 };
143
144 &eth0 {
145         status = "okay";
146
147         phy-handle = <&swphy4>;
148
149         mtd-mac-address = <&tplink 0x8>;
150         mtd-mac-address-increment = <1>;
151 };
152
153 &eth1 {
154         compatible = "syscon", "simple-mfd";
155 };
156
157 &wmac {
158         status = "okay";
159
160         mtd-cal-data = <&art 0x1000>;
161         mtd-mac-address = <&tplink 0x8>;
162 };
163
164 &pcie0 {
165         status = "okay";
166
167         wifi@0,0 {
168                 compatible = "pci168c,0050";
169                 reg = <0x0000 0 0 0 0>;
170         };
171 };
172
173 &usb_phy {
174         status = "okay";
175 };
176
177 &usb0 {
178         #address-cells = <1>;
179         #size-cells = <0>;
180         status = "okay";
181
182         hub_port0: port@1 {
183                 reg = <1>;
184                 #trigger-source-cells = <0>;
185         };
186 };