ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-2533ghbk-i.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
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-2533ghbk-i", "mediatek,mt7621-soc";
10 model = "ELECOM WRC-2533GHBK-I";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wps {
23 label = "red:wps";
24 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
25 };
26
27 led_power: power {
28 label = "white:power";
29 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
30 };
31
32 wlan2g {
33 label = "white:wlan2g";
34 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
35 linux,default-trigger = "phy0radio";
36 };
37
38 wlan5g {
39 label = "white:wlan5g";
40 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
41 linux,default-trigger = "phy1radio";
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 auto {
49 label = "auto";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 linux,code = <BTN_0>;
52 linux,input-type = <EV_SW>;
53 };
54
55 reset {
56 label = "reset";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60
61 wps {
62 label = "wps";
63 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_WPS_BUTTON>;
65 };
66 };
67 };
68
69 &spi0 {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <40000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98 };
99
100 partition@50000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x50000 0x9a0000>;
104 };
105
106 partition@9f0000 {
107 label = "TM_1";
108 reg = <0x9f0000 0x200000>;
109 read-only;
110 };
111
112 partition@bf0000 {
113 label = "TM_2";
114 reg = <0xbf0000 0x200000>;
115 read-only;
116 };
117
118 partition@df0000 {
119 label = "manufacture";
120 reg = <0xdf0000 0x180000>;
121 read-only;
122 };
123
124 partition@f70000 {
125 label = "backup";
126 reg = <0xf70000 0x10000>;
127 read-only;
128 };
129
130 partition@f80000 {
131 label = "storage";
132 reg = <0xf80000 0x80000>;
133 read-only;
134 };
135 };
136 };
137 };
138
139 &switch0 {
140 ports {
141 port@0 {
142 status = "okay";
143 label = "wan";
144 };
145
146 port@1 {
147 status = "okay";
148 label = "lan4";
149 };
150
151 port@2 {
152 status = "okay";
153 label = "lan3";
154 };
155
156 port@3 {
157 status = "okay";
158 label = "lan2";
159 };
160
161 port@4 {
162 status = "okay";
163 label = "lan1";
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "uart2", "uart3", "jtag", "wdt";
171 function = "gpio";
172 };
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &pcie0 {
180 wifi@0,0 {
181 compatible = "mediatek,mt76";
182 reg = <0x0000 0 0 0 0>;
183 mediatek,mtd-eeprom = <&factory 0x0>;
184 ieee80211-freq-limit = <2400000 2500000>;
185 };
186 };
187
188 &pcie1 {
189 wifi@0,0 {
190 compatible = "mediatek,mt76";
191 reg = <0x0000 0 0 0 0>;
192 mediatek,mtd-eeprom = <&factory 0x8000>;
193 ieee80211-freq-limit = <5000000 6000000>;
194 };
195 };
196
197 &xhci {
198 status = "disabled";
199 };