ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_eap235-wall-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,eap235-wall-v1", "mediatek,mt7621-soc";
11 model = "TP-Link EAP235-Wall v1";
12
13 aliases {
14 label-mac-device = &gmac0;
15 led-boot = &led_status;
16 led-failsafe = &led_status;
17 led-running = &led_status;
18 led-upgrade = &led_status;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status: status {
25 label = "white:status";
26 color = <LED_COLOR_ID_WHITE>;
27 function = LED_FUNCTION_STATUS;
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 led {
36 label = "led";
37 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_LIGHTS_TOGGLE>;
39 };
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47
48 gpio-export {
49 compatible = "gpio-export";
50
51 poe_passthrough {
52 gpio-export,name = "poe-passthrough";
53 gpio-export,output = <0>;
54 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <20000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x00000 0x80000>;
75 read-only;
76 };
77
78 partition@80000 {
79 label = "partition-table";
80 reg = <0x80000 0x10000>;
81 read-only;
82 };
83
84 info: partition@90000 {
85 label = "product-info";
86 reg = <0x90000 0x10000>;
87 read-only;
88 };
89
90 partition@a0000 {
91 compatible = "tplink,firmware";
92 label = "firmware";
93 reg = <0x0a0000 0xd20000>;
94 };
95
96 partition@dc0000 {
97 label = "user-config";
98 reg = <0xdc0000 0x030000>;
99 read-only;
100 };
101
102 /* 0xdf0000 - 0xf30000 unused */
103
104 partition@f30000 {
105 label = "mutil-log";
106 reg = <0xf30000 0x080000>;
107 read-only;
108 };
109
110 partition@fb0000 {
111 label = "oops";
112 reg = <0xfb0000 0x040000>;
113 read-only;
114 };
115
116 radio: partition@ff0000 {
117 label = "radio";
118 reg = <0xff0000 0x010000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &state_default {
126 gpio {
127 groups = "uart2", "uart3";
128 function = "gpio";
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &pcie0 {
137 wifi@0,0 {
138 reg = <0x0000 0 0 0 0>;
139 mediatek,mtd-eeprom = <&radio 0x0>;
140 mtd-mac-address = <&info 0x8>;
141 };
142 };
143
144 &pcie1 {
145 wifi@0,0 {
146 reg = <0x0000 0 0 0 0>;
147 mediatek,mtd-eeprom = <&radio 0x8000>;
148 ieee80211-freq-limit = <5000000 6000000>;
149 mtd-mac-address = <&info 0x8>;
150 mtd-mac-address-increment = <1>;
151 };
152 };
153
154 &gmac0 {
155 mtd-mac-address = <&info 0x8>;
156 };
157
158 &switch0 {
159 ports {
160 port@0 {
161 status = "okay";
162 label = "lan0";
163 };
164
165 port@1 {
166 status = "okay";
167 label = "lan3";
168 };
169
170 port@2 {
171 status = "okay";
172 label = "lan2";
173 };
174
175 port@3 {
176 status = "okay";
177 label = "lan1";
178 };
179 };
180 };