ramips: fix EEPROM size for I-O DATA WN-DEAX1800GR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dap-x1860-a1.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 = "dlink,dap-x1860-a1", "mediatek,mt7621-soc";
10 model = "D-Link DAP-X1860 A1";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 aliases {
17 label-mac-device = &gmac0;
18 led-boot = &led_power_green;
19 led-failsafe = &led_power_red;
20 led-running = &led_power_green;
21 led-upgrade = &led_power_red;
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 wps {
28 label = "wps";
29 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WPS_BUTTON>;
31 };
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power_green: power_green {
44 label = "green:power";
45 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
46 default-state = "on";
47 };
48
49 led_power_red: power_red {
50 label = "red:power";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 };
53
54 power_orange {
55 label = "orange:power";
56 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
57 };
58
59 rssihigh {
60 label = "green:rssihigh";
61 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
62 };
63
64 rssimedium {
65 label = "green:rssimedium";
66 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
67 };
68
69 rssilow_orange {
70 label = "orange:rssilow";
71 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
72 };
73
74 rssilow_green {
75 label = "green:rssilow";
76 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
77 };
78 };
79
80 virtual_flash {
81 compatible = "mtd-concat";
82
83 devices = <&fwconcat0 &fwconcat1>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "ubi";
92 reg = <0x0 0x0>;
93 };
94 };
95 };
96 };
97
98 &nand {
99 status = "okay";
100
101 mediatek,nmbm;
102 /* rsvd = Remapping Range / NAND Erase-Size */
103 /* rsvd = 0x800000 / 0x20000 */
104 mediatek,bmt-max-reserved-blocks = <64>;
105 /* Remapping should include raw-nand we operate upon without UBI layer. */
106 /* This includes (at least) the kernel which has to be loaded by U-Boot.*/
107 mediatek,bmt-remap-range =
108 <0x0 0x980000>;
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "bootloader";
117 reg = <0x0 0x80000>;
118 read-only;
119 };
120
121 partition@80000 {
122 label = "config";
123 reg = <0x80000 0x80000>;
124 read-only;
125 };
126
127 factory: partition@100000 {
128 label = "factory";
129 reg = <0x100000 0x80000>;
130 read-only;
131
132 compatible = "nvmem-cells";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 macaddr_factory_4: macaddr@4 {
137 reg = <0x4 0x6>;
138 };
139 };
140
141 partition@180000 {
142 label = "kernel";
143 reg = <0x180000 0x0800000>;
144 };
145
146 fwconcat0: partition@980000 {
147 label = "fwconcat0";
148 reg = <0x980000 0x2c00000>;
149 };
150
151 partition@3580000 {
152 label = "manufacture";
153 reg = <0x3580000 0x400000>;
154 read-only;
155 };
156
157 partition@3980000 {
158 label = "storage";
159 reg = <0x3980000 0x680000>;
160 read-only;
161 };
162
163 fwconcat1: partition@4000000 {
164 label = "fwconcat1";
165 reg = <0x4000000 0x3800000>;
166 };
167 };
168 };
169
170 &pcie {
171 status = "okay";
172 };
173
174 &pcie1 {
175 wifi@0,0 {
176 compatible = "mediatek,mt76";
177 reg = <0x0000 0 0 0 0>;
178 mediatek,mtd-eeprom = <&factory 0x0>;
179 mediatek,disable-radar-background;
180 };
181 };
182
183 &ethernet {
184 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
185 };
186
187 &gmac0 {
188 nvmem-cells = <&macaddr_factory_4>;
189 nvmem-cell-names = "mac-address";
190 };
191
192 &switch0 {
193 gpio-controller;
194 #gpio-cells = <2>;
195
196 ports {
197 port@0 {
198 status = "okay";
199 label = "lan";
200 };
201 };
202 };
203
204 &state_default {
205 gpio {
206 groups = "uart2";
207 function = "gpio";
208 };
209 };