lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv752dpw.dts
1 #include "danube.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5
6 / {
7 compatible = "arcadyan,arv752dpw", "lantiq,xway", "lantiq,danube";
8 model = "Arcor 802";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_red;
16 led-failsafe = &power_blue;
17 led-running = &power_red;
18 led-upgrade = &power_red;
19
20 led-dsl = &internet_red;
21 led-usb = &umts;
22 led-wifi = &wifi;
23
24 label-mac-device = &wifi0;
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x4000000>;
30 };
31
32 keys {
33 compatible = "gpio-keys-polled";
34 poll-interval = <100>;
35
36 wps {
37 label = "wps";
38 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_WPS_BUTTON>;
40 };
41 restart {
42 label = "restart";
43 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_POWER>;
45 };
46 dsl {
47 label = "dsl";
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 linux,code = <BTN_0>;
50 };
51 reset {
52 label = "reset";
53 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56 };
57
58 leds {
59 compatible = "gpio-leds";
60 power_blue: power1 {
61 function = LED_FUNCTION_POWER;
62 color = <LED_COLOR_ID_BLUE>;
63 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
64 };
65 internet_red: internet {
66 label = "red:internet";
67 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
68 };
69 message {
70 label = "red:message";
71 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
72 };
73 power_red: power {
74 function = LED_FUNCTION_POWER;
75 color = <LED_COLOR_ID_RED>;
76 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
77 default-state = "keep";
78 };
79 voice1 {
80 label = "red:voice";
81 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
82 };
83 umts: umts {
84 label = "red:umts";
85 gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
86 };
87 wifi: wifi {
88 label = "red:wifi";
89 gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>;
90 };
91 fxs1 {
92 label = "green:tae-n";
93 gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>;
94 };
95 fxs2 {
96 label = "green:tae-u";
97 gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
98 };
99 fxo {
100 label = "green:isdn";
101 gpios = <&gpiomm 7 GPIO_ACTIVE_LOW>;
102 };
103 internet2 {
104 label = "blue:internet";
105 gpios = <&gpiomm 8 GPIO_ACTIVE_LOW>;
106 };
107 voice2 {
108 label = "blue:voice";
109 gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
110 };
111 };
112
113 usb_vbus: regulator-usb-vbus {
114 compatible = "regulator-fixed";
115
116 regulator-name = "USB_VBUS";
117
118 regulator-min-microvolt = <5000000>;
119 regulator-max-microvolt = <5000000>;
120
121 gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>;
122 enable-active-high;
123 };
124 };
125
126 &gpio {
127 pinctrl-names = "default";
128 pinctrl-0 = <&state_default>;
129
130 state_default: pinmux {
131 ebu {
132 lantiq,groups = "ebu cs1";
133 lantiq,function = "ebu";
134 };
135 exin {
136 lantiq,groups = "exin1";
137 lantiq,function = "exin";
138 lantiq,pull = <2>;
139 lantiq,output = <0>;
140 };
141 pci_rst {
142 lantiq,pins = "io21";
143 lantiq,pull = <2>;
144 lantiq,output = <1>;
145 };
146 leds {
147 lantiq,pins = "io3", "io5", "io6", "io8";
148 lantiq,output = <1>;
149 lantiq,pull = <0>;
150 };
151 keys {
152 lantiq,pins = "io11", "io12", "io13", "io28";
153 lantiq,output = <0>;
154 lantiq,pull = <2>;
155 lantiq,open-drain = <1>;
156 };
157 };
158 };
159
160 &gsw {
161 phy-mode = "rmii";
162 nvmem-cells = <&macaddr_boardconfig_16>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &localbus {
167 flash@0 {
168 compatible = "lantiq,nor";
169 bank-width = <2>;
170 reg = <0 0x0 0x800000>;
171
172 partitions {
173 compatible = "fixed-partitions";
174 #address-cells = <1>;
175 #size-cells = <1>;
176
177 partition@0 {
178 label = "uboot";
179 reg = <0x00000 0x10000>;
180 read-only;
181 };
182
183 partition@10000 {
184 label = "u-boot-env";
185 reg = <0x10000 0x10000>;
186 read-only;
187 };
188
189 partition@20000 {
190 label = "firmware";
191 reg = <0x20000 0x7d0000>;
192 };
193
194 boardconfig: partition@7f0000 {
195 label = "board_config";
196 reg = <0x7f0000 0x10000>;
197 read-only;
198
199 nvmem-layout {
200 compatible = "fixed-layout";
201 #address-cells = <1>;
202 #size-cells = <1>;
203
204 macaddr_boardconfig_16: macaddr@16 {
205 reg = <0x16 0x6>;
206 };
207 };
208 };
209 };
210 };
211
212 gpiomm: gpio@1 {
213 compatible = "lantiq,gpio-mm";
214 reg = <1 0x0 0x10 >;
215 #address-cells = <1>;
216 #size-cells = <1>;
217 #gpio-cells = <2>;
218 gpio-controller;
219 lantiq,shadow = <0x3>;
220 };
221 };
222
223 &pci0 {
224 status = "okay";
225
226 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>, <&pci_req2_pins>;
227 pinctrl-names = "default";
228
229 lantiq,external-clock;
230 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
231 interrupt-map = <0x7000 0 0 1 &icu0 135>;
232 req-mask = <0x3>;
233
234 wifi0: wifi@1814,0601 {
235 compatible = "pci1814,0601";
236 reg = <0x7000 0 0 0 0>;
237 nvmem-cells = <&macaddr_boardconfig_16>;
238 nvmem-cell-names = "mac-address";
239 ralink,mtd-eeprom = <&boardconfig 0x410>;
240 ralink,eeprom-swap;
241 };
242 };
243
244 &usb_phy {
245 status = "okay";
246 };
247
248 &usb {
249 status = "okay";
250 vbus-supply = <&usb_vbus>;
251 };
252
253 &vmmc {
254 status = "okay";
255 gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>;
256 };