ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_d-team_pbr-m1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "d-team,pbr-m1", "mediatek,mt7621-soc";
10 model = "PBR-M1";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 power {
27 label = "pbr-m1:blue:power";
28 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
29 default-state = "on";
30 };
31
32 led_sys: sys {
33 label = "pbr-m1:blue:sys";
34 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
35 };
36
37 internet {
38 label = "pbr-m1:blue:internet";
39 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g {
43 label = "pbr-m1:blue:wlan2g";
44 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan5g {
48 label = "pbr-m1:blue:wlan5g";
49 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62
63 gpio_export {
64 compatible = "gpio-export";
65 #size-cells = <0>;
66
67 power_usb2 {
68 gpio-export,name = "power_usb2";
69 gpio-export,output = <1>;
70 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
71 };
72
73 power_usb3 {
74 gpio-export,name = "power_usb3";
75 gpio-export,output = <1>;
76 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
77 };
78
79 power_sata {
80 gpio-export,name = "power_sata";
81 gpio-export,output = <1>;
82 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
83 };
84 };
85
86 beeper: beeper {
87 compatible = "gpio-beeper";
88 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92 &i2c {
93 status = "okay";
94
95 rtc@51 {
96 status = "okay";
97 compatible = "nxp,pcf8563";
98 reg = <0x51>;
99 };
100 };
101
102 &sdhci {
103 status = "okay";
104 };
105
106 &spi0 {
107 status = "okay";
108
109 flash@0 {
110 compatible = "jedec,spi-nor";
111 reg = <0>;
112 spi-max-frequency = <10000000>;
113 broken-flash-reset;
114
115 partitions {
116 compatible = "fixed-partitions";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 partition@0 {
121 label = "u-boot";
122 reg = <0x0 0x30000>;
123 read-only;
124 };
125
126 partition@30000 {
127 label = "u-boot-env";
128 reg = <0x30000 0x10000>;
129 read-only;
130 };
131
132 factory: partition@40000 {
133 label = "factory";
134 reg = <0x40000 0x10000>;
135 read-only;
136 };
137
138 partition@50000 {
139 compatible = "denx,uimage";
140 label = "firmware";
141 reg = <0x50000 0xfb0000>;
142 };
143 };
144 };
145 };
146
147 &pcie {
148 status = "okay";
149 };
150
151 &pcie0 {
152 mt76@0,0 {
153 reg = <0x0000 0 0 0 0>;
154 mediatek,mtd-eeprom = <&factory 0x8000>;
155 ieee80211-freq-limit = <5000000 6000000>;
156 };
157 };
158
159 &pcie1 {
160 mt76@0,0 {
161 reg = <0x0000 0 0 0 0>;
162 mediatek,mtd-eeprom = <&factory 0x0000>;
163 };
164 };
165
166 &gmac0 {
167 mtd-mac-address = <&factory 0xe000>;
168 };
169
170 &switch0 {
171 ports {
172 port@0 {
173 status = "okay";
174 label = "lan1";
175 };
176
177 port@1 {
178 status = "okay";
179 label = "lan2";
180 };
181
182 port@2 {
183 status = "okay";
184 label = "lan3";
185 };
186
187 port@3 {
188 status = "okay";
189 label = "lan4";
190 };
191
192 port@4 {
193 status = "okay";
194 label = "wan";
195 mtd-mac-address = <&factory 0xe006>;
196 };
197 };
198 };
199
200 &state_default {
201 gpio {
202 groups = "wdt", "rgmii2", "jtag";
203 function = "gpio";
204 };
205 };