bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6328-comtrend-ar-5381u.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-5381u";
9 compatible = "comtrend,ar-5381u", "brcm,bcm6328";
10
11 aliases {
12 led-boot = &led_power_green;
13 led-failsafe = &led_alarm_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 = <97 0xfee5>,
41 <98 0x157c>,
42 <99 0xfae7>,
43 <113 0xfefa>,
44 <114 0x15d6>,
45 <115 0xfaf8>;
46 };
47 };
48
49 &ehci {
50 status = "okay";
51 };
52
53 &ethernet {
54 status = "okay";
55
56 nvmem-cells = <&macaddr_cfe_6a0 0>;
57 nvmem-cell-names = "mac-address";
58 };
59
60 &hsspi {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 spi-max-frequency = <16666667>;
66 spi-tx-bus-width = <2>;
67 spi-rx-bus-width = <2>;
68 reg = <0>;
69
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 reg = <0x000000 0x010000>;
80 label = "cfe";
81 read-only;
82
83 nvmem-layout {
84 compatible = "fixed-layout";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 macaddr_cfe_6a0: macaddr@6a0 {
89 compatible = "mac-base";
90 reg = <0x6a0 0x6>;
91 #nvmem-cell-cells = <1>;
92 };
93 };
94 };
95
96 partition@10000 {
97 compatible = "brcm,bcm963xx-imagetag";
98 reg = <0x010000 0xfe0000>;
99 label = "firmware";
100 };
101
102 partition@ff0000 {
103 reg = <0xff0000 0x010000>;
104 label = "nvram";
105 };
106 };
107 };
108 };
109
110 &leds {
111 status = "okay";
112
113 pinctrl-names = "default";
114 pinctrl-0 = <&pinctrl_leds>;
115
116 led_alarm_red: led@2 {
117 reg = <2>;
118 active-low;
119 function = LED_FUNCTION_ALARM;
120 color = <LED_COLOR_ID_RED>;
121 panic-indicator;
122 };
123
124 led@3 {
125 reg = <3>;
126 active-low;
127 label = "green:internet";
128 };
129
130 led_power_green: led@4 {
131 reg = <4>;
132 active-low;
133 function = LED_FUNCTION_POWER;
134 color = <LED_COLOR_ID_GREEN>;
135 };
136 };
137
138 &ohci {
139 status = "okay";
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pinctrl {
147 pinctrl_leds: leds {
148 function = "led";
149 pins = "gpio2", "gpio3", "gpio4";
150 };
151 };
152
153 &switch0 {
154 ports {
155 port@0 {
156 reg = <0>;
157 label = "lan1";
158
159 phy-handle = <&phy1>;
160 phy-mode = "mii";
161 };
162
163 port@1 {
164 reg = <1>;
165 label = "lan2";
166
167 phy-handle = <&phy2>;
168 phy-mode = "mii";
169 };
170
171 port@2 {
172 reg = <2>;
173 label = "lan3";
174
175 phy-handle = <&phy3>;
176 phy-mode = "mii";
177 };
178
179 port@3 {
180 reg = <3>;
181 label = "lan4";
182
183 phy-handle = <&phy4>;
184 phy-mode = "mii";
185 };
186 };
187 };
188
189 &uart0 {
190 status = "okay";
191 };
192
193 &usbh {
194 status = "okay";
195 };