ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_re350-v1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "tplink,re350-v1", "mediatek,mt7621-soc";
8 model = "TP-LINK RE350 v1";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_power: power {
21 label = "blue:power";
22 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
23 };
24
25 wifi2g {
26 label = "blue:wifi2G";
27 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
28 };
29
30 wifi5g {
31 label = "blue:wifi5G";
32 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
33 };
34
35 wps_r {
36 label = "red:wps";
37 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
38 };
39
40 wps_b {
41 label = "blue:wps";
42 gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
43 };
44
45 eth {
46 label = "green:eth_act";
47 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
48 };
49
50 eth2 {
51 label = "green:eth_link";
52 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
53 };
54 };
55
56 keys {
57 compatible = "gpio-keys";
58
59 led {
60 label = "led";
61 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
62 linux,code = <BTN_0>;
63 };
64
65 reset {
66 label = "reset";
67 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
68 linux,code = <KEY_RESTART>;
69 };
70
71 power {
72 label = "power";
73 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_POWER>;
75 };
76
77 wps {
78 label = "wps";
79 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_WPS_BUTTON>;
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 = <10000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x20000>;
101 read-only;
102 };
103
104 partition@20000 {
105 compatible = "tplink,firmware";
106 label = "firmware";
107 reg = <0x20000 0x5e0000>;
108 };
109
110 config: partition@600000 {
111 label = "config";
112 reg = <0x600000 0x50000>;
113 read-only;
114 };
115
116 radio: partition@7f0000 {
117 label = "radio";
118 reg = <0x7f0000 0x10000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &pcie {
126 status = "okay";
127 };
128
129 &pcie0 {
130 mt76@0,0 {
131 reg = <0x0000 0 0 0 0>;
132 mediatek,mtd-eeprom = <&radio 0x0>;
133 mtd-mac-address = <&config 0x10008>;
134 mtd-mac-address-increment = <1>;
135 };
136 };
137
138 &pcie1 {
139 mt76@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 mediatek,mtd-eeprom = <&radio 0x8000>;
142 ieee80211-freq-limit = <5000000 6000000>;
143 mtd-mac-address = <&config 0x10008>;
144 mtd-mac-address-increment = <2>;
145 };
146 };
147
148 &gmac0 {
149 mtd-mac-address = <&config 0x10008>;
150 };
151
152 &switch0 {
153 ports {
154 port@0 {
155 status = "okay";
156 label = "lan";
157 };
158 };
159 };
160
161 &state_default {
162 gpio {
163 groups = "rgmii2", "wdt";
164 function = "gpio";
165 };
166 };