ramips: enable BBT on NAND in I-O DATA devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-dx1200gr.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 = "iodata,wn-dx1200gr", "mediatek,mt7621-soc";
10 model = "I-O DATA WN-DX1200GR";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac1;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wps {
24 label = "blue:wps";
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power: power {
29 label = "green:power";
30 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42
43 repeater {
44 label = "repeater";
45 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
46 linux,code = <BTN_0>;
47 linux,input-type = <EV_SW>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55 };
56 };
57
58 &nand {
59 status = "okay";
60
61 mediatek,bbt;
62 mediatek,bmt-remap-range =
63 <0x0000000 0x0800000>,
64 <0x3600000 0x4980000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x100000>;
74 read-only;
75 };
76
77 partition@100000 {
78 label = "u-boot-env";
79 reg = <0x100000 0x100000>;
80 read-only;
81 };
82
83 factory: partition@200000 {
84 label = "factory";
85 reg = <0x200000 0x200000>;
86 };
87
88 partition@400000 {
89 label = "kernel";
90 reg = <0x400000 0x400000>;
91 };
92
93 partition@800000 {
94 label = "ubi";
95 reg = <0x800000 0x2e00000>;
96 };
97
98 partition@3600000 {
99 label = "Config";
100 reg = <0x3600000 0x100000>;
101 read-only;
102 };
103
104 partition@3700000 {
105 label = "firmware_2";
106 reg = <0x3700000 0x3200000>;
107 };
108
109 partition@6900000 {
110 label = "Config_2";
111 reg = <0x6900000 0x100000>;
112 read-only;
113 };
114
115 partition@6a00000 {
116 label = "persist";
117 reg = <0x6a00000 0x100000>;
118 };
119
120 partition@6b00000 {
121 label = "idmkey";
122 reg = <0x6b00000 0x100000>;
123 read-only;
124 };
125
126 partition@6c00000 {
127 label = "Backup";
128 reg = <0x6c00000 0x1380000>;
129 read-only;
130 };
131 };
132 };
133
134 &gmac0 {
135 nvmem-cells = <&macaddr_factory_1e000>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &gmac1 {
140 status = "okay";
141 label = "wan";
142 phy-handle = <&ethphy0>;
143
144 nvmem-cells = <&macaddr_factory_1e006>;
145 nvmem-cell-names = "mac-address";
146 };
147
148 &mdio {
149 ethphy0: ethernet-phy@0 {
150 reg = <0>;
151 };
152 };
153
154 &switch0 {
155 ports {
156 port@1 {
157 status = "okay";
158 label = "lan4";
159 };
160
161 port@2 {
162 status = "okay";
163 label = "lan3";
164 };
165
166 port@3 {
167 status = "okay";
168 label = "lan2";
169 };
170
171 port@4 {
172 status = "okay";
173 label = "lan1";
174 };
175 };
176 };
177
178 &pcie {
179 status = "okay";
180 };
181
182 &pcie0 {
183 wifi@0,0 {
184 compatible = "mediatek,mt76";
185 reg = <0x0000 0 0 0 0>;
186
187 mediatek,mtd-eeprom = <&factory 0x0>;
188 ieee80211-freq-limit = <2400000 2500000>;
189 };
190 };
191
192 &pcie1 {
193 wifi@0,0 {
194 compatible = "mediatek,mt76";
195 reg = <0x0000 0 0 0 0>;
196
197 mediatek,mtd-eeprom = <&factory 0x8000>;
198 ieee80211-freq-limit = <5000000 6000000>;
199 };
200 };
201
202 &state_default {
203 gpio {
204 groups = "uart2", "uart3", "wdt";
205 function = "gpio";
206 };
207 };
208
209 &xhci {
210 status = "disabled";
211 };
212
213 &factory {
214 compatible = "nvmem-cells";
215 #address-cells = <1>;
216 #size-cells = <1>;
217
218 macaddr_factory_1e000: macaddr@1e000 {
219 reg = <0x1e000 0x6>;
220 };
221
222 macaddr_factory_1e006: macaddr@1e006 {
223 reg = <0x1e006 0x6>;
224 };
225 };