ramips: fix EEPROM size for I-O DATA WN-DEAX1800GR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_ea7xxx.dtsi
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 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 wan_green {
40 label = "green:wan";
41 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
42 };
43
44 lan1_green {
45 label = "green:lan1";
46 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
47 };
48
49 lan2_green {
50 label = "green:lan2";
51 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
52 };
53
54 lan3_green {
55 label = "green:lan3";
56 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
57 };
58
59 lan4_green {
60 label = "green:lan4";
61 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
62 };
63
64 led_power: power {
65 label = "white:power";
66 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
67 };
68
69 wps {
70 label = "green:wps";
71 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
72 };
73 };
74 };
75
76 &nand {
77 status = "okay";
78
79 mediatek,bbt;
80 mediatek,bmt-remap-range =
81 <0x180000 0x580000>,
82 <0x2980000 0x2d80000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "boot";
91 reg = <0x0 0x80000>;
92 read-only;
93 };
94
95 partition@80000 {
96 label = "u_env";
97 reg = <0x80000 0x40000>;
98 };
99
100 factory: partition@c0000 {
101 label = "factory";
102 reg = <0xc0000 0x40000>;
103 read-only;
104 };
105
106 partition@100000 {
107 label = "s_env";
108 reg = <0x100000 0x40000>;
109 };
110
111 partition@140000 {
112 label = "devinfo";
113 reg = <0x140000 0x40000>;
114 read-only;
115 };
116
117 partition@180000 {
118 label = "kernel";
119 reg = <0x180000 0x400000>;
120 };
121
122 partition@580000 {
123 label = "ubi";
124 reg = <0x580000 0x2400000>;
125 };
126
127 partition@2980000 {
128 label = "alt_kernel";
129 reg = <0x2980000 0x400000>;
130 read-only;
131 };
132
133 partition@2d80000 {
134 label = "alt_rootfs";
135 reg = <0x2d80000 0x2400000>;
136 read-only;
137 };
138
139 partition@5180000 {
140 label = "sysdiag";
141 reg = <0x5180000 0x100000>;
142 read-only;
143 };
144
145 partition@5280000 {
146 label = "syscfg";
147 reg = <0x5280000 0x2d00000>;
148 read-only;
149 };
150 };
151 };
152
153 &state_default {
154 gpio {
155 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
156 function = "gpio";
157 };
158 };
159
160 &pcie {
161 status = "okay";
162 };
163
164 &pcie0 {
165 mt76@0,0 {
166 compatible = "mediatek,mt76";
167 reg = <0x0000 0 0 0 0>;
168 mediatek,mtd-eeprom = <&factory 0x0000>;
169 };
170 };
171
172 &pcie1 {
173 mt76@0,0 {
174 compatible = "mediatek,mt76";
175 reg = <0x0000 0 0 0 0>;
176 mediatek,mtd-eeprom = <&factory 0x8000>;
177 };
178 };
179
180 &gmac1 {
181 status = "okay";
182 label = "wan";
183 phy-handle = <&ethphy0>;
184 };
185
186 &mdio {
187 ethphy0: ethernet-phy@0 {
188 reg = <0>;
189 };
190 };
191
192 &switch0 {
193 ports {
194 port@1 {
195 status = "okay";
196 label = "lan1";
197 };
198
199 port@2 {
200 status = "okay";
201 label = "lan2";
202 };
203
204 port@3 {
205 status = "okay";
206 label = "lan3";
207 };
208
209 port@4 {
210 status = "okay";
211 label = "lan4";
212 };
213 };
214 };