bmips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / bmips / dts / bcm6362-huawei-hg253s-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "bcm6362.dtsi"
6
7 / {
8 model = "Huawei HG253s v2";
9 compatible = "huawei,hg253s-v2", "brcm,bcm6362";
10
11 aliases {
12 led-boot = &led_phone_green;
13 led-failsafe = &led_phone_green;
14 led-upgrade = &led_phone_green;
15 };
16
17 keys {
18 compatible = "gpio-keys-polled";
19 poll-interval = <100>;
20
21 reset {
22 label = "reset";
23 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RESTART>;
25 debounce-interval = <60>;
26 };
27
28 wlan {
29 label = "wlan";
30 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WLAN>;
32 debounce-interval = <60>;
33 };
34
35 wps {
36 label = "wps";
37 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 debounce-interval = <60>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 led_phone_green: led@28 {
47 label = "green:phone";
48 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
49 };
50
51 led@30 {
52 function = LED_FUNCTION_USB;
53 color = <LED_COLOR_ID_GREEN>;
54 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
55 };
56 };
57 };
58
59 &ehci {
60 status = "okay";
61 };
62
63 &ethernet {
64 status = "okay";
65
66 nvmem-cells = <&macaddr_cferom_6a0>;
67 nvmem-cell-names = "mac-address";
68 };
69
70 &leds {
71 status = "okay";
72
73 pinctrl-names = "default";
74 pinctrl-0 = <&pinctrl_leds>;
75
76 led@3 {
77 reg = <3>;
78 active-low;
79 label = "green:internet";
80 };
81
82 led@5 {
83 reg = <5>;
84 active-low;
85 label = "green:wifi";
86 };
87 };
88
89 &lsspi {
90 status = "okay";
91
92 switch@0 {
93 compatible = "brcm,bcm53125";
94 reg = <0>;
95 spi-max-frequency = <781000>;
96
97 dsa,member = <1 0>;
98
99 ports {
100 #address-cells = <1>;
101 #size-cells = <0>;
102
103 port@1 {
104 reg = <1>;
105 label = "lan4";
106 };
107
108 port@2 {
109 reg = <2>;
110 label = "lan3";
111 };
112
113 port@3 {
114 reg = <3>;
115 label = "lan2";
116 };
117
118 port@4 {
119 reg = <4>;
120 label = "lan1";
121 };
122
123 port@8 {
124 reg = <8>;
125
126 phy-mode = "rgmii";
127 ethernet = <&switch0port4>;
128
129 fixed-link {
130 speed = <1000>;
131 full-duplex;
132 asym-pause;
133 pause;
134 };
135 };
136 };
137 };
138 };
139
140 &mdio_ext {
141 phy24: ethernet-phy@18 {
142 compatible = "ethernet-phy-ieee802.3-c22";
143 reg = <24>;
144 };
145 };
146
147 &nflash {
148 status = "okay";
149
150 nandcs@0 {
151 compatible = "brcm,nandcs";
152 reg = <0>;
153 nand-ecc-step-size = <512>;
154 nand-ecc-strength = <15>;
155 nand-on-flash-bbt;
156 brcm,nand-oob-sector-size = <64>;
157
158 #address-cells = <1>;
159 #size-cells = <1>;
160
161 partitions {
162 compatible = "fixed-partitions";
163 #address-cells = <1>;
164 #size-cells = <1>;
165
166 partition@0 {
167 label = "cferom";
168 reg = <0x0000000 0x0020000>;
169 read-only;
170
171 nvmem-layout {
172 compatible = "fixed-layout";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 macaddr_cferom_6a0: macaddr@6a0 {
177 reg = <0x6a0 0x6>;
178 };
179 };
180 };
181
182 partition@20000 {
183 compatible = "brcm,wfi";
184 label = "wfi";
185 reg = <0x0020000 0x7d80000>;
186 };
187
188 partition@7da0000 {
189 label = "nvram";
190 reg = <0x7da0000 0x160000>;
191 };
192 };
193 };
194 };
195
196 &ohci {
197 status = "okay";
198 };
199
200 &pinctrl {
201 pinctrl_leds: leds {
202 function = "led";
203 pins = "gpio3", "gpio5";
204 };
205 };
206
207 &switch0 {
208 dsa,member = <0 0>;
209
210 ports {
211 switch0port4: port@4 {
212 reg = <4>;
213 label = "extsw";
214
215 phy-mode = "rgmii";
216
217 fixed-link {
218 speed = <1000>;
219 full-duplex;
220 };
221 };
222
223 port@5 {
224 reg = <5>;
225 label = "wan";
226
227 phy-handle = <&phy24>;
228 phy-mode = "rgmii-txid";
229 };
230 };
231 };
232
233 &uart0 {
234 status = "okay";
235 };
236
237 &usbh {
238 status = "okay";
239 };