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