bmips: convert to new LED color/function format where possible
[openwrt/staging/pepe2k.git] / target / linux / bmips / dts / bcm63168-sercomm-shg2500.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm63268.dtsi"
6
7 / {
8 model = "Sercomm SHG2500";
9 compatible = "sercomm,shg2500", "brcm,bcm63168", "brcm,bcm63268";
10
11 aliases {
12 led-boot = &led_power_red;
13 led-failsafe = &led_power_red;
14 led-running = &led_power_red;
15 led-upgrade = &led_power_red;
16 };
17
18 i2c {
19 compatible = "i2c-gpio";
20 sda-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
21 scl-gpios = <&gpio 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 };
25
26 keys {
27 compatible = "gpio-keys-polled";
28 poll-interval = <100>;
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 debounce-interval = <60>;
35 };
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 debounce-interval = <60>;
42 };
43 };
44
45 bcm4360-sprom {
46 compatible = "brcm,bcma-sprom";
47
48 pci-bus = <1>;
49 pci-dev = <0>;
50
51 nvmem-cells = <&macaddr_cferom_6a0 1>;
52 nvmem-cell-names = "mac-address";
53
54 brcm,sprom = "brcm/bcm4360-sprom.bin";
55 };
56 };
57
58 &ehci {
59 status = "okay";
60 };
61
62 &ethernet {
63 status = "okay";
64
65 nvmem-cells = <&macaddr_cferom_6a0 0>;
66 nvmem-cell-names = "mac-address";
67 };
68
69 &hsspi {
70 status = "okay";
71
72 led-controller@1 {
73 compatible = "sercomm,msp430-leds";
74 reg = <1>;
75 spi-max-frequency = <500000>;
76
77 led@1 {
78 reg = <1>;
79 label = "red:modem";
80 };
81
82 led@2 {
83 reg = <2>;
84 label = "green:modem";
85 };
86
87 led@3 {
88 reg = <3>;
89 label = "blue:modem";
90 };
91
92 led@4 {
93 reg = <4>;
94 label = "red:internet";
95 };
96
97 led@5 {
98 reg = <5>;
99 label = "red:phone";
100 };
101
102 led@6 {
103 reg = <6>;
104 label = "green:phone";
105 };
106
107 led@7 {
108 reg = <7>;
109 label = "green:wifi";
110 };
111
112 led_power_red: led@8 {
113 reg = <8>;
114 function = LED_FUNCTION_POWER;
115 color = <LED_COLOR_ID_RED>;
116 };
117
118 led@9 {
119 reg = <9>;
120 label = "green:internet";
121 };
122 };
123 };
124
125 &mdio_int {
126 phy12: ethernet-phy@c {
127 compatible = "ethernet-phy-ieee802.3-c22";
128 reg = <12>;
129 };
130 };
131
132 &mdio_ext {
133 switch@1e {
134 compatible = "brcm,bcm53125";
135 reg = <30>;
136
137 dsa,member = <1 0>;
138
139 ports {
140 #address-cells = <1>;
141 #size-cells = <0>;
142
143 port@1 {
144 reg = <1>;
145 label = "lan1";
146 };
147
148 port@2 {
149 reg = <2>;
150 label = "lan2";
151 };
152
153 port@3 {
154 reg = <3>;
155 label = "lan3";
156 };
157
158 port@4 {
159 reg = <4>;
160 label = "lan4";
161 };
162
163 port@8 {
164 reg = <8>;
165
166 phy-mode = "rgmii";
167 ethernet = <&switch0port4>;
168
169 fixed-link {
170 speed = <1000>;
171 full-duplex;
172 };
173 };
174 };
175 };
176 };
177
178 &nflash {
179 status = "okay";
180
181 nandcs@0 {
182 compatible = "brcm,nandcs";
183 reg = <0>;
184 nand-ecc-step-size = <512>;
185 nand-ecc-strength = <15>;
186 nand-on-flash-bbt;
187 brcm,nand-oob-sector-size = <64>;
188
189 #address-cells = <1>;
190 #size-cells = <1>;
191
192 partitions {
193 compatible = "fixed-partitions";
194 #address-cells = <1>;
195 #size-cells = <1>;
196
197 partition@0 {
198 label = "cferom";
199 reg = <0x0000000 0x0020000>;
200 read-only;
201
202 nvmem-layout {
203 compatible = "fixed-layout";
204 #address-cells = <1>;
205 #size-cells = <1>;
206
207 macaddr_cferom_6a0: macaddr@6a0 {
208 compatible = "mac-base";
209 reg = <0x6a0 0x6>;
210 #nvmem-cell-cells = <1>;
211 };
212 };
213 };
214
215 partition@20000 {
216 label = "part_map";
217 reg = <0x0020000 0x00a0000>;
218 read-only;
219 };
220
221 partition@c0000 {
222 label = "cferam1";
223 reg = <0x00c0000 0x0140000>;
224 read-only;
225 };
226
227 partition@200000 {
228 label = "cferam2";
229 reg = <0x0200000 0x0140000>;
230 read-only;
231 };
232
233 artition@6920000 {
234 label = "bootflag1";
235 reg = <0x6920000 0x0140000>;
236 };
237
238 partition@6a60000 {
239 label = "bootflag2";
240 reg = <0x6a60000 0x0140000>;
241 };
242
243 partition@520000 {
244 compatible = "sercomm,wfi";
245 label = "wfi";
246 reg = <0x0520000 0x6400000>;
247 };
248
249 partition@6ba0000 {
250 label = "xml_cfg";
251 reg = <0x6ba0000 0x0280000>;
252 read-only;
253 };
254
255 partition@6e20000 {
256 label = "app_data";
257 reg = <0x6e20000 0x0280000>;
258 read-only;
259 };
260 };
261 };
262 };
263
264 &ohci {
265 status = "okay";
266 };
267
268 &pcie {
269 status = "okay";
270 };
271
272 &pinctrl {
273 pinctrl_uart1: uart1-pins {
274 pinctrl_uart1_sdin: uart1_sdin {
275 function = "uart1_sdin";
276 pins = "gpio12";
277 };
278
279 pinctrl_uart1_sdout: uart1_sdout {
280 function = "uart1_sdout";
281 pins = "gpio13";
282 };
283 };
284 };
285
286 &switch0 {
287 dsa,member = <0 0>;
288
289 ports {
290 port@3 {
291 reg = <3>;
292 label = "wan";
293
294 phy-handle = <&phy12>;
295 phy-mode = "gmii";
296 };
297
298 switch0port4: port@4 {
299 reg = <4>;
300 label = "extsw";
301
302 phy-mode = "rgmii";
303
304 fixed-link {
305 speed = <1000>;
306 full-duplex;
307 };
308 };
309 };
310 };
311
312 &uart0 {
313 status = "okay";
314 };
315
316 &uart1 {
317 status = "okay";
318
319 pinctrl-names = "default";
320 pinctrl-0 = <&pinctrl_uart1>;
321 };
322
323 &usbh {
324 status = "okay";
325 };