lantiq: convert to new LED color/function format where possible
[openwrt/staging/robimarko.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv4520pw.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,arv4520pw", "lantiq,xway", "lantiq,danube";
8 model = "Easybox 800, WAV-281";
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;
21 led-internet = &internet_blue;
22 led-usb = &led_usb;
23 led-wifi = &wifi;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x2000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <100>;
34
35 rfkill {
36 label = "wps";
37 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40 reset {
41 label = "reset";
42 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 power_blue: power {
51 function = LED_FUNCTION_POWER;
52 color = <LED_COLOR_ID_BLUE>;
53 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
54 default-state = "keep";
55 };
56 dsl: dsl {
57 label = "blue:dsl";
58 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
59 };
60 internet_blue: internet {
61 label = "blue:internet";
62 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
63 };
64 power_red: power2 {
65 function = LED_FUNCTION_POWER;
66 color = <LED_COLOR_ID_RED>;
67 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
68 };
69 wps {
70 function = LED_FUNCTION_WPS;
71 color = <LED_COLOR_ID_YELLOW>;
72 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
73 };
74 wps2 {
75 function = LED_FUNCTION_WPS;
76 color = <LED_COLOR_ID_RED>;
77 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
78 };
79 /*
80 wps green is missing
81 */
82 fxs1 {
83 label = "blue:telefon1";
84 gpios = <&gpiomm 0 GPIO_ACTIVE_LOW>;
85 };
86 fxs2 {
87 label = "blue:telefon2";
88 gpios = <&gpiomm 1 GPIO_ACTIVE_LOW>;
89 };
90 isdn {
91 label = "blue:isdn";
92 gpios = <&gpiomm 2 GPIO_ACTIVE_LOW>;
93 };
94 fxo {
95 label = "blue:line";
96 gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
97 };
98 voice {
99 label = "blue:sprache";
100 gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>;
101 };
102 led_usb: usb {
103 function = LED_FUNCTION_USB;
104 color = <LED_COLOR_ID_BLUE>;
105 gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>;
106 };
107 wifi: wifi {
108 label = "blue:wifi";
109 gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
110 };
111 internet2 {
112 label = "red:internet";
113 gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
114 };
115 /*
116 info is missing
117 */
118 };
119
120 usb_vbus: regulator-usb-vbus {
121 compatible = "regulator-fixed";
122
123 regulator-name = "USB_VBUS";
124
125 regulator-min-microvolt = <5000000>;
126 regulator-max-microvolt = <5000000>;
127
128 gpio = <&gpio 28 GPIO_ACTIVE_HIGH>;
129 enable-active-high;
130 };
131 };
132
133 &gpio {
134 pinctrl-names = "default";
135 pinctrl-0 = <&state_default>;
136
137 state_default: pinmux {
138 ebu {
139 lantiq,groups = "ebu cs1";
140 lantiq,function = "ebu";
141 };
142 pci_rst {
143 lantiq,pins = "io21";
144 lantiq,open-drain = <0>;
145 lantiq,pull = <0>;
146 };
147 };
148 };
149
150 &gsw {
151 /* gpiomm 10 - switch */
152 phy-mode = "rmii";
153 nvmem-cells = <&macaddr_boardconfig_16>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &localbus {
158 flash@0 {
159 compatible = "lantiq,nor";
160 bank-width = <2>;
161 reg = <0 0x0 0x800000>;
162
163 partitions {
164 compatible = "fixed-partitions";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 partition@0 {
169 label = "uboot";
170 reg = <0x00000 0x20000>;
171 read-only;
172 };
173
174 partition@20000 {
175 label = "u-boot-env";
176 reg = <0x20000 0x10000>;
177 read-only;
178 };
179
180 partition@30000 {
181 label = "firmware";
182 reg = <0x30000 0x3c0000>;
183 };
184
185 boardconfig: partition@7f0000 {
186 label = "boardconfig";
187 reg = <0x3f0000 0x10000>;
188 read-only;
189
190 nvmem-layout {
191 compatible = "fixed-layout";
192 #address-cells = <1>;
193 #size-cells = <1>;
194
195 macaddr_boardconfig_16: macaddr@16 {
196 reg = <0x16 0x6>;
197 };
198 };
199 };
200 };
201 };
202
203 gpiomm: gpio@1 {
204 compatible = "lantiq,gpio-mm";
205 reg = <1 0x0 0x10 >;
206 #address-cells = <1>;
207 #size-cells = <1>;
208 #gpio-cells = <2>;
209 gpio-controller;
210 lantiq,shadow = <0x400>;
211 };
212 };
213
214 &pci0 {
215 status = "okay";
216
217 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
218 pinctrl-names = "default";
219
220 lantiq,external-clock;
221 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
222 };
223
224 &usb_phy {
225 status = "okay";
226 };
227
228 &usb {
229 status = "okay";
230 vbus-supply = <&usb_vbus>;
231 };
232
233 &vmmc {
234 status = "okay";
235 gpios = <&gpio 31 GPIO_ACTIVE_HIGH
236 &gpiomm 7 GPIO_ACTIVE_HIGH>;
237 };