bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6368-netgear-dgnd3700.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm6368.dtsi"
6
7 / {
8 aliases {
9 led-boot = &led_power_green;
10 led-failsafe = &led_power_red;
11 led-running = &led_power_green;
12 led-upgrade = &led_power_green;
13 };
14
15 keys {
16 compatible = "gpio-keys-polled";
17 poll-interval = <100>;
18
19 rfkill {
20 label = "rfkill";
21 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RFKILL>;
23 debounce-interval = <60>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 debounce-interval = <60>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 debounce-interval = <60>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led@2 {
45 label = "green:dsl";
46 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
47 };
48
49 led@4 {
50 function = LED_FUNCTION_WAN;
51 color = <LED_COLOR_ID_RED>;
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 };
54
55 led@5 {
56 function = LED_FUNCTION_WAN;
57 color = <LED_COLOR_ID_GREEN>;
58 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
59 };
60
61 led@11 {
62 function = LED_FUNCTION_WPS;
63 color = <LED_COLOR_ID_GREEN>;
64 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
65 };
66
67 led@13 {
68 /* Front USB port */
69 label = "green:usb2";
70 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
71 };
72
73 led@14 {
74 /* Back USB port */
75 label = "green:usb1";
76 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
77 };
78
79 led_power_red: led@22 {
80 function = LED_FUNCTION_POWER;
81 color = <LED_COLOR_ID_RED>;
82 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
83 panic-indicator;
84 };
85
86 led@23 {
87 function = LED_FUNCTION_LAN;
88 color = <LED_COLOR_ID_GREEN>;
89 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
90 };
91
92 led_power_green: led@24 {
93 function = LED_FUNCTION_POWER;
94 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
96 };
97
98 led@26 {
99 label = "green:wifi2g";
100 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
101 };
102
103 led@27 {
104 label = "blue:wifi5g";
105 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
106 };
107 };
108 };
109
110 &ehci {
111 status = "okay";
112 };
113
114 &ethernet {
115 status = "okay";
116
117 nvmem-cells = <&macaddr_cfe_6a0>;
118 nvmem-cell-names = "mac-address";
119 };
120
121 &lsspi {
122 status = "okay";
123
124 switch@1 {
125 compatible = "brcm,bcm53115";
126 reg = <1>;
127 spi-max-frequency = <781000>;
128 dsa,member = <1 0>;
129
130 ports {
131 #address-cells = <1>;
132 #size-cells = <0>;
133
134 port@0 {
135 reg = <0>;
136 label = "wan";
137 };
138
139 port@1 {
140 reg = <1>;
141 label = "lan4";
142 };
143
144 port@2 {
145 reg = <2>;
146 label = "lan3";
147 };
148
149 port@3 {
150 reg = <3>;
151 label = "lan2";
152 };
153
154 port@4 {
155 reg = <4>;
156 label = "lan1";
157 };
158
159 port@8 {
160 reg = <8>;
161
162 phy-mode = "rgmii";
163 ethernet = <&switch0port5>;
164
165 fixed-link {
166 speed = <1000>;
167 full-duplex;
168 };
169 };
170 };
171 };
172 };
173
174 &nflash {
175 status = "okay";
176
177 nandcs@0 {
178 compatible = "brcm,nandcs";
179 reg = <0>;
180 nand-ecc-step-size = <512>;
181 nand-ecc-strength = <15>;
182 nand-on-flash-bbt;
183 brcm,nand-oob-sector-size = <64>;
184
185 partitions {
186 compatible = "fixed-partitions";
187 #address-cells = <1>;
188 #size-cells = <1>;
189
190 partition@0 {
191 label = "storage";
192 reg = <0 0>; /* autodetected size */
193 };
194 };
195 };
196 };
197
198 &ohci {
199 status = "okay";
200 };
201
202 &pci {
203 status = "okay";
204 };
205
206 &pflash {
207 status = "okay";
208
209 partitions {
210 compatible = "fixed-partitions";
211 #address-cells = <1>;
212 #size-cells = <1>;
213
214 partition@0 {
215 label = "CFE";
216 reg = <0x0000000 0x0020000>;
217 read-only;
218
219 nvmem-layout {
220 compatible = "fixed-layout";
221 #address-cells = <1>;
222 #size-cells = <1>;
223
224 macaddr_cfe_6a0: macaddr@6a0 {
225 reg = <0x6a0 0x6>;
226 };
227 };
228 };
229
230 partition@20000 {
231 compatible = "brcm,bcm963xx-imagetag";
232 label = "firmware";
233 reg = <0x0020000 0x1e20000>;
234 };
235
236 partition@1e40000 {
237 label = "board_data";
238 reg = <0x1e40000 0x1a0000>;
239 read-only;
240 };
241
242 partition@1fe0000 {
243 label = "nvram";
244 reg = <0x1fe0000 0x020000>;
245 };
246 };
247 };
248
249 &switch0 {
250 dsa,member = <0 0>;
251
252 ports {
253 switch0port5: port@5 {
254 reg = <5>;
255 label = "extsw";
256
257 phy-mode = "rgmii";
258
259 fixed-link {
260 speed = <1000>;
261 full-duplex;
262 };
263 };
264 };
265 };
266
267 &uart0 {
268 status = "okay";
269 };
270
271 &usbh {
272 status = "okay";
273 };