ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-1167ghbk2-s.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 = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc";
10 model = "ELECOM WRC-1167GHBK2-S";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_green;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_green;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 wlan2g {
27 label = "wrc-1167ghbk2-s:white:wlan2g";
28 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
29 linux,default-trigger = "phy0radio";
30 };
31
32 wlan5g {
33 label = "wrc-1167ghbk2-s:white:wlan5g";
34 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
35 };
36
37 led_power_green: power_green {
38 label = "wrc-1167ghbk2-s:green:power";
39 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
40 };
41
42 power_blue {
43 label = "wrc-1167ghbk2-s:blue:power";
44 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
45 };
46
47 wps {
48 label = "wrc-1167ghbk2-s:red:wps";
49 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
50 };
51
52 power_red {
53 label = "wrc-1167ghbk2-s:red:power";
54 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
55 };
56 };
57
58 keys {
59 compatible = "gpio-keys";
60
61 reset {
62 label = "reset";
63 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_RESTART>;
65 };
66
67 wps {
68 label = "wps";
69 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_WPS_BUTTON>;
71 };
72 };
73 };
74
75 &gmac0 {
76 mtd-mac-address = <&factory 0xe000>;
77 };
78
79 &switch0 {
80 ports {
81 port@0 {
82 status = "okay";
83 label = "wan";
84 mtd-mac-address = <&factory 0xe006>;
85 };
86
87 port@1 {
88 status = "okay";
89 label = "lan4";
90 };
91
92 port@2 {
93 status = "okay";
94 label = "lan3";
95 };
96
97 port@3 {
98 status = "okay";
99 label = "lan2";
100 };
101
102 port@4 {
103 status = "okay";
104 label = "lan1";
105 };
106 };
107 };
108
109 &spi0 {
110 status = "okay";
111
112 flash@0 {
113 compatible = "jedec,spi-nor";
114 reg = <0>;
115 spi-max-frequency = <10000000>;
116
117 partitions {
118 compatible = "fixed-partitions";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 partition@0 {
123 label = "u-boot";
124 reg = <0x0 0x30000>;
125 read-only;
126 };
127
128 partition@30000 {
129 label = "u-boot-env";
130 reg = <0x30000 0x10000>;
131 read-only;
132 };
133
134 factory: partition@40000 {
135 label = "factory";
136 reg = <0x40000 0x10000>;
137 read-only;
138 };
139
140 partition@50000 {
141 compatible = "denx,uimage";
142 label = "firmware";
143 reg = <0x50000 0xf20000>;
144 };
145
146 partition@f70000 {
147 label = "user_data";
148 reg = <0xf70000 0x80000>;
149 read-only;
150 };
151
152 partition@ff0000 {
153 label = "NVRAM";
154 reg = <0xff0000 0x10000>;
155 read-only;
156 };
157 };
158 };
159 };
160
161 &state_default {
162 gpio {
163 groups = "i2c", "uart3", "jtag", "wdt";
164 function = "gpio";
165 };
166 };
167
168 &pcie {
169 status = "okay";
170 };
171
172 &pcie0 {
173 wifi@0,0 {
174 compatible = "mediatek,mt76";
175 reg = <0x0000 0 0 0 0>;
176 mediatek,mtd-eeprom = <&factory 0x0>;
177 mtd-mac-address = <&factory 0xe000>;
178 mtd-mac-address-increment = <1>;
179 };
180 };
181
182 &xhci {
183 status = "disabled";
184 };