ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mtc_wr1201.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "mtc,wr1201", "mediatek,mt7621-soc";
8 model = "MTC Wireless Router WR1201";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &gmac0;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 label = "green:power";
23 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
24 };
25
26 usb {
27 label = "green:usb";
28 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
29 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
30 linux,default-trigger = "usbport";
31 };
32
33 eth_link {
34 label = "green:eth_link";
35 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
36 };
37
38 wps {
39 label = "green:wps";
40 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "Bootloader";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "Config";
76 reg = <0x30000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@40000 {
81 label = "factory";
82 reg = <0x40000 0x10000>;
83 read-only;
84 };
85
86 partition@50000 {
87 compatible = "denx,uimage";
88 label = "firmware";
89 reg = <0x50000 0xfa0000>;
90 };
91
92 partition@ff0000 {
93 label = "Second_Config";
94 reg = <0xff0000 0x10000>;
95 read-only;
96 };
97 };
98 };
99 };
100
101 &gmac0 {
102 mtd-mac-address = <&factory 0x4>;
103 };
104
105 &switch0 {
106 ports {
107 port@0 {
108 status = "okay";
109 label = "lan4";
110 };
111
112 port@1 {
113 status = "okay";
114 label = "lan3";
115 };
116
117 port@2 {
118 status = "okay";
119 label = "lan2";
120 };
121
122 port@3 {
123 status = "okay";
124 label = "lan1";
125 };
126
127 port@4 {
128 status = "okay";
129 label = "wan";
130 mtd-mac-address = <&factory 0x4>;
131 mtd-mac-address-increment = <1>;
132 };
133 };
134 };
135
136 &sdhci {
137 status = "okay";
138 };
139
140 &pcie {
141 status = "okay";
142 };
143
144 &pcie0 {
145 wifi@0,0 {
146 reg = <0x0000 0 0 0 0>;
147 mediatek,mtd-eeprom = <&factory 0x8000>;
148 ieee80211-freq-limit = <5000000 6000000>;
149
150 led {
151 led-sources = <2>;
152 led-active-low;
153 };
154 };
155 };
156
157 &pcie1 {
158 wifi@0,0 {
159 reg = <0x0000 0 0 0 0>;
160 mediatek,mtd-eeprom = <&factory 0x0000>;
161 ieee80211-freq-limit = <2400000 2500000>;
162
163 led {
164 led-sources = <2>;
165 led-active-low;
166 };
167 };
168 };
169
170 &state_default {
171 gpio {
172 groups = "rgmii2";
173 function = "gpio";
174 };
175 };