lantiq: define default leds in dts files
[openwrt.git] / target / linux / lantiq / dts / TDW89X0.dtsi
1 /include/ "vr9.dtsi"
2
3 / {
4         chosen {
5                 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
6
7                 leds {
8                         dsl = &dsl;
9                         internet = &internet;
10                         /* the power led can't be controlled, use the wps led instead */
11                         power = &wps;
12                         usb = &usb0;
13                         usb2 = &usb2;
14                 };
15         };
16
17         memory@0 {
18                 reg = <0x0 0x4000000>;
19         };
20
21         fpi@10000000 {
22                 spi@E100800 {
23                         compatible = "lantiq,spi-xway";
24                         reg = <0xE100800 0x100>;
25                         interrupt-parent = <&icu0>;
26                         interrupts = <22 23 24>;
27                         #address-cells = <1>;
28                         #size-cells = <1>;
29                         m25p80@0 {
30                                 #address-cells = <1>;
31                                 #size-cells = <1>;
32                                 compatible = "jedec,spi-nor";
33                                 reg = <3 0>;
34                                 spi-max-frequency = <33250000>;
35                                 m25p,fast-read;
36
37                                 partition@0 {
38                                         reg = <0x0 0x20000>;
39                                         label = "u-boot";
40                                         read-only;
41                                 };
42
43                                 partition@20000 {
44                                         reg = <0x20000 0x7a0000>;
45                                         label = "firmware";
46                                 };
47
48                                 partition@7c0000 {
49                                         reg = <0x7c0000 0x10000>;
50                                         label = "config";
51                                         read-only;
52                                 };
53
54                                 ath9k_cal: partition@7d0000 {
55                                         reg = <0x7d0000 0x30000>;
56                                         label = "boardconfig";
57                                         read-only;
58                                 };
59                         };
60                 };
61
62                 gpio: pinmux@E100B10 {
63                         pinctrl-names = "default";
64                         pinctrl-0 = <&state_default>;
65
66                         state_default: pinmux {
67                                 mdio {
68                                         lantiq,groups = "mdio";
69                                         lantiq,function = "mdio";
70                                 };
71                                 gphy-leds {
72                                         lantiq,groups = "gphy0 led1", "gphy1 led1";
73                                         lantiq,function = "gphy";
74                                         lantiq,pull = <2>;
75                                         lantiq,open-drain = <0>;
76                                         lantiq,output = <1>;
77                                 };
78                                 phy-rst {
79                                         lantiq,pins = "io42";
80                                         lantiq,pull = <0>;
81                                         lantiq,open-drain = <0>;
82                                         lantiq,output = <1>;
83                                 };
84                                 spi {
85                                         lantiq,groups = "spi", "spi_cs4";
86                                         lantiq,function = "spi";
87                                 };
88                                 pcie-rst {
89                                         lantiq,pins = "io38";
90                                         lantiq,pull = <0>;
91                                         lantiq,output = <1>;
92                                 };
93                         };
94                 };
95
96                 eth@E108000 {
97                         #address-cells = <1>;
98                         #size-cells = <0>;
99                         compatible = "lantiq,xrx200-net";
100                         reg = < 0xE108000 0x3000 /* switch */
101                                 0xE10B100 0x70 /* mdio */
102                                 0xE10B1D8 0x30 /* mii */
103                                 0xE10B308 0x30 /* pmac */
104                         >;
105                         interrupt-parent = <&icu0>;
106                         interrupts = <73 72>;
107
108                         lan: interface@0 {
109                                 compatible = "lantiq,xrx200-pdi";
110                                 #address-cells = <1>;
111                                 #size-cells = <0>;
112                                 reg = <0>;
113                                 mtd-mac-address = <&ath9k_cal 0xf100>;
114                                 lantiq,switch;
115
116                                 ethernet@0 {
117                                         compatible = "lantiq,xrx200-pdi-port";
118                                         reg = <0>;
119                                         phy-mode = "rgmii";
120                                         phy-handle = <&phy0>;
121                                         // gpios = <&gpio 42 1>;
122                                 };
123                                 ethernet@5 {
124                                         compatible = "lantiq,xrx200-pdi-port";
125                                         reg = <5>;
126                                         phy-mode = "rgmii";
127                                         phy-handle = <&phy5>;
128                                 };
129                                 ethernet@2 {
130                                         compatible = "lantiq,xrx200-pdi-port";
131                                         reg = <2>;
132                                         phy-mode = "gmii";
133                                         phy-handle = <&phy11>;
134                                 };
135                                 ethernet@3 {
136                                         compatible = "lantiq,xrx200-pdi-port";
137                                         reg = <4>;
138                                         phy-mode = "gmii";
139                                         phy-handle = <&phy13>;
140                                 };
141                         };
142
143                         mdio@0 {
144                                 #address-cells = <1>;
145                                 #size-cells = <0>;
146                                 compatible = "lantiq,xrx200-mdio";
147                                 phy0: ethernet-phy@0 {
148                                         reg = <0x0>;
149                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
150                                 };
151                                 phy5: ethernet-phy@5 {
152                                         reg = <0x5>;
153                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
154                                 };
155                                 phy11: ethernet-phy@11 {
156                                         reg = <0x11>;
157                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
158                                 };
159                                 phy13: ethernet-phy@13 {
160                                         reg = <0x13>;
161                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
162                                 };
163                         };
164                 };
165
166                 ifxhcd@E101000 {
167                         status = "okay";
168                         gpios = <&gpio 33 0>;
169                         lantiq,portmask = <0x3>;
170                 };
171
172                 ifxhcd@E106000 {
173                         status = "okay";
174                         gpios = <&gpio 33 0>;
175                 };
176         };
177
178         gphy-xrx200 {
179                 compatible = "lantiq,phy-xrx200";
180                 firmware = "lantiq/vr9_phy11g_a2x.bin";
181                 phys = [ 00 01 ];
182         };
183
184         pcie {
185                 compatible = "lantiq,pcie-xway";
186         };
187
188         ath9k_eep {
189                 compatible = "ath9k,eeprom";
190                 ath,eep-flash = <&ath9k_cal 0x21000>;
191                 ath,mac-offset = <0xf100>;
192                 ath,mac-increment;
193                 ath,led-pin = <0>;
194                 ath,disable-5ghz;
195                 ath,led-active-high;
196         };
197
198         gpio-keys-polled {
199                 compatible = "gpio-keys-polled";
200                 #address-cells = <1>;
201                 #size-cells = <0>;
202                 poll-interval = <100>;
203                 reset {
204                         label = "reset";
205                         gpios = <&gpio 0 1>;
206                         linux,code = <0x198>;
207                 };
208
209                 wifi {
210                         label = "wifi";
211                         gpios = <&gpio 9 0>;
212                         linux,code = <0xf7>;
213                         linux,input-type = <5>; /* EV_SW */
214                 };
215
216                 wps {
217                         label = "wps";
218                         gpios = <&gpio 39 1>;
219                         linux,code = <0x211>;
220                 };
221         };
222
223         gpio-leds {
224                 compatible = "gpio-leds";
225
226                 dsl: dsl {
227                         label = "dsl";
228                         gpios = <&gpio 4 0>;
229                 };
230                 internet: internet {
231                         label = "internet";
232                         gpios = <&gpio 5 0>;
233                 };
234                 usb0: usb0 {
235                         label = "usb";
236                         gpios = <&gpio 19 0>;
237                 };
238                 usb2: usb2 {
239                         label = "usb2";
240                         gpios = <&gpio 20 0>;
241                 };
242                 wps: wps {
243                         label = "wps";
244                         gpios = <&gpio 37 0>;
245                 };
246         };
247 };