lantiq: use aliases device tree node for leds
[oweals/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         aliases {
12                 led-boot = &power_green;
13                 led-failsafe = &power_red;
14                 led-running = &power_green;
15
16                 led-dsl = &broadband_green;
17                 led-internet = &internet_green;
18                 led-wifi = &wireless_green;
19         };
20
21         memory@0 {
22                 reg = <0x0 0x4000000>;
23         };
24
25         cputemp@0 {
26                 compatible = "lantiq,cputemp";
27         };
28
29         fpi@10000000 {
30                 localbus@0 {
31                         nor-boot@0 {
32                                 compatible = "lantiq,nor";
33                                 bank-width = <2>;
34                                 reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
35                                 #address-cells = <1>;
36                                 #size-cells = <1>;
37
38                                 partitions {
39                                         compatible = "fixed-partitions";
40                                         #address-cells = <1>;
41                                         #size-cells = <1>;
42
43                                         boardconfig: partition@40000 {
44                                                 label = "board_config";
45                                                 reg = <0x40000 0x10000>;
46                                                 read-only;
47                                         };
48                                 };
49                         };
50                 };
51
52                 gpio: pinmux@E100B10 {
53                         pinctrl-names = "default";
54                         pinctrl-0 = <&state_default>;
55
56                         state_default: pinmux {
57                                 stp {
58                                         lantiq,groups = "stp";
59                                         lantiq,function = "stp";
60                                         lantiq,open-drain = <0>;
61                                         lantiq,output = <1>;
62                                         lantiq,pull = <0>;
63                                 };
64                                 mdio {
65                                         lantiq,groups = "mdio";
66                                         lantiq,function = "mdio";
67                                 };
68                                 pci-rst {
69                                         lantiq,pins = "io21";
70                                         lantiq,open-drain = <0>;
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                                         lantiq,pull = <0>;
79                                         lantiq,output = <1>;
80                                 };
81                         };
82                 };
83
84                 stp: stp@E100BB0 {
85                         compatible = "lantiq,gpio-stp-xway";
86                         reg = <0xE100BB0 0x40>;
87                         #gpio-cells = <2>;
88                         gpio-controller;
89
90                         lantiq,shadow = <0xffff>;
91                         lantiq,groups = <0x3>;
92                         lantiq,dsl = <0x0>;
93                         lantiq,phy1 = <0x0>;
94                         lantiq,phy2 = <0x0>;
95                         /* lantiq,rising; */
96                 };
97
98                 ifxhcd@E101000 {
99                         status = "okay";
100                         gpios = <&gpio 32 0>;
101                         lantiq,portmask = <0x3>;
102                 };
103
104                 ifxhcd@E106000 {
105                         status = "okay";
106                         gpios = <&gpio 32 0>;
107                 };
108
109                 pci@E105400 {
110                         status = "okay";
111                         lantiq,bus-clock = <33333333>;
112                         interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
113                         interrupt-map = <
114                                 0x7000 0 0 1 &icu0 30 1 // slot 14, irq 30
115                                 >;
116                         gpio-reset = <&gpio 21 0>;
117                         req-mask = <0x1>;       /* GNT1 */
118                 };
119
120                 pcie@d900000 {
121                         status = "disabled";
122                 };
123         };
124
125         gphy-xrx200 {
126                 compatible = "lantiq,phy-xrx200";
127                 firmware1 = "lantiq/vr9_phy11g_a1x.bin";        /*VR9 1.1*/
128                 firmware2 = "lantiq/vr9_phy11g_a2x.bin";        /*VR9 1.2*/
129                 phys = [ 00 01 ];
130         };
131
132         ralink_eep {
133                 compatible = "ralink,eeprom";
134                 ralink,eeprom = "RT2860.eeprom";
135         };
136
137         gpio-keys-polled {
138                 compatible = "gpio-keys-polled";
139                 #address-cells = <1>;
140                 #size-cells = <0>;
141                 poll-interval = <100>;
142                 reset {
143                         label = "reset";
144                         gpios = <&gpio 9 1>;
145                         linux,code = <0x198>;
146                 };
147                 eco {
148                         label = "eco";
149                         gpios = <&gpio 41 1>;
150                         linux,code = <247>;
151                 };
152                 rfkill {
153                         label = "rfkill";
154                         gpios = <&gpio 45 1>;
155                         linux,code = <0xf7>;
156                 };
157                 wps {
158                         label = "wps";
159                         gpios = <&gpio 10 1>;
160                         linux,code = <0x211>;
161                 };
162         };
163
164         gpio-leds {
165                 compatible = "gpio-leds";
166
167                 eco {
168                         label = "vgv7519:blue:eco";
169                         gpios = <&stp 2 1>;
170                 };
171                 wps_red {
172                         label = "vgv7519:red:wps";
173                         gpios = <&stp 3 1>;
174                 };
175                 wps_green {
176                         label = "vgv7519:green:wps";
177                         gpios = <&stp 4 1>;
178                 };
179                 upgrade {
180                         label = "vgv7519:blue:upgrade";
181                         gpios = <&stp 5 1>;
182                 };
183                 tv {
184                         label = "vgv7519:green:tv";
185                         gpios = <&stp 6 1>;
186                 };
187                 internet_green: internet_green {
188                         label = "vgv7519:green:internet";
189                         gpios = <&stp 7 1>;
190                 };
191                 internet_red {
192                         label = "vgv7519:red:internet";
193                         gpios = <&stp 8 1>;
194                 };
195                 broadband_red {
196                         label = "vgv7519:red:broadband";
197                         gpios = <&stp 9 1>;
198                 };
199                 broadband_green: broadband_green {
200                         label = "vgv7519:green:broadband";
201                         gpios = <&stp 10 1>;
202                 };
203                 voice {
204                         label = "vgv7519:green:voice";
205                         gpios = <&stp 11 1>;
206                 };
207                 wireless_red {
208                         label = "vgv7519:red:wireless";
209                         gpios = <&stp 12 1>;
210                 };
211                 wireless_green: wireless_green {
212                         label = "vgv7519:green:wireless";
213                         gpios = <&stp 13 1>;
214                 };
215                 power_green: power2 {
216                         label = "vgv7519:green:power";
217                         gpios = <&stp 14 1>;
218                         default-state = "keep";
219                 };
220                 power_red: power {
221                         label = "vgv7519:red:power";
222                         gpios = <&stp 15 1>;
223                 };
224         };
225 };
226
227 &eth0 {
228         lan: interface@0 {
229                 compatible = "lantiq,xrx200-pdi";
230                 #address-cells = <1>;
231                 #size-cells = <0>;
232                 reg = <0>;
233                 mtd-mac-address = <&boardconfig 0x16>;
234                 lantiq,switch;
235
236                 ethernet@0 {
237                         compatible = "lantiq,xrx200-pdi-port";
238                         reg = <0>;
239                         phy-mode = "rgmii";
240                         phy-handle = <&phy0>;
241                 };
242                 ethernet@1 {
243                         compatible = "lantiq,xrx200-pdi-port";
244                         reg = <1>;
245                         phy-mode = "rgmii";
246                         phy-handle = <&phy1>;
247                 };
248                 ethernet@2 {
249                         compatible = "lantiq,xrx200-pdi-port";
250                         reg = <2>;
251                         phy-mode = "gmii";
252                         phy-handle = <&phy11>;
253                 };
254                 ethernet@4 {
255                         compatible = "lantiq,xrx200-pdi-port";
256                         reg = <4>;
257                         phy-mode = "gmii";
258                         phy-handle = <&phy13>;
259                 };
260         };
261
262         wan: interface@1 {
263                 compatible = "lantiq,xrx200-pdi";
264                 #address-cells = <1>;
265                 #size-cells = <0>;
266                 reg = <1>;
267                 mtd-mac-address = <&boardconfig 0x16>;
268                 mtd-mac-address-increment = <2>;
269                 lantiq,wan;
270
271                 ethernet@5 {
272                         compatible = "lantiq,xrx200-pdi-port";
273                         reg = <5>;
274                         phy-mode = "rgmii";
275                         phy-handle = <&phy5>;
276                 };
277         };
278
279         mdio@0 {
280                 #address-cells = <1>;
281                 #size-cells = <0>;
282                 compatible = "lantiq,xrx200-mdio";
283                 phy0: ethernet-phy@0 {
284                         reg = <0x0>;
285                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
286                 };
287                 phy1: ethernet-phy@1 {
288                         reg = <0x1>;
289                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
290                 };
291                 phy5: ethernet-phy@5 {
292                         reg = <0x5>;
293                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
294                 };
295                 phy11: ethernet-phy@11 {
296                         reg = <0x11>;
297                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
298                 };
299                 phy13: ethernet-phy@13 {
300                         reg = <0x13>;
301                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
302                 };
303         };
304 };