bmips: convert to new LED color/function format where possible
[openwrt/staging/pepe2k.git] / target / linux / bmips / dts / bcm6369-comtrend-wap-5813n.dts
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 model = "Comtrend WAP-5813n";
9 compatible = "comtrend,wap-5813n", "brcm,bcm6369", "brcm,bcm6368";
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 wlan {
23 label = "wlan";
24 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WLAN>;
26 debounce-interval = <60>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 debounce-interval = <60>;
34 };
35
36 wps {
37 label = "wps";
38 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_WPS_BUTTON>;
40 debounce-interval = <60>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 led@5 {
48 label = "green:internet";
49 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
50 };
51
52 led@14 {
53 function = LED_FUNCTION_USB;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
56 };
57
58 led_power_green: led@22 {
59 function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_GREEN>;
61 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
62 };
63
64 led@23 {
65 function = LED_FUNCTION_WPS;
66 color = <LED_COLOR_ID_GREEN>;
67 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
68 };
69
70 led_power_red: led@24 {
71 function = LED_FUNCTION_POWER;
72 color = <LED_COLOR_ID_RED>;
73 gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
74 panic-indicator;
75 };
76
77 led@31 {
78 label = "red:internet";
79 gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
80 };
81 };
82
83 bcm4322-sprom {
84 compatible = "brcm,ssb-sprom";
85
86 pci-bus = <0>;
87 pci-dev = <1>;
88
89 nvmem-cells = <&macaddr_cfe_6a0 1>;
90 nvmem-cell-names = "mac-address";
91
92 brcm,sprom = "brcm/bcm4322-sprom.bin";
93 brcm,sprom-fixups = <97 0xfeed>,
94 <98 0x15d1>,
95 <99 0xfb0d>,
96 <113 0xfef7>,
97 <114 0x15f7>,
98 <115 0xfb1a>;
99 };
100 };
101
102 &ehci {
103 status = "okay";
104 };
105
106 &ethernet {
107 status = "okay";
108
109 nvmem-cells = <&macaddr_cfe_6a0 0>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &lsspi {
114 status = "okay";
115
116 switch@0 {
117 compatible = "brcm,bcm53115";
118 reg = <0>;
119 spi-max-frequency = <781000>;
120 dsa,member = <1 0>;
121
122 ports {
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 port@0 {
127 reg = <0>;
128 label = "lan4";
129 };
130
131 port@1 {
132 reg = <1>;
133 label = "lan3";
134 };
135
136 port@2 {
137 reg = <2>;
138 label = "lan2";
139 };
140
141 port@3 {
142 reg = <3>;
143 label = "lan1";
144 };
145
146 port@4 {
147 reg = <4>;
148 label = "wan";
149 };
150
151 port@5 {
152 reg = <5>;
153
154 phy-mode = "rgmii";
155 ethernet = <&switch0port4>;
156
157 fixed-link {
158 speed = <1000>;
159 full-duplex;
160 };
161 };
162 };
163 };
164 };
165
166 &pflash {
167 status = "okay";
168
169 partitions {
170 compatible = "fixed-partitions";
171 #address-cells = <1>;
172 #size-cells = <1>;
173
174 partition@0 {
175 label = "CFE";
176 reg = <0x000000 0x010000>;
177 read-only;
178
179 nvmem-layout {
180 compatible = "fixed-layout";
181 #address-cells = <1>;
182 #size-cells = <1>;
183
184 macaddr_cfe_6a0: macaddr@6a0 {
185 compatible = "mac-base";
186 reg = <0x6a0 0x6>;
187 #nvmem-cell-cells = <1>;
188 };
189 };
190 };
191
192 partition@20000 {
193 label = "firmware";
194 reg = <0x010000 0x7e0000>;
195 compatible = "brcm,bcm963xx-imagetag";
196 };
197
198 partition@fe0000 {
199 label = "nvram";
200 reg = <0x7f0000 0x010000>;
201 };
202 };
203 };
204
205 &ohci {
206 status = "okay";
207 };
208
209 &pci {
210 status = "okay";
211 };
212
213 &switch0 {
214 dsa,member = <0 0>;
215
216 ports {
217 switch0port4: port@4 {
218 reg = <4>;
219 label = "extsw";
220
221 phy-mode = "rgmii";
222
223 fixed-link {
224 speed = <1000>;
225 full-duplex;
226 };
227 };
228 };
229 };
230
231 &uart0 {
232 status = "okay";
233 };
234
235 &usbh {
236 status = "okay";
237 };