ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_wavlink_wl-wn531a6.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 = "wavlink,wl-wn531a6", "mediatek,mt7621-soc";
10 model = "Wavlink WL-WN531A6";
11
12 aliases {
13 led-boot = &led_status_red;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_red;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "Reset Button";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27
28 touch { /* RH6015C touch sensor -> GPIO 14 */
29 label = "Touch Button";
30 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
31 linux,code = <BTN_0>;
32 };
33
34 turbo {
35 label = "Turbo Button";
36 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
37 linux,code = <BTN_1>;
38 };
39
40 wps {
41 label = "WPS Button";
42 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_WPS_BUTTON>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 led_status_blue: status_blue {
51 label = "blue:power";
52 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
53 };
54
55 led_status_red: status_red {
56 label = "red:power";
57 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
58 };
59
60 wifi2g {
61 label = "blue:wifi2g";
62 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "phy0tpt";
64 };
65 };
66 };
67
68 &i2c {
69 status = "okay";
70 };
71
72 &spi0 {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <40000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "u-boot";
87 reg = <0x0 0x30000>;
88 read-only;
89 };
90
91 partition@30000 {
92 label = "config";
93 reg = <0x30000 0x10000>;
94 read-only;
95 };
96
97 factory: partition@40000 {
98 label = "factory";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x50000 0xeb0000>;
107 };
108
109 partition@f00000 {
110 label = "vendor";
111 reg = <0xf00000 0x100000>;
112 read-only;
113 };
114 };
115 };
116 };
117
118 &pcie {
119 status = "okay";
120 };
121
122 &pcie0 {
123 mt76@0,0 {
124 compatible = "mediatek,mt76";
125 reg = <0x0000 0 0 0 0>;
126 mediatek,mtd-eeprom = <&factory 0x0>;
127 ieee80211-freq-limit = <2400000 2500000>;
128 };
129 };
130
131 &pcie1 {
132 mt76@0,0 {
133 compatible = "mediatek,mt76";
134 reg = <0x0000 0 0 0 0>;
135 mediatek,mtd-eeprom = <&factory 0x8000>;
136 ieee80211-freq-limit = <5000000 6000000>;
137 };
138 };
139
140 &gmac0 {
141 mtd-mac-address = <&factory 0xe000>;
142 };
143
144 &switch0 {
145 ports {
146 port@0 {
147 status = "okay";
148 label = "lan1";
149 };
150
151 port@1 {
152 status = "okay";
153 label = "lan2";
154 };
155
156 port@2 {
157 status = "okay";
158 label = "lan3";
159 };
160
161 port@3 {
162 status = "okay";
163 label = "lan4";
164 };
165
166 port@4 {
167 status = "okay";
168 label = "wan";
169 mtd-mac-address = <&factory 0xe006>;
170 };
171 };
172 };
173
174 &state_default {
175 gpio {
176 groups = "rgmii2", "jtag", "wdt";
177 function = "gpio";
178 };
179 };
180
181 &uartlite2 {
182 status = "okay";
183 };