ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_afoundry_ew1200.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
8 model = "EW1200";
9
10 aliases {
11 led-boot = &led_run;
12 led-failsafe = &led_run;
13 led-running = &led_run;
14 led-upgrade = &led_run;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led_run: run {
31 label = "green:run";
32 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
33 };
34
35 usb {
36 label = "green:usb";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
39 linux,default-trigger = "usbport";
40 };
41 };
42 };
43
44 &sdhci {
45 status = "okay";
46 };
47
48 &spi0 {
49 status = "okay";
50
51 flash@0 {
52 compatible = "jedec,spi-nor";
53 reg = <0>;
54 spi-max-frequency = <10000000>;
55
56 partitions {
57 compatible = "fixed-partitions";
58 #address-cells = <1>;
59 #size-cells = <1>;
60
61 partition@0 {
62 label = "u-boot";
63 reg = <0x0 0x30000>;
64 read-only;
65 };
66
67 partition@30000 {
68 label = "u-boot-env";
69 reg = <0x30000 0x10000>;
70 read-only;
71 };
72
73 factory: partition@40000 {
74 label = "factory";
75 reg = <0x40000 0x10000>;
76 read-only;
77 };
78
79 partition@50000 {
80 compatible = "denx,uimage";
81 label = "firmware";
82 reg = <0x50000 0xfb0000>;
83 };
84 };
85 };
86 };
87
88 &pcie {
89 status = "okay";
90 };
91
92 &pcie0 {
93 mt76@0,0 {
94 reg = <0x0000 0 0 0 0>;
95 mediatek,mtd-eeprom = <&factory 0x8000>;
96 ieee80211-freq-limit = <5000000 6000000>;
97 };
98 };
99
100 &pcie1 {
101 mt76@0,0 {
102 reg = <0x0000 0 0 0 0>;
103 mediatek,mtd-eeprom = <&factory 0x0000>;
104 ieee80211-freq-limit = <2400000 2500000>;
105 };
106 };
107
108 &gmac0 {
109 mtd-mac-address = <&factory 0xe000>;
110 };
111
112 &switch0 {
113 ports {
114 port@0 {
115 status = "okay";
116 label = "lan1";
117 };
118
119 port@1 {
120 status = "okay";
121 label = "lan2";
122 };
123
124 port@2 {
125 status = "okay";
126 label = "lan3";
127 };
128
129 port@3 {
130 status = "okay";
131 label = "lan4";
132 };
133
134 port@4 {
135 status = "okay";
136 label = "wan";
137 mtd-mac-address = <&factory 0xe000>;
138 mtd-mac-address-increment = <1>;
139 };
140 };
141 };
142
143 &state_default {
144 gpio {
145 groups = "i2c", "uart3", "wdt";
146 function = "gpio";
147 };
148 };