bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6328-comtrend-ar-5387un.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 = "Comtrend AR-5387un";
9 compatible = "comtrend,ar-5387un", "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
30 bcm43225-sprom {
31 compatible = "brcm,bcma-sprom";
32
33 pci-bus = <1>;
34 pci-dev = <0>;
35
36 nvmem-cells = <&macaddr_cfe_6a0 1>;
37 nvmem-cell-names = "mac-address";
38
39 brcm,sprom = "brcm/bcm43225-sprom.bin";
40 brcm,sprom-fixups = <2 0x05bb>,
41 <65 0x1204>,
42 <78 0x0303>,
43 <79 0x0202>,
44 <80 0xff02>,
45 <87 0x0315>,
46 <88 0x0315>,
47 <96 0x2048>,
48 <97 0xff11>,
49 <98 0x1567>,
50 <99 0xfb24>,
51 <100 0x3e3c>,
52 <101 0x4038>,
53 <102 0xfe7f>,
54 <103 0x1279>,
55 <112 0x2048>,
56 <113 0xff03>,
57 <114 0x154c>,
58 <115 0xfb27>,
59 <116 0x3e3c>,
60 <117 0x4038>,
61 <118 0xfe87>,
62 <119 0x1233>,
63 <203 0x2226>;
64 };
65 };
66
67 &ehci {
68 status = "okay";
69 };
70
71 &ethernet {
72 status = "okay";
73
74 nvmem-cells = <&macaddr_cfe_6a0 0>;
75 nvmem-cell-names = "mac-address";
76 };
77
78 &hsspi {
79 status = "okay";
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 spi-max-frequency = <16666667>;
84 spi-tx-bus-width = <2>;
85 spi-rx-bus-width = <2>;
86 reg = <0>;
87
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 reg = <0x000000 0x010000>;
98 label = "cfe";
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_cfe_6a0: macaddr@6a0 {
107 compatible = "mac-base";
108 reg = <0x6a0 0x6>;
109 #nvmem-cell-cells = <1>;
110 };
111 };
112 };
113
114 partition@10000 {
115 compatible = "brcm,bcm963xx-imagetag";
116 reg = <0x010000 0xfe0000>;
117 label = "firmware";
118 };
119
120 partition@ff0000 {
121 reg = <0xff0000 0x010000>;
122 label = "nvram";
123 };
124 };
125 };
126 };
127
128 &leds {
129 status = "okay";
130
131 pinctrl-names = "default";
132 pinctrl-0 = <&pinctrl_leds>;
133
134 led@1 {
135 reg = <1>;
136 label = "red:internet";
137 };
138
139 led_power_red: led@4 {
140 reg = <4>;
141 function = LED_FUNCTION_POWER;
142 color = <LED_COLOR_ID_RED>;
143 panic-indicator;
144 };
145
146 led@7 {
147 reg = <7>;
148 label = "green:internet";
149 };
150
151 led_power_green: led@8 {
152 reg = <8>;
153 function = LED_FUNCTION_POWER;
154 color = <LED_COLOR_ID_GREEN>;
155 };
156
157 led@11 {
158 reg = <11>;
159 active-low;
160 label = "green:dsl";
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", "gpio4", "gpio7",
176 "gpio8", "gpio11";
177 };
178 };
179
180 &switch0 {
181 ports {
182 port@0 {
183 reg = <0>;
184 label = "lan1";
185
186 phy-handle = <&phy1>;
187 phy-mode = "mii";
188 };
189
190 port@1 {
191 reg = <1>;
192 label = "lan2";
193
194 phy-handle = <&phy2>;
195 phy-mode = "mii";
196 };
197
198 port@2 {
199 reg = <2>;
200 label = "lan3";
201
202 phy-handle = <&phy3>;
203 phy-mode = "mii";
204 };
205
206 port@3 {
207 reg = <3>;
208 label = "lan4";
209
210 phy-handle = <&phy4>;
211 phy-mode = "mii";
212 };
213 };
214 };
215
216 &uart0 {
217 status = "okay";
218 };
219
220 &usbh {
221 status = "okay";
222 };