ramips: fix EEPROM size for I-O DATA WN-DEAX1800GR
[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
111 partition@3c0000 {
112 reg = <0x3c0000 0x2800000>;
113 label = "firmware";
114
115 compatible = "fixed-partitions";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 partition@0 {
120 label = "kernel";
121 reg = <0x0 0x800000>;
122 };
123
124 partition@800000 {
125 label = "ubi";
126 reg = <0x800000 0x2000000>;
127 };
128 };
129
130 partition@2bc0000 {
131 reg = <0x2bc0000 0x2800000>;
132 label = "Kernel2";
133 };
134
135 partition@53c0000 {
136 reg = <0x53c0000 0x100000>;
137 label = "persist";
138 };
139
140 partition@54c0000 {
141 reg = <0x54c0000 0x400000>;
142 label = "rootfs_data";
143 read-only;
144 };
145
146 partition@58C0000 {
147 reg = <0x58c0000 0x25c0000>;
148 label = "app";
149 read-only;
150 };
151
152 partition@7e80000 {
153 reg = <0x7e80000 0x100000>;
154 label = "crt";
155 read-only;
156 };
157 };
158 };
159
160 &gmac0 {
161 nvmem-cells = <&macaddr_factory_1fdfa>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &gmac1 {
166 status = "okay";
167 label = "wan";
168 phy-handle = <&ethphy0>;
169
170 nvmem-cells = <&macaddr_factory_1fdf4>;
171 nvmem-cell-names = "mac-address";
172 };
173
174 &mdio {
175 ethphy0: ethernet-phy@0 {
176 reg = <0>;
177 };
178 };
179
180 &pcie {
181 status = "okay";
182 };
183
184 &pcie1 {
185 wifi@0,0 {
186 compatible = "mediatek,mt76";
187 reg = <0x0000 0 0 0 0>;
188 mediatek,mtd-eeprom = <&factory 0x0>;
189 mediatek,disable-radar-background;
190 };
191 };
192
193 &pcie2 {
194 status = "disabled";
195 };
196
197 &switch0 {
198 ports {
199 port@1 {
200 status = "okay";
201 label = "lan3";
202 };
203 port@2 {
204 status = "okay";
205 label = "lan2";
206 };
207 port@3 {
208 status = "okay";
209 label = "lan1";
210 };
211 };
212 };
213
214 &state_default {
215 gpio {
216 groups = "i2c", "uart3", "jtag", "wdt";
217 function = "gpio";
218 };
219 };
220
221 &factory {
222 compatible = "nvmem-cells";
223 #address-cells = <1>;
224 #size-cells = <1>;
225
226 macaddr_factory_1fdfa: macaddr@1fdfa {
227 reg = <0x1fdfa 0x6>;
228 };
229
230 macaddr_factory_1fdf4: macaddr@1fdf4 {
231 reg = <0x1fdf4 0x6>;
232 };
233 };