ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_telco-electronics_x1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "mt7621.dtsi"
6
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9
10 / {
11 compatible = "telco-electronics,x1", "mediatek,mt7621-soc";
12 model = "Telco Electronics X1";
13
14 aliases {
15 led-boot = &system_led;
16 led-failsafe = &system_led;
17 led-running = &system_led;
18 led-upgrade = &system_led;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 system_led: system {
39 label = "x1:green:system";
40 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
41 };
42
43 modem_offline {
44 label = "x1:red:modem-offline";
45 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
46 };
47
48 modem_4g {
49 label = "x1:blue:modem-4g";
50 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
51 };
52
53 modem_3g {
54 label = "x1:green:modem-3g";
55 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
56 };
57
58 modem_rssi_lowest {
59 label = "x1:green:modem-rssi-lowest";
60 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
61 };
62
63 modem_rssi_low {
64 label = "x1:green:modem-rssi-low";
65 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
66 };
67
68 modem_rssi_medium {
69 label = "x1:green:modem-rssi-medium";
70 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
71 };
72
73 modem_rssi_high {
74 label = "x1:green:modem-rssi-high";
75 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
76 };
77
78 modem_rssi_highest {
79 label = "x1:green:modem-rssi-highest";
80 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <14000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "bootloader";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "config";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 label = "factory";
112 reg = <0x40000 0x10000>;
113 read-only;
114 };
115
116 firmware: partition@50000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x50000 0xfb0000>;
120 };
121 };
122 };
123 };
124
125 &gpio {
126 status = "okay";
127 };
128
129 &gmac0 {
130 mtd-mac-address = <&factory 0xe006>;
131 };
132
133 &switch0 {
134 ports {
135 port@0 {
136 status = "okay";
137 label = "lan1";
138 };
139
140 port@1 {
141 status = "okay";
142 label = "lan2";
143 };
144
145 port@2 {
146 status = "okay";
147 label = "lan3";
148 };
149
150 port@3 {
151 status = "okay";
152 label = "lan4";
153 };
154
155 port@4 {
156 status = "okay";
157 label = "wan";
158 mtd-mac-address = <&factory 0xe006>;
159 mtd-mac-address-increment = <1>;
160 };
161 };
162 };
163
164 &state_default {
165 gpio {
166 groups = "wdt", "rgmii2";
167 function = "gpio";
168 };
169 };
170
171 &pcie {
172 status = "okay";
173
174 pcie0 {
175 wifi@0,0 {
176 compatible = "pci14c3,7603";
177 reg = <0x0000 0 0 0 0>;
178 mediatek,mtd-eeprom = <&factory 0x0000>;
179 ieee80211-freq-limit = <2400000 2500000>;
180 };
181 };
182
183 pcie1 {
184 wifi@0,0 {
185 compatible = "pci14c3,7662";
186 reg = <0x0000 0 0 0 0>;
187 mediatek,mtd-eeprom = <&factory 0x8000>;
188 ieee80211-freq-limit = <5000000 6000000>;
189 led {
190 led-sources = <2>;
191 };
192 };
193 };
194 };