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