ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc";
11 model = "I-O DATA WNPR2600G";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 label = "wnpr2600g:green:power";
29 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
30 default-state = "on";
31 };
32
33 notification {
34 label = "wnpr2600g:green:notification";
35 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
36 };
37
38 wlan2g {
39 label = "wnpr2600g:green:wlan2g";
40 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
41 linux,default-trigger = "phy0radio";
42 };
43
44 wlan5g {
45 label = "wnpr2600g:green:wlan5g";
46 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
47 linux,default-trigger = "phy1radio";
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 auto {
55 label = "auto";
56 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
57 linux,code = <BTN_0>;
58 linux,input-type = <EV_SW>;
59 };
60
61 reset {
62 label = "reset";
63 gpios = <&gpio 16 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 &spi0 {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <40000000>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x000000 0x030000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "u-boot-env";
96 reg = <0x030000 0x010000>;
97 read-only;
98 };
99
100 factory: partition@40000 {
101 label = "factory";
102 reg = <0x040000 0x010000>;
103 read-only;
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x050000 0xda0000>;
110 };
111
112 partition@df0000 {
113 label = "manufacture";
114 reg = <0xdf0000 0x190000>;
115 read-only;
116 };
117
118 partition@f80000 {
119 label = "storage";
120 reg = <0xf80000 0x080000>;
121 read-only;
122 };
123 };
124 };
125 };
126
127 &gmac0 {
128 mtd-mac-address = <&factory 0x4>;
129 };
130
131 &switch0 {
132 ports {
133 port@0 {
134 status = "okay";
135 label = "wan";
136 };
137
138 port@1 {
139 status = "okay";
140 label = "lan4";
141 };
142
143 port@2 {
144 status = "okay";
145 label = "lan3";
146 };
147
148 port@3 {
149 status = "okay";
150 label = "lan2";
151 };
152
153 port@4 {
154 status = "okay";
155 label = "lan1";
156 };
157 };
158 };
159
160 &state_default {
161 gpio {
162 groups = "uart2", "uart3", "jtag", "wdt";
163 function = "gpio";
164 };
165 };
166
167 &pcie {
168 status = "okay";
169 };
170
171 &pcie0 {
172 wifi@0,0 {
173 compatible = "mediatek,mt76";
174 reg = <0x0000 0 0 0 0>;
175 mediatek,mtd-eeprom = <&factory 0x0>;
176 ieee80211-freq-limit = <2400000 2500000>;
177 };
178 };
179
180 &pcie1 {
181 wifi@0,0 {
182 compatible = "mediatek,mt76";
183 reg = <0x0000 0 0 0 0>;
184 mediatek,mtd-eeprom = <&factory 0x8000>;
185 ieee80211-freq-limit = <5000000 6000000>;
186 };
187 };
188
189 &xhci {
190 status = "disabled";
191 };