ramips: improve Xiaomi mi-mini indications
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tozed_zlt-s12-pro.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 = "tozed,zlt-s12-pro", "mediatek,mt7621-soc";
11 model = "TOZED ZLT S12 PRO";
12
13 aliases {
14 led-boot = &led_power_blue;
15 led-failsafe = &led_power_yellow;
16 led-running = &led_power_blue;
17 led-upgrade = &led_power_blue;
18 label-mac-device = &wifi1;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led-modem-blue {
29 label = "blue:modem";
30 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
31 };
32
33 led-modem-red {
34 label = "red:modem";
35 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
36 };
37
38 led_power_blue: led-power-blue {
39 label = "blue:power";
40 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
41 };
42
43 led_power_yellow: led-power-yellow {
44 label = "yellow:power";
45 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
46 };
47
48 led-wifi {
49 label = "blue:wifi";
50 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53
54 led-signal1 {
55 label = "blue:signal1";
56 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
57 };
58
59 led-signal2 {
60 label = "blue:signal2";
61 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
62 };
63
64 led-signal3 {
65 label = "blue:signal3";
66 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
67 };
68
69 led-signal4 {
70 label = "blue:signal4";
71 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
72 };
73
74 led-signal5 {
75 label = "blue:signal5";
76 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
77 };
78
79 led-phone {
80 label = "blue:phone";
81 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87
88 button-reset {
89 label = "reset";
90 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RESTART>;
92 };
93
94 button-rfkill {
95 label = "rfkill";
96 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_RFKILL>;
98 };
99
100 button-wps {
101 label = "wps";
102 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
103 linux,code = <KEY_WPS_BUTTON>;
104 };
105 };
106
107 gpio_export {
108 compatible = "gpio-export";
109
110 lt72_ant0 {
111 gpio-export,name = "lt72_ant0";
112 gpio-export,input = <0>;
113 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
114 };
115
116 lt72_ant1 {
117 gpio-export,name = "lt72_ant1";
118 gpio-export,input = <0>;
119 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
120 };
121
122 lt72_power {
123 gpio-export,name = "lt72_power";
124 gpio-export,output = <1>;
125 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
126 };
127 };
128 };
129
130 &spi0 {
131 status = "okay";
132
133 flash@0 {
134 compatible = "jedec,spi-nor";
135 reg = <0>;
136 spi-max-frequency = <10000000>;
137
138 partitions {
139 compatible = "fixed-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 partition@0 {
144 label = "u-boot";
145 reg = <0x0 0x30000>;
146 read-only;
147 };
148
149 partition@30000 {
150 label = "u-boot-env";
151 reg = <0x30000 0x8000>;
152 read-only;
153 };
154
155 // Stock config partition
156 partition@38000 {
157 label = "tozed-conf";
158 reg = <0x38000 0x8000>;
159 read-only;
160 };
161
162 factory: partition@40000 {
163 label = "factory";
164 reg = <0x40000 0x10000>;
165 read-only;
166
167 compatible = "nvmem-cells";
168 #address-cells = <1>;
169 #size-cells = <1>;
170
171 macaddr_factory_e000: macaddr@e000 {
172 reg = <0xe000 0x6>;
173 };
174 };
175
176 partition@50000 {
177 compatible = "denx,uimage";
178 label = "firmware";
179 reg = <0x50000 0xfb0000>;
180 };
181 };
182 };
183 };
184
185 &pcie {
186 status = "okay";
187 };
188
189 &pcie0 {
190 wifi0: mt76@0,0 {
191 compatible = "mediatek,mt76";
192 reg = <0x0000 0 0 0 0>;
193 mediatek,mtd-eeprom = <&factory 0x8000>;
194 ieee80211-freq-limit = <5000000 6000000>;
195 };
196 };
197
198 &pcie1 {
199 wifi1: mt76@0,0 {
200 compatible = "mediatek,mt76";
201 reg = <0x0000 0 0 0 0>;
202 mediatek,mtd-eeprom = <&factory 0x0000>;
203 ieee80211-freq-limit = <2400000 2500000>;
204 };
205 };
206
207 &ethernet {
208 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
209 };
210
211 &gmac0 {
212 nvmem-cells = <&macaddr_factory_e000>;
213 nvmem-cell-names = "mac-address";
214 };
215
216 &switch0 {
217 ports {
218 port@0 {
219 status = "okay";
220 label = "wan";
221 };
222
223 port@1 {
224 status = "okay";
225 label = "lan3";
226 };
227
228 port@2 {
229 status = "okay";
230 label = "lan2";
231 };
232
233 port@4 {
234 status = "okay";
235 label = "lan1";
236 };
237 };
238 };
239
240 &state_default {
241 gpio {
242 groups = "wdt", "rgmii2", "jtag", "uart3";
243 function = "gpio";
244 };
245 };