ramips: mt7621: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_covr-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,covr-x1860-a1", "mediatek,mt7621-soc";
10 model = "D-Link COVR-X1860 A1";
11
12 aliases {
13 led-boot = &status_orange;
14 led-failsafe = &status_red;
15 led-running = &status_white;
16 led-upgrade = &status_red;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 linux,code = <KEY_RESTART>;
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 };
31
32 wps {
33 label = "wps";
34 linux,code = <KEY_WPS_BUTTON>;
35 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 status_white: power {
43 label = "white:status";
44 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
45 };
46
47 status_orange: status_orange {
48 label = "orange:status";
49 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
50 default-state = "on";
51 };
52
53 status_red: status_red {
54 label = "red:status";
55 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 virtual_flash {
60 compatible = "mtd-concat";
61
62 devices = <&fwconcat0 &fwconcat1>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "ubi";
71 reg = <0x0 0x0>;
72 };
73 };
74 };
75 };
76
77 &nand {
78 status = "okay";
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "bootloader";
87 reg = <0x0 0x80000>;
88 read-only;
89 };
90
91 partition@80000 {
92 label = "config";
93 reg = <0x80000 0x80000>;
94 read-only;
95 };
96
97 factory: partition@100000 {
98 label = "factory";
99 reg = <0x100000 0x80000>;
100 read-only;
101
102 nvmem-layout {
103 compatible = "fixed-layout";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 eeprom_factory_0: eeprom@0 {
108 reg = <0x0 0xe00>;
109 };
110
111 precal_factory_e10: precal@e10 {
112 reg = <0xe10 0x19c10>;
113 };
114 };
115 };
116
117 partition@180000 {
118 label = "config2";
119 reg = <0x180000 0x40000>;
120 read-only;
121 };
122
123 partition@1c0000 {
124 label = "kernel";
125 reg = <0x1c0000 0x800000>;
126 };
127
128 fwconcat0: partition@9c0000 {
129 label = "fwconcat0";
130 reg = <0x9c0000 0x2000000>;
131 };
132
133 partition@29c0000 {
134 label = "kernel2";
135 reg = <0x29c0000 0x800000>;
136 read-only;
137 };
138
139 fwconcat1: partition@31c0000 {
140 label = "fwconcat1";
141 reg = <0x31c0000 0x2a00000>;
142 };
143
144 partition@5bc0000 {
145 label = "private";
146 reg = <0x5bc0000 0x1400000>;
147 read-only;
148 };
149
150 partition@6fc0000 {
151 label = "mydlink";
152 reg = <0x6fc0000 0x600000>;
153 read-only;
154 };
155
156 partition@75c0000 {
157 label = "myconfig";
158 reg = <0x75c0000 0xa00000>;
159 read-only;
160 };
161 };
162 };
163
164 &pcie {
165 status = "okay";
166 };
167
168 &pcie1 {
169 wifi@0,0 {
170 compatible = "mediatek,mt76";
171 reg = <0x0000 0 0 0 0>;
172 nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
173 nvmem-cell-names = "eeprom", "precal";
174 mediatek,disable-radar-background;
175 };
176 };
177
178 &gmac1 {
179 status = "okay";
180 phy-handle = <&ethphy4>;
181 };
182
183 &mdio {
184 ethphy4: ethernet-phy@4 {
185 reg = <4>;
186 };
187 };
188
189 &switch0 {
190 ports {
191 port@0 {
192 status = "okay";
193 label = "internet";
194 };
195
196 port@2 {
197 status = "okay";
198 label = "ethernet";
199 };
200 };
201 };