bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6328-nucom-r5010unv2.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 = "NuCom R5010UNv2";
9 compatible = "nucom,r5010unv2", "brcm,bcm6328";
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 reset {
23 label = "reset";
24 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 debounce-interval = <60>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
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 };
48 };
49
50 &ehci {
51 status = "okay";
52 };
53
54 &ethernet {
55 status = "okay";
56
57 nvmem-cells = <&macaddr_cfe_6a0 0>;
58 nvmem-cell-names = "mac-address";
59 };
60
61 &hsspi {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 spi-max-frequency = <16666667>;
67 spi-tx-bus-width = <2>;
68 spi-rx-bus-width = <2>;
69 reg = <0>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "cfe";
78 reg = <0x000000 0x010000>;
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 macaddr_cfe_6a0: macaddr@6a0 {
87 compatible = "mac-base";
88 reg = <0x6a0 0x6>;
89 #nvmem-cell-cells = <1>;
90 };
91 };
92 };
93
94 partition@10000 {
95 compatible = "brcm,bcm963xx-imagetag";
96 label = "firmware";
97 reg = <0x010000 0xfe0000>;
98 };
99
100 partition@ff0000 {
101 label = "nvram";
102 reg = <0xff0000 0x010000>;
103 };
104 };
105 };
106 };
107
108 &leds {
109 status = "okay";
110
111 pinctrl-names = "default";
112 pinctrl-0 = <&pinctrl_ephy0_act_led &pinctrl_ephy1_act_led
113 &pinctrl_ephy2_act_led &pinctrl_ephy3_act_led
114 &pinctrl_leds>;
115
116 led@1 {
117 reg = <1>;
118 active-low;
119 label = "green:internet";
120 };
121
122 led@2 {
123 reg = <2>;
124 active-low;
125 label = "red:internet";
126 };
127
128 led@3 {
129 reg = <3>;
130 active-low;
131 label = "green:dsl";
132 };
133
134 led_power_green: led@4 {
135 reg = <4>;
136 active-low;
137 function = LED_FUNCTION_POWER;
138 color = <LED_COLOR_ID_GREEN>;
139 };
140
141 led_power_red: led@5 {
142 reg = <5>;
143 active-low;
144 function = LED_FUNCTION_POWER;
145 color = <LED_COLOR_ID_RED>;
146 panic-indicator;
147 };
148
149 led@10 {
150 reg = <10>;
151 active-low;
152 function = LED_FUNCTION_WPS;
153 color = <LED_COLOR_ID_GREEN>;
154 };
155
156 led@11 {
157 reg = <11>;
158 active-low;
159 function = LED_FUNCTION_USB;
160 color = <LED_COLOR_ID_GREEN>;
161 };
162 };
163
164 &ohci {
165 status = "okay";
166 };
167
168 &pcie {
169 status = "okay";
170 };
171
172 &pinctrl {
173 pinctrl_leds: leds {
174 function = "led";
175 pins = "gpio1", "gpio2", "gpio3",
176 "gpio4", "gpio5", "gpio10",
177 "gpio11";
178 };
179 };
180
181 &switch0 {
182 ports {
183 port@0 {
184 reg = <0>;
185 label = "lan1";
186
187 phy-handle = <&phy1>;
188 phy-mode = "mii";
189 };
190
191 port@1 {
192 reg = <1>;
193 label = "lan2";
194
195 phy-handle = <&phy2>;
196 phy-mode = "mii";
197 };
198
199 port@2 {
200 reg = <2>;
201 label = "lan3";
202
203 phy-handle = <&phy3>;
204 phy-mode = "mii";
205 };
206
207 port@3 {
208 reg = <3>;
209 label = "lan4";
210
211 phy-handle = <&phy4>;
212 phy-mode = "mii";
213 };
214 };
215 };
216
217 &uart0 {
218 status = "okay";
219 };
220
221 &usbh {
222 status = "okay";
223 };