ramips: dts: mt7628an: reset FE and ESW cores together
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zyxel_wsm20.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
8 / {
9 compatible = "zyxel,wsm20", "mediatek,mt7621-soc";
10 model = "ZyXEL WSM20";
11
12 aliases {
13 led-boot = &led_system_white;
14 led-failsafe = &led_system_red;
15 led-running = &led_system_white;
16 led-upgrade = &led_system_red;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs-override = "console=ttyS0,115200n1";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_system_white: led-0 {
28 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
29 label = "white:system";
30 };
31
32 led_system_red: led-1 {
33 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
34 label = "red:system";
35 };
36
37 led-2 {
38 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
39 label = "green:led1";
40 };
41
42 led-3 {
43 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
44 label = "white:led2";
45 };
46
47 led-4 {
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 label = "green:led3";
50 };
51
52 led-5 {
53 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
54 label = "red:led4";
55 };
56
57 led-6 {
58 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
59 label = "white:led5";
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys";
65
66 led {
67 label = "led";
68 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_LIGHTS_TOGGLE>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77
78 wps {
79 label = "wps";
80 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_WPS_BUTTON>;
82 };
83 };
84 };
85
86 &nand {
87 status = "okay";
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 reg = <0x0 0x100000>;
96 label = "Bootloader";
97 read-only;
98 };
99
100 partition@100000 {
101 reg = <0x100000 0x100000>;
102 label = "Config";
103 };
104
105 factory: partition@200000 {
106 reg = <0x200000 0x1c0000>;
107 label = "Factory";
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 macaddr_factory_1fdfa: macaddr@1fdfa {
116 reg = <0x1fdfa 0x6>;
117 };
118
119 macaddr_factory_1fdf4: macaddr@1fdf4 {
120 reg = <0x1fdf4 0x6>;
121 };
122 };
123 };
124
125 partition@3c0000 {
126 reg = <0x3c0000 0x2800000>;
127 label = "firmware";
128
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "kernel";
135 reg = <0x0 0x800000>;
136 };
137
138 partition@800000 {
139 label = "ubi";
140 reg = <0x800000 0x2000000>;
141 };
142 };
143
144 partition@2bc0000 {
145 reg = <0x2bc0000 0x2800000>;
146 label = "Kernel2";
147 };
148
149 partition@53c0000 {
150 reg = <0x53c0000 0x100000>;
151 label = "persist";
152 };
153
154 partition@54c0000 {
155 reg = <0x54c0000 0x400000>;
156 label = "rootfs_data";
157 read-only;
158 };
159
160 partition@58C0000 {
161 reg = <0x58c0000 0x25c0000>;
162 label = "app";
163 read-only;
164 };
165
166 partition@7e80000 {
167 reg = <0x7e80000 0x100000>;
168 label = "crt";
169 read-only;
170 };
171 };
172 };
173
174 &gmac0 {
175 nvmem-cells = <&macaddr_factory_1fdfa>;
176 nvmem-cell-names = "mac-address";
177 };
178
179 &gmac1 {
180 status = "okay";
181 label = "wan";
182 phy-handle = <&ethphy0>;
183
184 nvmem-cells = <&macaddr_factory_1fdf4>;
185 nvmem-cell-names = "mac-address";
186 };
187
188 &mdio {
189 ethphy0: ethernet-phy@0 {
190 reg = <0>;
191 };
192 };
193
194 &pcie {
195 status = "okay";
196 };
197
198 &pcie1 {
199 wifi@0,0 {
200 compatible = "mediatek,mt76";
201 reg = <0x0000 0 0 0 0>;
202 mediatek,mtd-eeprom = <&factory 0x0>;
203 mediatek,disable-radar-background;
204 };
205 };
206
207 &pcie2 {
208 status = "disabled";
209 };
210
211 &switch0 {
212 ports {
213 port@1 {
214 status = "okay";
215 label = "lan3";
216 };
217 port@2 {
218 status = "okay";
219 label = "lan2";
220 };
221 port@3 {
222 status = "okay";
223 label = "lan1";
224 };
225 };
226 };
227
228 &state_default {
229 gpio {
230 groups = "i2c", "uart3", "jtag", "wdt";
231 function = "gpio";
232 };
233 };