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