lantiq: define default leds in dts files
[openwrt.git] / target / linux / lantiq / dts / VGV7519.dtsi
1 /include/ "vr9.dtsi"
2
3 / {
4
5     model = "VGV7519 - KPN Experiabox V8";
6
7         chosen {
8                 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
9
10                 leds {
11                         dsl = &broadband_yellow;
12                         internet = &internet_yellow;
13                         power = &power;
14                         power2 = &power2;
15                         wifi = &wireless_yellow;
16                 };
17         };
18
19         memory@0 {
20                 reg = <0x0 0x4000000>;
21         };
22         
23         fpi@10000000 {
24                 #address-cells = <1>;
25                 #size-cells = <1>;
26                 compatible = "lantiq,fpi", "simple-bus";
27                 ranges = <0x0 0x10000000 0xEEFFFFF>;
28                 reg = <0x10000000 0xEF00000>;
29
30                 localbus@0 {
31                         #address-cells = <2>;
32                         #size-cells = <1>;
33                         compatible = "lantiq,localbus", "simple-bus";
34                 };
35
36                 gpio: pinmux@E100B10 {
37                         compatible = "lantiq,pinctrl-xr9";
38                         pinctrl-names = "default";
39                         pinctrl-0 = <&state_default>;
40                         
41                         interrupt-parent = <&icu0>;
42                         interrupts = <166 135 66 40 41 42 38>;
43
44                         #gpio-cells = <2>;
45                         gpio-controller;
46                         reg = <0xE100B10 0xA0>;
47
48                         state_default: pinmux {
49                                 stp {
50                                         lantiq,groups = "stp";
51                                         lantiq,function = "stp";
52                                 };
53                                 spi {
54                                         lantiq,groups = "spi";
55                                         lantiq,function = "spi";
56                                 };
57                                 mdio {
58                                         lantiq,groups = "mdio";
59                                         lantiq,function = "mdio";
60                                 };
61                                 gphy-leds_out {
62                                         lantiq,pins = "io7", "io44";
63                                         lantiq,pull = <0>;
64                                         lantiq,output = <1>;
65                                 };
66                                 stp_out {
67                                         lantiq,pins = "io4", "io5", "io6";
68                                         lantiq,open-drain = <0>;
69                                         lantiq,output = <1>;
70                                         lantiq,pull = <0>;
71                                 };
72                                 pci-rst {
73                                         lantiq,pins = "io21";
74                                         lantiq,open-drain = <0>;
75                                         lantiq,pull = <0>;
76                                         lantiq,output = <1>;
77                                 };
78                                 gphy-leds {
79                                         lantiq,groups = "gphy0 led1", "gphy1 led0";
80                                         lantiq,function = "gphy";
81                                         lantiq,open-drain = <0>;
82                                         lantiq,pull = <0>;
83                                         lantiq,output = <1>;
84                                 };
85                         };
86                 };
87
88                 eth@E108000 {
89                         #address-cells = <1>;
90                         #size-cells = <0>;
91                         compatible = "lantiq,xrx200-net";
92                         reg = < 0xE108000 0x3000 /* switch */
93                                 0xE10B100 0x70 /* mdio */
94                                 0xE10B1D8 0x30 /* mii */
95                                 0xE10B308 0x30 /* pmac */
96                         >;
97                         interrupt-parent = <&icu0>;
98                         interrupts = <73 72>;
99
100                         lan: interface@0 {
101                                 compatible = "lantiq,xrx200-pdi";
102                                 #address-cells = <1>;
103                                 #size-cells = <0>;
104                                 reg = <0>;
105                                 mac-address = [ 00 11 22 33 44 55 ];
106
107                                 ethernet@0 {
108                                         compatible = "lantiq,xrx200-pdi-port";
109                                         reg = <0>;
110                                         phy-mode = "rgmii";
111                                         phy-handle = <&phy0>;
112                                 };
113                                 ethernet@1 {
114                                         compatible = "lantiq,xrx200-pdi-port";
115                                         reg = <1>;
116                                         phy-mode = "rgmii";
117                                         phy-handle = <&phy1>;
118                                 };
119                                 ethernet@2 {
120                                         compatible = "lantiq,xrx200-pdi-port";
121                                         reg = <2>;
122                                         phy-mode = "gmii";
123                                         phy-handle = <&phy11>;
124                                 };
125                                 ethernet@4 {
126                                         compatible = "lantiq,xrx200-pdi-port";
127                                         reg = <4>;
128                                         phy-mode = "gmii";
129                                         phy-handle = <&phy13>;
130                                 };
131                         };
132
133                         wan: interface@1 {
134                                 compatible = "lantiq,xrx200-pdi";
135                                 #address-cells = <1>;
136                                 #size-cells = <0>;
137                                 reg = <1>;
138                                 mac-address = [ 00 11 22 33 44 56 ];
139                                 lantiq,wan;
140                                 ethernet@5 {
141                                         compatible = "lantiq,xrx200-pdi-port";
142                                         reg = <5>;
143                                         phy-mode = "rgmii";
144                                         phy-handle = <&phy5>;
145                                 };
146                         };
147
148                         mdio@0 {
149                                 #address-cells = <1>;
150                                 #size-cells = <0>;
151                                 compatible = "lantiq,xrx200-mdio";
152                                 phy0: ethernet-phy@0 {
153                                         reg = <0x0>;
154                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
155                                         lantiq,c45-reg-init = <1 0 0 0>; 
156                                 };
157                                 phy1: ethernet-phy@1 {
158                                         reg = <0x1>;
159                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
160                                         lantiq,c45-reg-init = <1 0 0 0>; 
161                                 };
162                                 phy5: ethernet-phy@5 {
163                                         reg = <0x5>;
164                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
165                                         lantiq,c45-reg-init = <1 0 0 0>; 
166                                 };
167                                 phy11: ethernet-phy@11 {
168                                         reg = <0x11>;
169                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
170                                         lantiq,c45-reg-init = <1 0 0 0>; 
171                                 };
172                                 phy13: ethernet-phy@13 {
173                                         reg = <0x13>;
174                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
175                                         lantiq,c45-reg-init = <1 0 0 0>; 
176                                 };
177                         };
178                 };
179
180                 stp: stp@E100BB0 {
181                         compatible = "lantiq,gpio-stp-xway";
182                         reg = <0xE100BB0 0x40>;
183                         #gpio-cells = <2>;
184                         gpio-controller;
185
186                         lantiq,shadow = <0xffff>;
187                         lantiq,groups = <0x3>;
188                         lantiq,dsl = <0x0>;
189                         lantiq,phy1 = <0x0>;
190                         lantiq,phy2 = <0x0>;
191                         /* lantiq,rising; */
192                 };
193
194                 ifxhcd@E101000 {
195                         status = "okay";
196                         gpios = <&gpio 32 0>;
197                         lantiq,portmask = <0x3>;
198                 };
199
200                 pci@E105400 {
201                         status = "okay";
202                         #address-cells = <3>;
203                         #size-cells = <2>;
204                         #interrupt-cells = <1>;
205                         compatible = "lantiq,pci-xway";
206                         bus-range = <0x0 0x0>;
207                         ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000   /* pci memory */
208                                 0x1000000 0 0x00000000 0xAE00000 0 0x200000>; /* io space */
209                         reg = <0x7000000 0x8000         /* config space */
210                                 0xE105400 0x400>;       /* pci bridge */
211                         lantiq,bus-clock = <33333333>;
212                         /*lantiq,external-clock;*/
213                         lantiq,delay-hi = <0>; /* 0ns delay */
214                         lantiq,delay-lo = <0>; /* 0.0ns delay */
215                         interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
216                         interrupt-map = <
217                                 0x7000 0 0 1 &icu0 30 1 // slot 14, irq 30
218                                 >;
219                         gpio-reset = <&gpio 21 0>;
220                         req-mask = <0x1>;       /* GNT1 */
221                 };
222
223                 pcie@d900000 {
224                         status = "disabled";
225                 };
226         };
227
228         gphy-xrx200 {
229                 compatible = "lantiq,phy-xrx200";
230                 firmware1 = "lantiq/vr9_phy11g_a1x.bin";        /*VR9 1.1*/
231                 firmware2 = "lantiq/vr9_phy11g_a2x.bin";        /*VR9 1.2*/
232                 phys = [ 00 01 ];
233         };
234
235         ralink_eep {
236                 compatible = "ralink,eeprom";
237                 ralink,eeprom = "RT2860.eeprom";
238         };
239
240         gpio-keys-polled {
241                 compatible = "gpio-keys-polled";
242                 #address-cells = <1>;
243                 #size-cells = <0>;
244                 poll-interval = <100>;
245                 reset {
246                         label = "reset";
247                         gpios = <&gpio 9 1>;
248                         linux,code = <0x198>;
249                 };
250                 eco {
251                         label = "eco";
252                         gpios = <&gpio 41 1>;
253                         linux,code = <247>;
254                 };
255                 rfkill {
256                         label = "rfkill";
257                         gpios = <&gpio 45 1>;
258                         linux,code = <0xf7>;
259                 };
260                 wps {
261                         label = "wps";
262                         gpios = <&gpio 10 1>;
263                         linux,code = <0x211>;
264                 };
265         };
266
267         gpio-leds {
268                 compatible = "gpio-leds";
269
270                 eco {                                   /* blue */
271                         label = "eco";
272                         gpios = <&stp 2 1>;
273                 };
274                 wps_red {                               /* red */
275                         label = "wps_red";
276                         gpios = <&stp 3 1>;
277                 };
278                 wps_yellow {                            /* yellow */
279                         label = "wps_yellow";
280                         gpios = <&stp 4 1>;
281                 };
282                 upgrade {                               /* blue */
283                         label = "upgrade";
284                         gpios = <&stp 5 1>;
285                 };
286                 tv {                                    /* yellow */
287                         label = "tv";
288                         gpios = <&stp 6 1>;
289                 };
290                 internet_yellow: internet_yellow {                      /* yellow */
291                         label = "internet_yellow";
292                         gpios = <&stp 7 1>;
293                 };
294                 internet_red {                          /* red */
295                         label = "internet_red";
296                         gpios = <&stp 8 1>;
297                 };
298                 broadband_red {                         /* red */
299                         label = "broadband_red";
300                         gpios = <&stp 9 1>;
301                 };
302                 broadband_yellow: broadband_yellow {                    /* yellow */
303                         label = "broadband_yellow";
304                         gpios = <&stp 10 1>;
305                 };
306                 voice {                                 /* yellow */
307                         label = "voice";
308                         gpios = <&stp 11 1>;
309                 };
310                 wireless_red {                          /* red */
311                         label = "wireless_red";
312                         gpios = <&stp 12 1>;
313                 };
314                 wireless_yellow: wireless_yellow {                      /* yellow */
315                         label = "wireless_yellow";
316                         gpios = <&stp 13 1>;
317                 };
318                 power2: power2 {                                /* yellow */
319                         label = "power2";
320                         gpios = <&stp 14 1>;
321                 };
322                 power: power {                                  /* red */
323                         label = "power";
324                         gpios = <&stp 15 1>;
325                         default-state = "on";
326                 };
327         };
328 };