lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv452cqw.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,arv452cqw", "lantiq,xway", "lantiq,danube";
8 model = "Arcor 801";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_blue;
16 led-failsafe = &power_red;
17 led-running = &power_blue;
18 led-upgrade = &power_blue;
19
20 led-dsl = &dsl_blue;
21 led-usb = &led_usb;
22 led-wifi = &wifi;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x2000000>;
28 };
29
30 ath5k_eep {
31 compatible = "ath5k,eeprom";
32 ath,eep-flash = <&boardconfig 0x400>;
33 ath,mac-offset = <0x0>;
34 ath,eep-swap;
35 };
36
37 keys {
38 compatible = "gpio-keys-polled";
39 poll-interval = <100>;
40
41 rfkill {
42 label = "rfkill";
43 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RFKILL>;
45 };
46 wps {
47 label = "wps";
48 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
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: power0 {
61 function = LED_FUNCTION_POWER;
62 color = <LED_COLOR_ID_BLUE>;
63 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
64 default-state = "keep";
65 };
66 dsl_blue: dsl {
67 label = "blue:dsl";
68 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
69 };
70 isdn {
71 label = "blue:isdn";
72 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
73 };
74 power_red: power1 {
75 function = LED_FUNCTION_POWER;
76 color = <LED_COLOR_ID_RED>;
77 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
78 };
79 wps {
80 function = LED_FUNCTION_WPS;
81 color = <LED_COLOR_ID_BLUE>;
82 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
83 };
84 wps1 {
85 function = LED_FUNCTION_WPS;
86 color = <LED_COLOR_ID_YELLOW>;
87 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
88 };
89 fxs1 {
90 label = "blue:telefon1";
91 gpios = <&gpiomm 0 GPIO_ACTIVE_LOW>;
92 };
93 fxs2 {
94 label = "blue:telefon2";
95 gpios = <&gpiomm 1 GPIO_ACTIVE_LOW>;
96 };
97 wps2 {
98 function = LED_FUNCTION_WPS;
99 color = <LED_COLOR_ID_RED>;
100 gpios = <&gpiomm 2 GPIO_ACTIVE_LOW>;
101 };
102 fxo {
103 label = "blue:line";
104 gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
105 };
106 voice {
107 label = "blue:sprache";
108 gpios = <&gpiomm 4 1>;
109 };
110 led_usb: usb {
111 function = LED_FUNCTION_USB;
112 color = <LED_COLOR_ID_BLUE>;
113 gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>;
114 };
115 wifi: wifi {
116 function = LED_FUNCTION_WLAN;
117 color = <LED_COLOR_ID_BLUE>;
118 gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
119 };
120 /*
121 internet blue and internet red are missing
122 dsl2 and dsl3 are not referenced in manual
123 */
124 dsl2 {
125 label = "yellow:dsl";
126 gpios = <&gpiomm 8 GPIO_ACTIVE_LOW>;
127 };
128 dsl3 {
129 label = "red:dsl";
130 gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
131 };
132 };
133
134 usb_vbus: regulator-usb-vbus {
135 compatible = "regulator-fixed";
136
137 regulator-name = "USB_VBUS";
138
139 regulator-min-microvolt = <5000000>;
140 regulator-max-microvolt = <5000000>;
141
142 gpio = <&gpio 28 GPIO_ACTIVE_HIGH>;
143 enable-active-high;
144 };
145 };
146
147 &gpio {
148 pinctrl-names = "default";
149 pinctrl-0 = <&state_default>;
150
151 state_default: pinmux {
152 ebu {
153 lantiq,groups = "ebu cs1";
154 lantiq,function = "ebu";
155 };
156 pci_rst {
157 lantiq,pins = "io21";
158 lantiq,pull = <0>;
159 lantiq,output = <1>;
160 };
161 leds {
162 lantiq,pins = "io3", "io5", "io6", "io7", "io9";
163 lantiq,output = <1>;
164 };
165 };
166 };
167
168 /*
169 #define ARV452CPW_SWITCH_RESET 110
170 */
171 &gsw {
172 phy-mode = "rmii";
173 nvmem-cells = <&macaddr_boardconfig_16>;
174 nvmem-cell-names = "mac-address";
175 };
176
177 &localbus {
178 flash@0 {
179 compatible = "lantiq,nor";
180 bank-width = <2>;
181 reg = <0 0x0 0x400000>;
182
183 partitions {
184 compatible = "fixed-partitions";
185 #address-cells = <1>;
186 #size-cells = <1>;
187
188 partition@0 {
189 label = "uboot";
190 reg = <0x00000 0x10000>;
191 read-only;
192 };
193
194 partition@10000 {
195 label = "u-boot-env";
196 reg = <0x10000 0x10000>;
197 read-only;
198 };
199
200 partition@20000 {
201 label = "firmware";
202 reg = <0x20000 0x3d0000>;
203 };
204
205 boardconfig: partition@3f0000 {
206 label = "boardconfig";
207 reg = <0x3f0000 0x10000>;
208 read-only;
209
210 nvmem-layout {
211 compatible = "fixed-layout";
212 #address-cells = <1>;
213 #size-cells = <1>;
214
215 macaddr_boardconfig_16: macaddr@16 {
216 reg = <0x16 0x6>;
217 };
218 };
219 };
220 };
221 };
222
223 gpiomm: gpio@1 {
224 compatible = "lantiq,gpio-mm";
225 reg = <1 0x0 0x10 >;
226 #address-cells = <1>;
227 #size-cells = <1>;
228 #gpio-cells = <2>;
229 gpio-controller;
230 lantiq,shadow = <0x77f>;
231 };
232 };
233
234 &pci0 {
235 status = "okay";
236
237 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
238 pinctrl-names = "default";
239
240 lantiq,external-clock;
241 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
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 = <&gpio 31 GPIO_ACTIVE_HIGH
256 &gpiomm 7 GPIO_ACTIVE_HIGH>;
257 };