ramips: add support for Linksys EA7500 v2
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_ea7500-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "linksys,ea7500-v2", "mediatek,mt7621-soc";
11 model = "Linksys EA7500 v2";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 wan_green {
28 label = "ea7500-v2:green:wan";
29 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
30 };
31
32 lan1_green {
33 label = "ea7500-v2:green:lan1";
34 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
35 };
36
37 lan2_green {
38 label = "ea7500-v2:green:lan2";
39 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
40 };
41
42 lan3_green {
43 label = "ea7500-v2:green:lan3";
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 };
46
47 lan4_green {
48 label = "ea7500-v2:green:lan4";
49 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
50 };
51
52 led_power: power {
53 label = "ea7500-v2:white:power";
54 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
55 };
56
57 wps {
58 label = "ea7500-v2:green:wps";
59 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys";
65
66 wps {
67 label = "wps";
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_WPS_BUTTON>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77 };
78 };
79
80 &nand {
81 status = "okay";
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "boot";
90 reg = <0x0 0x80000>;
91 read-only;
92 };
93
94 partition@80000 {
95 label = "u_env";
96 reg = <0x80000 0x40000>;
97 read-only;
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 &switch0 {
181 ports {
182 port@0 {
183 status = "okay";
184 label = "wan";
185 };
186
187 port@1 {
188 status = "okay";
189 label = "lan1";
190 };
191
192 port@2 {
193 status = "okay";
194 label = "lan2";
195 };
196
197 port@3 {
198 status = "okay";
199 label = "lan3";
200 };
201
202 port@4 {
203 status = "okay";
204 label = "lan4";
205 };
206 };
207 };