1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
10 compatible = "tplink,ec330-g5u-v1", "mediatek,mt7621-soc";
11 model = "TP-Link EC330-G5u v1";
14 label-mac-device = &gmac0;
16 led-boot = &led_power;
17 led-failsafe = &led_power;
18 led-running = &led_power;
19 led-upgrade = &led_power;
23 bootargs = "console=ttyS0,115200";
27 compatible = "gpio-leds";
30 color = <LED_COLOR_ID_BLUE>;
31 function = LED_FUNCTION_USB;
32 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
33 trigger-sources = <&xhci_ehci_port1>;
34 linux,default-trigger = "usbport";
38 color = <LED_COLOR_ID_BLUE>;
39 function = LED_FUNCTION_WPS;
40 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
44 color = <LED_COLOR_ID_BLUE>;
45 function = LED_FUNCTION_LAN;
46 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
50 color = <LED_COLOR_ID_AMBER>;
51 function = LED_FUNCTION_WAN;
52 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
56 color = <LED_COLOR_ID_BLUE>;
57 function = LED_FUNCTION_WAN;
58 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
62 color = <LED_COLOR_ID_BLUE>;
63 function = LED_FUNCTION_WLAN;
64 function-enumerator = <50>;
65 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
66 linux,default-trigger = "phy1tpt";
70 color = <LED_COLOR_ID_BLUE>;
71 function = LED_FUNCTION_WLAN;
72 function-enumerator = <24>;
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "phy0tpt";
78 color = <LED_COLOR_ID_BLUE>;
79 function = LED_FUNCTION_POWER;
80 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
85 compatible = "gpio-keys";
89 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
90 debounce-interval = <60>;
91 linux,code = <KEY_LIGHTS_TOGGLE>;
95 label = "wifi on/off";
96 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
97 debounce-interval = <60>;
98 linux,code = <KEY_RFKILL>;
103 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
104 debounce-interval = <60>;
105 linux,code = <KEY_RESTART>;
110 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
111 debounce-interval = <60>;
112 linux,code = <KEY_WPS_BUTTON>;
117 compatible = "gpio-export";
120 gpio-export,name = "led-light";
121 gpio-export,output = <0>;
122 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
127 compatible = "mtd-concat";
128 devices = <&ubiconcat0 &ubiconcat1>;
131 compatible = "fixed-partitions";
132 #address-cells = <1>;
137 reg = <0x0 0x3c00000>;
147 compatible = "fixed-partitions";
148 #address-cells = <1>;
153 reg = <0x0 0x400000>;
156 compatible = "fixed-partitions";
157 #address-cells = <1>;
161 label = "u-boot-first";
167 label = "u-boot-main";
168 reg = <0x20000 0x40000>;
173 label = "u-boot-main-reserve";
174 reg = <0x60000 0x40000>;
181 reg = <0x400000 0x3000000>;
183 compatible = "fixed-partitions";
184 #address-cells = <1>;
189 reg = <0x0 0x400000>;
192 ubiconcat0: partition@400000 {
194 reg = <0x400000 0x2c00000>;
200 reg = <0x3400000 0x3000000>;
204 ubiconcat1: partition@6400000 {
206 reg = <0x6400000 0x1000000>;
210 label = "u-boot-env";
211 reg = <0x7400000 0x400000>;
216 reg = <0x7800000 0x400000>;
220 compatible = "fixed-layout";
221 #address-cells = <1>;
224 eeprom_factory_8000: eeprom@8000 {
225 reg = <0x8000 0x4da8>;
228 eeprom_factory_14000: eeprom@14000 {
229 reg = <0x14000 0x4da8>;
232 macaddr_factory_165: macaddr@165 {
233 compatible = "mac-base";
235 #nvmem-cell-cells = <1>;
240 partition@0_wholeflash {
241 label = "wholeflash";
242 reg = <0x0 0x7f80000>;
254 compatible = "mediatek,mt76";
255 reg = <0x0000 0 0 0 0>;
256 ieee80211-freq-limit = <2400000 2500000>;
257 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_165 0>;
258 nvmem-cell-names = "eeprom", "mac-address";
264 compatible = "mediatek,mt76";
265 reg = <0x0000 0 0 0 0>;
266 ieee80211-freq-limit = <5000000 6000000>;
267 nvmem-cells = <&eeprom_factory_14000>, <&macaddr_factory_165 2>;
268 nvmem-cell-names = "eeprom", "mac-address";
273 nvmem-cells = <&macaddr_factory_165 0>;
274 nvmem-cell-names = "mac-address";
280 phy-handle = <ðphy0>;
282 nvmem-cells = <&macaddr_factory_165 1>;
283 nvmem-cell-names = "mac-address";
287 ethphy0: ethernet-phy@0 {
318 groups = "i2c", "jtag", "uart2", "uart3", "wdt";