ramips: enable badblock table support on linksys ea7xxx devices
[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 read-only;
99 };
100
101 factory: partition@c0000 {
102 label = "factory";
103 reg = <0xc0000 0x40000>;
104 read-only;
105 };
106
107 partition@100000 {
108 label = "s_env";
109 reg = <0x100000 0x40000>;
110 };
111
112 partition@140000 {
113 label = "devinfo";
114 reg = <0x140000 0x40000>;
115 read-only;
116 };
117
118 partition@180000 {
119 label = "kernel";
120 reg = <0x180000 0x400000>;
121 };
122
123 partition@580000 {
124 label = "ubi";
125 reg = <0x580000 0x2400000>;
126 };
127
128 partition@2980000 {
129 label = "alt_kernel";
130 reg = <0x2980000 0x400000>;
131 read-only;
132 };
133
134 partition@2d80000 {
135 label = "alt_rootfs";
136 reg = <0x2d80000 0x2400000>;
137 read-only;
138 };
139
140 partition@5180000 {
141 label = "sysdiag";
142 reg = <0x5180000 0x100000>;
143 read-only;
144 };
145
146 partition@5280000 {
147 label = "syscfg";
148 reg = <0x5280000 0x2d00000>;
149 read-only;
150 };
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
157 function = "gpio";
158 };
159 };
160
161 &pcie {
162 status = "okay";
163 };
164
165 &pcie0 {
166 mt76@0,0 {
167 compatible = "mediatek,mt76";
168 reg = <0x0000 0 0 0 0>;
169 mediatek,mtd-eeprom = <&factory 0x0000>;
170 };
171 };
172
173 &pcie1 {
174 mt76@0,0 {
175 compatible = "mediatek,mt76";
176 reg = <0x0000 0 0 0 0>;
177 mediatek,mtd-eeprom = <&factory 0x8000>;
178 };
179 };
180
181 &switch0 {
182 ports {
183 port@0 {
184 status = "okay";
185 label = "wan";
186 };
187
188 port@1 {
189 status = "okay";
190 label = "lan1";
191 };
192
193 port@2 {
194 status = "okay";
195 label = "lan2";
196 };
197
198 port@3 {
199 status = "okay";
200 label = "lan3";
201 };
202
203 port@4 {
204 status = "okay";
205 label = "lan4";
206 };
207 };
208 };