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