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