ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-ax1167gr.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc";
8 model = "I-O DATA WN-AX1167GR";
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 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "green:power";
26 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
27 };
28
29 wps {
30 label = "green:wps";
31 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 wps {
45 label = "wps";
46 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_WPS_BUTTON>;
48 };
49
50 auto {
51 label = "auto";
52 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
53 linux,code = <BTN_0>;
54 linux,input-type = <EV_SW>;
55 };
56
57 custom {
58 label = "custom";
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 linux,input-type = <EV_SW>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "Bootloader";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "Config";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 iNIC_rf: partition@50000 {
98 label = "iNIC_rf";
99 reg = <0x50000 0x10000>;
100 read-only;
101 };
102
103 partition@60000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x60000 0xf30000>;
107 };
108
109 partition@f90000 {
110 label = "Key";
111 reg = <0xf90000 0x10000>;
112 read-only;
113 };
114
115 partition@fa0000 {
116 label = "backup";
117 reg = <0xfa0000 0x10000>;
118 read-only;
119 };
120
121 partition@fb0000 {
122 label = "storage";
123 reg = <0xfb0000 0x50000>;
124 read-only;
125 };
126 };
127 };
128 };
129
130 &gmac0 {
131 mtd-mac-address = <&iNIC_rf 0x4>;
132 };
133
134 &switch0 {
135 ports {
136 port@0 {
137 status = "okay";
138 label = "wan";
139 mtd-mac-address = <&factory 0x4>;
140 mtd-mac-address-increment = <1>;
141 };
142
143 port@1 {
144 status = "okay";
145 label = "lan4";
146 };
147
148 port@2 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@3 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@4 {
159 status = "okay";
160 label = "lan1";
161 };
162 };
163 };
164
165 &state_default {
166 gpio {
167 groups = "uart2", "uart3", "jtag";
168 function = "gpio";
169 };
170 };
171
172 &pcie {
173 status = "okay";
174 };
175
176 &pcie0 {
177 mt76@0,0 {
178 reg = <0x0000 0 0 0 0>;
179 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
180 };
181 };
182
183 &pcie1 {
184 mt76@0,0 {
185 reg = <0x0000 0 0 0 0>;
186 mediatek,mtd-eeprom = <&factory 0x0>;
187 ieee80211-freq-limit = <5000000 6000000>;
188 };
189 };
190
191 &xhci {
192 status = "disabled";
193 };