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