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