ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_edimax_rx21s.dtsi
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 aliases {
10 label-mac-device = &gmac0;
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_power: led_1 {
37 label = "red:led1";
38 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
39 };
40
41 led_2 {
42 label = "red:led2";
43 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
44 };
45
46 led_3 {
47 label = "red:led3";
48 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
49 };
50
51 led_4 {
52 label = "red:led4";
53 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <40000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 read-only;
75 };
76
77 partition@30000 {
78 label = "u-boot-env";
79 reg = <0x30000 0x10000>;
80 read-only;
81 };
82
83 factory: partition@40000 {
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 read-only;
87 };
88
89 partition@50000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x50000 0xfb0000>;
93 };
94 };
95 };
96 };
97
98 &pcie {
99 status = "okay";
100 };
101
102 &pcie0 {
103 wifi0: wifi@0,0 {
104 compatible = "mediatek,mt76";
105 reg = <0x0000 0 0 0 0>;
106 mediatek,mtd-eeprom = <&factory 0x0000>;
107 ieee80211-freq-limit = <2400000 2500000>;
108 };
109 };
110
111 &pcie1 {
112 wifi1: wifi@0,0 {
113 compatible = "mediatek,mt76";
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x8000>;
116 ieee80211-freq-limit = <5000000 6000000>;
117 };
118 };
119
120 &gmac0 {
121 mtd-mac-address = <&factory 0x4>;
122 };
123
124 &switch0 {
125 ports {
126 port@0 {
127 status = "okay";
128 label = "wan";
129 };
130
131 port@1 {
132 status = "okay";
133 label = "lan4";
134 };
135
136 port@2 {
137 status = "okay";
138 label = "lan3";
139 };
140
141 port@3 {
142 status = "okay";
143 label = "lan2";
144 };
145
146 port@4 {
147 status = "okay";
148 label = "lan1";
149 };
150 };
151 };
152
153 &state_default {
154 gpio {
155 groups = "uart3", "uart2", "jtag", "wdt";
156 function = "gpio";
157 };
158 };
159
160 &xhci {
161 status = "disabled";
162 };