ramips: TP-link archer A6/C6 device tree updates
[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 compatible = "nvmem-cells";
164 label = "factory";
165 reg = <0x40000 0x10000>;
166 #address-cells = <1>;
167 #size-cells = <1>;
168 read-only;
169
170 eeprom_factory_0: eeprom@0 {
171 reg = <0x0 0x400>;
172 };
173
174 eeprom_factory_8000: eeprom@8000 {
175 reg = <0x8000 0x200>;
176 };
177
178 macaddr_factory_e000: macaddr@e000 {
179 reg = <0xe000 0x6>;
180 };
181 };
182
183 partition@50000 {
184 compatible = "denx,uimage";
185 label = "firmware";
186 reg = <0x50000 0xfb0000>;
187 };
188 };
189 };
190 };
191
192 &pcie {
193 status = "okay";
194 };
195
196 &pcie0 {
197 wifi0: mt76@0,0 {
198 compatible = "mediatek,mt76";
199 reg = <0x0000 0 0 0 0>;
200 nvmem-cells = <&eeprom_factory_8000>;
201 nvmem-cell-names = "eeprom";
202 ieee80211-freq-limit = <5000000 6000000>;
203 };
204 };
205
206 &pcie1 {
207 wifi1: mt76@0,0 {
208 compatible = "mediatek,mt76";
209 reg = <0x0000 0 0 0 0>;
210 nvmem-cells = <&eeprom_factory_0>;
211 nvmem-cell-names = "eeprom";
212 ieee80211-freq-limit = <2400000 2500000>;
213 };
214 };
215
216 &ethernet {
217 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
218 };
219
220 &gmac0 {
221 nvmem-cells = <&macaddr_factory_e000>;
222 nvmem-cell-names = "mac-address";
223 };
224
225 &switch0 {
226 ports {
227 port@0 {
228 status = "okay";
229 label = "wan";
230 };
231
232 port@1 {
233 status = "okay";
234 label = "lan3";
235 };
236
237 port@2 {
238 status = "okay";
239 label = "lan2";
240 };
241
242 port@4 {
243 status = "okay";
244 label = "lan1";
245 };
246 };
247 };
248
249 &state_default {
250 gpio {
251 groups = "wdt", "rgmii2", "jtag", "uart3";
252 function = "gpio";
253 };
254 };