ramips: improve Xiaomi mi-mini indications
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_etisalat_s3.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "etisalat,s3", "mediatek,mt7621-soc";
11 model = "Etisalat S3";
12
13 aliases {
14 label-mac-device = &gmac0;
15
16 led-boot = &led_status_green;
17 led-failsafe = &led_status_red;
18 led-running = &led_status_green;
19 led-upgrade = &led_status_red;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led-0 {
26 label = "blue:wan";
27 color = <LED_COLOR_ID_BLUE>;
28 function = LED_FUNCTION_WAN;
29 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
30 };
31
32 led_status_green: led-1 {
33 label = "green:status";
34 color = <LED_COLOR_ID_GREEN>;
35 function = LED_FUNCTION_STATUS;
36 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
37 };
38
39 led_status_red: led-2 {
40 label = "red:status";
41 color = <LED_COLOR_ID_RED>;
42 function = LED_FUNCTION_STATUS;
43 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62
63 ubi-concat {
64 compatible = "mtd-concat";
65 devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "ubi";
74 reg = <0x0 0x4f80000>;
75 };
76 };
77 };
78 };
79
80 &nand {
81 status = "okay";
82
83 partitions {
84 compatible = "sercomm,sc-partitions", "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x100000>;
91 sercomm,scpart-id = <0>;
92 read-only;
93 };
94
95 partition@100000 {
96 label = "dynamic partition map";
97 reg = <0x100000 0x100000>;
98 sercomm,scpart-id = <1>;
99 read-only;
100 };
101
102 factory: partition@200000 {
103 label = "Factory";
104 reg = <0x200000 0x100000>;
105 sercomm,scpart-id = <2>;
106 read-only;
107
108 compatible = "nvmem-cells";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 macaddr_factory_21000: macaddr@21000 {
113 reg = <0x21000 0x6>;
114 };
115 };
116
117 partition@300000 {
118 label = "Boot Flag";
119 reg = <0x300000 0x100000>;
120 sercomm,scpart-id = <3>;
121 };
122
123 partition@400000 {
124 label = "kernel";
125 reg = <0x400000 0x600000>;
126 sercomm,scpart-id = <4>;
127 };
128
129 partition@a00000 {
130 label = "Kernel 2";
131 reg = <0xa00000 0x600000>;
132 sercomm,scpart-id = <5>;
133 read-only;
134 };
135
136 ubiconcat0: partition@1000000 {
137 label = "File System 1";
138 reg = <0x1000000 0x2000000>;
139 sercomm,scpart-id = <6>;
140 };
141
142 partition@3000000 {
143 label = "File System 2";
144 reg = <0x3000000 0x2000000>;
145 sercomm,scpart-id = <7>;
146 read-only;
147 };
148
149 ubiconcat1: partition@5000000 {
150 label = "Configuration/log";
151 reg = <0x5000000 0x1400000>;
152 sercomm,scpart-id = <8>;
153 };
154
155 ubiconcat2: partition@6400000 {
156 label = "application tmp buffer (Ftool)";
157 reg = <0x6400000 0x1b80000>;
158 sercomm,scpart-id = <9>;
159 };
160 };
161 };
162
163 &pcie {
164 status = "okay";
165 };
166
167 &pcie0 {
168 wifi@0,0 {
169 compatible = "mediatek,mt76";
170 reg = <0x0000 0 0 0 0>;
171 mediatek,mtd-eeprom = <&factory 0x8000>;
172 ieee80211-freq-limit = <5000000 6000000>;
173
174 nvmem-cells = <&macaddr_factory_21000>;
175 nvmem-cell-names = "mac-address";
176 mac-address-increment = <(3)>;
177 };
178 };
179
180 &pcie1 {
181 wifi@0,0 {
182 compatible = "mediatek,mt76";
183 reg = <0x0000 0 0 0 0>;
184 mediatek,mtd-eeprom = <&factory 0x0>;
185 ieee80211-freq-limit = <2400000 2500000>;
186
187 nvmem-cells = <&macaddr_factory_21000>;
188 nvmem-cell-names = "mac-address";
189 mac-address-increment = <(2)>;
190 };
191 };
192
193 &gmac0 {
194 nvmem-cells = <&macaddr_factory_21000>;
195 nvmem-cell-names = "mac-address";
196 };
197
198 &gmac1 {
199 status = "okay";
200 label = "wan";
201 phy-handle = <&ethphy0>;
202
203 nvmem-cells = <&macaddr_factory_21000>;
204 nvmem-cell-names = "mac-address";
205 mac-address-increment = <(11)>;
206 };
207
208 &mdio {
209 ethphy0: ethernet-phy@0 {
210 reg = <0>;
211 };
212 };
213
214 &switch0 {
215 ports {
216 port@1 {
217 status = "okay";
218 label = "lan1";
219 };
220
221 port@2 {
222 status = "okay";
223 label = "lan2";
224 };
225
226 port@3 {
227 status = "okay";
228 label = "lan3";
229 };
230
231 port@4 {
232 status = "okay";
233 label = "lan4";
234 };
235 };
236 };
237
238 &uartlite3 {
239 status = "okay";
240 };
241
242 &state_default {
243 gpio {
244 groups = "i2c", "jtag";
245 function = "gpio";
246 };
247 };