bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6358-huawei-hg556a-b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm6358.dtsi"
6
7 / {
8 model = "Huawei EchoLife HG556a (version B)";
9 compatible = "huawei,hg556a-b", "brcm,bcm6358";
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 keys {
19 compatible = "gpio-keys-polled";
20 poll-interval = <100>;
21
22 help {
23 label = "help";
24 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_HELP>;
26 debounce-interval = <60>;
27 };
28
29 wlan {
30 label = "wlan";
31 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WLAN>;
33 debounce-interval = <60>;
34 };
35
36 restart {
37 label = "restart";
38 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 debounce-interval = <60>;
41 };
42
43 reset {
44 label = "reset";
45 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_CONFIG>;
47 debounce-interval = <60>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53
54 led@0 {
55 label = "red:message";
56 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
57 };
58
59 led@1 {
60 label = "red:hspa";
61 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
62 };
63
64 led@2 {
65 label = "red:dsl";
66 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
67 };
68
69 led_power_red: led@3 {
70 function = LED_FUNCTION_POWER;
71 color = <LED_COLOR_ID_RED>;
72 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
73 };
74
75 led@6 {
76 label = "all";
77 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
78 default-state = "on";
79 };
80
81 led@12 {
82 label = "green:lan1";
83 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
84 };
85
86 led@13 {
87 label = "red:lan1";
88 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
89 };
90
91 led@15 {
92 label = "green:lan2";
93 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
94 };
95
96 led@22 {
97 label = "red:lan2";
98 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
99 };
100
101 led@23 {
102 label = "green:lan3";
103 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
104 };
105
106 led@26 {
107 label = "red:lan3";
108 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
109 };
110
111 led@27 {
112 label = "green:lan4";
113 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
114 };
115
116 led@28 {
117 label = "red:lan4";
118 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
119 };
120 };
121
122 ath9k-leds {
123 compatible = "gpio-leds";
124
125 wlan {
126 function = LED_FUNCTION_WLAN;
127 color = <LED_COLOR_ID_RED>;
128 gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
129 linux,default-trigger = "phy0tpt";
130 };
131 };
132 };
133
134 &ehci {
135 status = "okay";
136 };
137
138 &ethernet1 {
139 status = "okay";
140
141 nvmem-cells = <&macaddr_cfe_6a0 0>;
142 nvmem-cell-names = "mac-address";
143
144 phy-mode = "mii";
145
146 fixed-link {
147 speed = <100>;
148 full-duplex;
149 };
150 };
151
152 &iudma {
153 status = "okay";
154 };
155
156 &ohci {
157 status = "okay";
158 };
159
160 &pci {
161 status = "okay";
162
163 ath9k: wifi@1,0 {
164 compatible = "pci168c,0029";
165 reg = <0x0800 0 0 0 0>;
166
167 qca,no-eeprom;
168
169 nvmem-cells = <&macaddr_cfe_6a0 1>;
170 nvmem-cell-names = "mac-address";
171
172 #gpio-cells = <2>;
173 gpio-controller;
174 };
175 };
176
177 &pflash {
178 status = "okay";
179
180 partitions {
181 compatible = "fixed-partitions";
182 #address-cells = <1>;
183 #size-cells = <1>;
184
185 partition@0 {
186 label = "cfe";
187 reg = <0x000000 0x020000>;
188 read-only;
189
190 nvmem-layout {
191 compatible = "fixed-layout";
192 #address-cells = <1>;
193 #size-cells = <1>;
194
195 macaddr_cfe_6a0: macaddr@6a0 {
196 compatible = "mac-base";
197 reg = <0x6a0 0x6>;
198 #nvmem-cell-cells = <1>;
199 };
200 };
201 };
202
203 partition@20000 {
204 label = "firmware";
205 reg = <0x020000 0xec0000>;
206 compatible = "brcm,bcm963xx-imagetag";
207 };
208
209 cal_data: partition@ee0000 {
210 label = "cal_data";
211 reg = <0xee0000 0x100000>;
212 read-only;
213
214 nvmem-layout {
215 compatible = "fixed-layout";
216 #address-cells = <1>;
217 #size-cells = <1>;
218
219 cal_data_1e000: cal@1e000 {
220 reg = <0x1e000 0xeb8>;
221 };
222 };
223 };
224
225 partition@fe0000 {
226 label = "nvram";
227 reg = <0xfe0000 0x020000>;
228 };
229 };
230 };
231
232 &uart0 {
233 status = "okay";
234 };
235
236 &usbh {
237 status = "okay";
238 };