bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6328-sercomm-ad1018.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm6328.dtsi"
6
7 / {
8 model = "Sercomm AD1018";
9 compatible = "sercomm,ad1018", "brcm,bcm6328";
10
11 aliases {
12 led-boot = &led_power_green;
13 led-failsafe = &led_power_green;
14 led-running = &led_power_green;
15 led-upgrade = &led_power_green;
16 };
17
18 keys {
19 compatible = "gpio-keys-polled";
20 poll-interval = <100>;
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 debounce-interval = <60>;
27 };
28
29 wlan {
30 label = "wlan";
31 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WLAN>;
33 debounce-interval = <60>;
34 };
35
36 reset {
37 label = "reset";
38 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 debounce-interval = <60>;
41 };
42 };
43
44 bcm432217-sprom {
45 compatible = "brcm,bcma-sprom";
46
47 pci-bus = <1>;
48 pci-dev = <0>;
49
50 nvmem-cells = <&macaddr_cferom_6a0 1>;
51 nvmem-cell-names = "mac-address";
52
53 brcm,sprom = "brcm/bcm43217-sprom.bin";
54 brcm,sprom-fixups = <6 0x1c00>,
55 <65 0x1256>,
56 <96 0x2046>,
57 <97 0xfe69>,
58 <98 0x1726>,
59 <99 0xfa5c>,
60 <112 0x2046>,
61 <113 0xfea8>,
62 <114 0x1978>,
63 <115 0xfa26>,
64 <161 0x2222>,
65 <169 0x2222>,
66 <171 0x2222>,
67 <173 0x2222>,
68 <174 0x4444>,
69 <175 0x2222>,
70 <176 0x4444>;
71 };
72 };
73
74 &ehci {
75 status = "okay";
76 };
77
78 &ethernet {
79 status = "okay";
80
81 nvmem-cells = <&macaddr_cferom_6a0 0>;
82 nvmem-cell-names = "mac-address";
83 };
84
85 &leds {
86 status = "okay";
87
88 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led
90 &pinctrl_ephy0_spd_led &pinctrl_ephy1_act_led
91 &pinctrl_ephy2_act_led &pinctrl_ephy3_act_led>;
92
93 brcm,serial-leds;
94 brcm,serial-shift-inv;
95 brcm,serial-dat-low;
96
97 led@0 {
98 reg = <0>;
99 active-low;
100 label = "red:internet";
101 };
102
103 led@1 {
104 reg = <1>;
105 active-low;
106 label = "green:internet";
107 };
108
109 led_power_green: led@8 {
110 reg = <8>;
111 active-low;
112 function = LED_FUNCTION_POWER;
113 color = <LED_COLOR_ID_GREEN>;
114 default-state = "on";
115 };
116
117 led@10 {
118 reg = <10>;
119 active-low;
120 label = "green:adsl";
121 };
122
123 led@11 {
124 reg = <11>;
125 active-low;
126 label = "red:adsl";
127 };
128
129 led@12 {
130 reg = <12>;
131 active-low;
132 label = "green:phone";
133 };
134
135 led@13 {
136 reg = <13>;
137 active-low;
138 function = LED_FUNCTION_WPS;
139 color = <LED_COLOR_ID_GREEN>;
140 };
141
142 led@14 {
143 reg = <14>;
144 active-low;
145 label = "green:wifi";
146 };
147
148 led@15 {
149 reg = <15>;
150 active-low;
151 function = LED_FUNCTION_USB;
152 color = <LED_COLOR_ID_GREEN>;
153 };
154
155 led@17 {
156 /* EPHY0 Spd */
157 reg = <17>;
158 brcm,hardware-controlled;
159 };
160 };
161
162 &ohci {
163 status = "okay";
164 };
165
166 &pcie {
167 status = "okay";
168 };
169
170 &pinctrl {
171 pinctrl_leds: leds {
172 function = "led";
173 pins = "gpio0", "gpio1";
174 };
175 };
176
177 &nflash {
178 status = "okay";
179
180 nandcs@0 {
181 compatible = "brcm,nandcs";
182 reg = <0>;
183 nand-ecc-step-size = <512>;
184 nand-ecc-strength = <15>;
185 nand-on-flash-bbt;
186
187 #address-cells = <1>;
188 #size-cells = <1>;
189
190 partitions {
191 compatible = "fixed-partitions";
192 #address-cells = <1>;
193 #size-cells = <1>;
194
195 partition@0 {
196 label = "cferom";
197 reg = <0x0000000 0x0020000>;
198 read-only;
199
200 nvmem-layout {
201 compatible = "fixed-layout";
202 #address-cells = <1>;
203 #size-cells = <1>;
204
205 macaddr_cferom_6a0: macaddr@6a0 {
206 compatible = "mac-base";
207 reg = <0x6a0 0x6>;
208 #nvmem-cell-cells = <1>;
209 };
210 };
211 };
212
213 partition@20000 {
214 label = "mmap";
215 reg = <0x0020000 0x00a0000>;
216 read-only;
217 };
218
219 partition@c0000 {
220 label = "cferam1";
221 reg = <0x00c0000 0x0140000>;
222 read-only;
223 };
224
225 partition@200000 {
226 label = "cferam2";
227 reg = <0x0200000 0x0140000>;
228 read-only;
229 };
230
231 partition@340000 {
232 label = "serial";
233 reg = <0x0340000 0x00a0000>;
234 read-only;
235 };
236
237 partition@3e0000 {
238 label = "protect";
239 reg = <0x03e0000 0x0140000>;
240 read-only;
241 };
242
243 partition@6920000 {
244 label = "bootflag1";
245 reg = <0x6920000 0x0140000>;
246 read-only;
247 };
248
249 partition@6a60000 {
250 label = "bootflag2";
251 reg = <0x6a60000 0x0140000>;
252 read-only;
253 };
254
255 partition@520000 {
256 compatible = "sercomm,wfi";
257 label = "wfi";
258 reg = <0x0520000 0x6400000>;
259 };
260
261 partition@6ba0000 {
262 label = "xml_cfg";
263 reg = <0x6ba0000 0x0280000>;
264 read-only;
265 };
266
267 partition@6e20000 {
268 label = "app_dat";
269 reg = <0x6e20000 0x0280000>;
270 read-only;
271 };
272 };
273 };
274 };
275
276 &switch0 {
277 ports {
278 port@0 {
279 reg = <0>;
280 label = "fibre";
281
282 phy-handle = <&phy1>;
283 phy-mode = "mii";
284 };
285
286 port@1 {
287 reg = <1>;
288 label = "lan3";
289
290 phy-handle = <&phy2>;
291 phy-mode = "mii";
292 };
293
294 port@2 {
295 reg = <2>;
296 label = "lan2";
297
298 phy-handle = <&phy3>;
299 phy-mode = "mii";
300 };
301
302 port@3 {
303 reg = <3>;
304 label = "lan1";
305
306 phy-handle = <&phy4>;
307 phy-mode = "mii";
308 };
309 };
310 };
311
312 &uart0 {
313 status = "okay";
314 };
315
316 &usbh {
317 status = "okay";
318 };