ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_tplink_archer-c2-v1.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C2 v1";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 lan {
27 label = "archer-c2-v1:green:lan";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 };
30
31 usb {
32 label = "archer-c2-v1:green:usb";
33 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
34 trigger-sources = <&ohci_port1>, <&ehci_port1>;
35 linux,default-trigger = "usbport";
36 };
37
38 led_wps: wps {
39 label = "archer-c2-v1:green:wps";
40 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
41 };
42
43 wan {
44 label = "archer-c2-v1:green:wan";
45 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan {
49 label = "archer-c2-v1:green:wlan";
50 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys";
57
58 reset_wps {
59 label = "reset_wps";
60 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63
64 rfkill {
65 label = "rfkill";
66 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_RFKILL>;
68 };
69 };
70
71 rtl8367rb {
72 compatible = "realtek,rtl8367b", "rtl8367b";
73 cpu_port = <6>;
74 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
75 mii-bus = <&mdio0>;
76 };
77 };
78
79 &spi0 {
80 status = "okay";
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <10000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x20000>;
95 read-only;
96 };
97
98 partition@20000 {
99 compatible = "tplink,firmware";
100 label = "firmware";
101 reg = <0x20000 0x7a0000>;
102 };
103
104 partition@7c0000 {
105 label = "config";
106 reg = <0x7c0000 0x10000>;
107 read-only;
108 };
109
110 rom: partition@7d0000 {
111 label = "rom";
112 reg = <0x7d0000 0x10000>;
113 read-only;
114 };
115
116 partition@7e0000 {
117 label = "romfile";
118 reg = <0x7e0000 0x10000>;
119 read-only;
120 };
121
122 radio: partition@7f0000 {
123 label = "radio";
124 reg = <0x7f0000 0x10000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &ethernet {
132 pinctrl-names = "default";
133 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
134
135 mtd-mac-address = <&rom 0xf100>;
136
137 port@5 {
138 status = "okay";
139 mediatek,fixed-link = <1000 1 1 1>;
140 phy-mode = "rgmii";
141 };
142
143 mdio0: mdio-bus {
144 status = "okay";
145 };
146 };
147
148 &gpio1 {
149 status = "okay";
150 };
151
152 &gpio2 {
153 status = "okay";
154 };
155
156 &gpio3 {
157 status = "okay";
158 };
159
160 &state_default {
161 gpio {
162 groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
163 function = "gpio";
164 };
165 };
166
167 &wmac {
168 ralink,mtd-eeprom = <&radio 0x0>;
169 mtd-mac-address = <&rom 0xf100>;
170 };
171
172 &ehci {
173 status = "okay";
174 };
175
176 &ohci {
177 status = "okay";
178 };
179
180 &pcie {
181 status = "okay";
182 };
183
184 &pcie0 {
185 mt76@0,0 {
186 reg = <0x0000 0 0 0 0>;
187 mediatek,mtd-eeprom = <&radio 0x8000>;
188 mtd-mac-address = <&rom 0xf100>;
189 mtd-mac-address-increment = <(-1)>;
190 };
191 };