ramips: mt7621: convert to nvmem-layout
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_netgear_ex6150.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 = "netgear,ex6150", "mediatek,mt7621-soc";
10 model = "Netgear EX6150";
11
12 aliases {
13 led-boot = &power_green;
14 led-failsafe = &power_amber;
15 led-running = &power_green;
16 led-upgrade = &power_amber;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 power_amber: power_amber {
23 label = "amber:power";
24 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
25 };
26
27 power_green: power_green {
28 label = "green:power";
29 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
30 };
31
32 wps {
33 label = "green:wps";
34 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
35 };
36
37 rightarrow {
38 label = "blue:rightarrow";
39 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
40 };
41
42 leftarrow {
43 label = "blue:leftarrow";
44 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
45 };
46
47 router_green {
48 label = "green:router";
49 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy1tpt";
51 };
52
53 router_red {
54 label = "red:router";
55 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
56 };
57
58 client_green {
59 label = "green:client";
60 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
61 linux,default-trigger = "phy0tpt";
62 };
63
64 client_red {
65 label = "red:client";
66 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 keys {
71 compatible = "gpio-keys";
72
73 wps {
74 label = "wps";
75 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_WPS_BUTTON>;
77 };
78
79 reset {
80 label = "reset";
81 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
82 linux,code = <KEY_RESTART>;
83 };
84
85 toggle {
86 label = "AP/Extender toggle";
87 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_0>;
89 linux,input-type = <EV_SW>;
90 /* Active when switch is set to "Access Point" */
91 };
92 };
93 };
94
95 &spi0 {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "u-boot";
110 reg = <0x0 0x30000>;
111 read-only;
112 };
113
114 partition@30000 {
115 label = "config";
116 reg = <0x30000 0x10000>;
117 read-only;
118 };
119
120 factory: partition@40000 {
121 label = "factory";
122 reg = <0x40000 0x10000>;
123 read-only;
124
125 nvmem-layout {
126 compatible = "fixed-layout";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 eeprom_factory_0: eeprom@0 {
131 reg = <0x0 0x200>;
132 };
133
134 eeprom_factory_8000: eeprom@8000 {
135 reg = <0x8000 0x200>;
136 };
137
138 macaddr_factory_4: macaddr@4 {
139 reg = <0x4 0x6>;
140 };
141 };
142 };
143
144 partition@50000 {
145 compatible = "denx,uimage";
146 label = "firmware";
147 reg = <0x50000 0xe80000>;
148 };
149
150 partition@ed0000 {
151 label = "ML1";
152 reg = <0xed0000 0x10000>;
153 read-only;
154 };
155
156 partition@ef0000 {
157 label = "ML2";
158 reg = <0xef0000 0x20000>;
159 read-only;
160 };
161
162 partition@f10000 {
163 label = "ML3";
164 reg = <0xf10000 0x20000>;
165 read-only;
166 };
167
168 partition@f30000 {
169 label = "ML4";
170 reg = <0xf30000 0x20000>;
171 read-only;
172 };
173
174 partition@f50000 {
175 label = "ML5";
176 reg = <0xf50000 0x20000>;
177 read-only;
178 };
179
180 partition@f70000 {
181 label = "ML6";
182 reg = <0xf70000 0x20000>;
183 read-only;
184 };
185
186 partition@f90000 {
187 label = "ML7";
188 reg = <0xf90000 0x20000>;
189 read-only;
190 };
191
192 partition@fb0000 {
193 label = "T_Meter1";
194 reg = <0xfb0000 0x10000>;
195 read-only;
196 };
197
198 partition@fc0000 {
199 label = "T_Meter2";
200 reg = <0xfc0000 0x10000>;
201 read-only;
202 };
203
204 partition@fd0000 {
205 label = "POT";
206 reg = <0xfd0000 0x10000>;
207 read-only;
208 };
209
210 partition@fe0000 {
211 label = "board_data";
212 reg = <0xfe0000 0x10000>;
213 read-only;
214 };
215
216 partition@ff0000 {
217 label = "nvram";
218 reg = <0xff0000 0x10000>;
219 read-only;
220 };
221 };
222 };
223 };
224
225 &pcie {
226 status = "okay";
227
228 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
229 <&gpio 8 GPIO_ACTIVE_LOW>;
230 };
231
232 &pcie0 {
233 wifi@0,0 {
234 reg = <0x0000 0 0 0 0>;
235 nvmem-cells = <&eeprom_factory_8000>;
236 nvmem-cell-names = "eeprom";
237 ieee80211-freq-limit = <5000000 6000000>;
238 };
239 };
240
241 &pcie1 {
242 wifi@0,0 {
243 reg = <0x0000 0 0 0 0>;
244 nvmem-cells = <&eeprom_factory_0>;
245 nvmem-cell-names = "eeprom";
246 ieee80211-freq-limit = <2400000 2500000>;
247 };
248 };
249
250 &ethernet {
251 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
252 };
253
254 &gmac0 {
255 nvmem-cells = <&macaddr_factory_4>;
256 nvmem-cell-names = "mac-address";
257 };
258
259 &switch0 {
260 ports {
261 port@0 {
262 status = "okay";
263 label = "lan";
264 };
265 };
266 };
267
268 &state_default {
269 gpio {
270 groups = "sdhci", "rgmii2", "jtag";
271 function = "gpio";
272 };
273 };