bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6318-comtrend-ar-5315u.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm6318.dtsi"
6
7 / {
8 model = "Comtrend AR-5315u";
9 compatible = "comtrend,ar-5315u", "brcm,bcm6318";
10
11 aliases {
12 led-boot = &led_power_green;
13 led-failsafe = &led_power_red;
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 3 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 debounce-interval = <60>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 debounce-interval = <60>;
34 };
35 };
36
37 bcm43217-sprom {
38 compatible = "brcm,bcma-sprom";
39
40 pci-bus = <1>;
41 pci-dev = <0>;
42
43 nvmem-cells = <&macaddr_cfe_6a0 1>;
44 nvmem-cell-names = "mac-address";
45
46 brcm,sprom = "brcm/bcm43217-sprom.bin";
47 brcm,sprom-fixups = <6 0x1c00>,
48 <65 0x1255>,
49 <97 0xfe55>,
50 <98 0x171d>,
51 <99 0xfa42>,
52 <113 0xfeb7>,
53 <114 0x18cd>,
54 <115 0xfa4f>,
55 <162 0x6444>,
56 <170 0x6444>,
57 <172 0x6444>;
58 };
59 };
60
61 &ehci {
62 status = "okay";
63 };
64
65 &ethernet {
66 status = "okay";
67
68 nvmem-cells = <&macaddr_cfe_6a0 0>;
69 nvmem-cell-names = "mac-address";
70 };
71
72 &hsspi {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 spi-max-frequency = <62500000>;
78 spi-tx-bus-width = <2>;
79 spi-rx-bus-width = <2>;
80 reg = <0>;
81
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 reg = <0x000000 0x010000>;
92 label = "cfe";
93 read-only;
94
95 nvmem-layout {
96 compatible = "fixed-layout";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 macaddr_cfe_6a0: macaddr@6a0 {
101 compatible = "mac-base";
102 reg = <0x6a0 0x6>;
103 #nvmem-cell-cells = <1>;
104 };
105 };
106 };
107
108 partition@10000 {
109 compatible = "brcm,bcm963xx-imagetag";
110 reg = <0x010000 0xfe0000>;
111 label = "firmware";
112 };
113
114 partition@ff0000 {
115 reg = <0xff0000 0x010000>;
116 label = "nvram";
117 };
118 };
119 };
120 };
121
122 &leds {
123 status = "okay";
124
125 pinctrl-names = "default";
126 pinctrl-0 = <&pinctrl_leds
127 &pinctrl_ephy0_act_led &pinctrl_ephy1_act_led
128 &pinctrl_ephy2_act_led &pinctrl_ephy3_act_led>;
129
130 led@0 {
131 reg = <0>;
132 active-low;
133 function = LED_FUNCTION_WPS;
134 color = <LED_COLOR_ID_GREEN>;
135 };
136
137 led_power_green: led@1 {
138 reg = <1>;
139 active-low;
140 function = LED_FUNCTION_POWER;
141 color = <LED_COLOR_ID_GREEN>;
142 };
143
144 led@2 {
145 reg = <2>;
146 active-low;
147 function = LED_FUNCTION_USB;
148 color = <LED_COLOR_ID_GREEN>;
149 };
150
151 led@4 {
152 /* EPHY0 Act */
153 reg = <4>;
154 brcm,hardware-controlled;
155 brcm,link-signal-sources = <4>;
156 };
157
158 led@5 {
159 /* EPHY1 Act */
160 reg = <5>;
161 brcm,hardware-controlled;
162 brcm,link-signal-sources = <5>;
163 };
164
165 led@6 {
166 /* EPHY2 Act */
167 reg = <6>;
168 brcm,hardware-controlled;
169 brcm,link-signal-sources = <6>;
170 };
171
172 led@7 {
173 /* EPHY3 Act */
174 reg = <7>;
175 brcm,hardware-controlled;
176 brcm,link-signal-sources = <7>;
177 };
178
179 led@8 {
180 reg = <8>;
181 active-low;
182 label = "green:internet";
183 };
184
185 led@9 {
186 reg = <9>;
187 active-low;
188 label = "red:internet";
189 };
190
191 led@10 {
192 reg = <10>;
193 active-low;
194 label = "green:dsl";
195 };
196
197 led_power_red: led@11 {
198 reg = <11>;
199 active-low;
200 function = LED_FUNCTION_POWER;
201 color = <LED_COLOR_ID_RED>;
202 panic-indicator;
203 };
204 };
205
206 &ohci {
207 status = "okay";
208 };
209
210 &pcie {
211 status = "okay";
212 };
213
214 &pinctrl {
215 pinctrl_leds: leds {
216 function = "led";
217 pins = "gpio0", "gpio1",
218 "gpio2", "gpio8",
219 "gpio9", "gpio10",
220 "gpio11";
221 };
222 };
223
224 &switch0 {
225 ports {
226 port@0 {
227 reg = <0>;
228 label = "lan4";
229
230 phy-handle = <&phy1>;
231 phy-mode = "mii";
232 };
233
234 port@1 {
235 reg = <1>;
236 label = "lan3";
237
238 phy-handle = <&phy2>;
239 phy-mode = "mii";
240 };
241
242 port@2 {
243 reg = <2>;
244 label = "lan2";
245
246 phy-handle = <&phy3>;
247 phy-mode = "mii";
248 };
249
250 port@3 {
251 reg = <3>;
252 label = "lan1";
253
254 phy-handle = <&phy4>;
255 phy-mode = "mii";
256 };
257 };
258 };
259
260 &uart0 {
261 status = "okay";
262 };
263
264 &usbh {
265 status = "okay";
266 };