lantiq: Switch FRITZ3370 from spi-gpio to the hardware SPI driver
[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                 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                                 spi {
47                                         lantiq,groups = "spi", "spi_cs4";
48                                         lantiq,function = "spi";
49                                 };
50                                 pcie-rst {
51                                         lantiq,pins = "io38";
52                                         lantiq,pull = <0>;
53                                         lantiq,output = <1>;
54                                 };
55                         };
56                 };
57
58                 eth@E108000 {
59                         #address-cells = <1>;
60                         #size-cells = <0>;
61                         compatible = "lantiq,xrx200-net";
62                         reg = < 0xE108000 0x3000 /* switch */
63                                 0xE10B100 0x70 /* mdio */
64                                 0xE10B1D8 0x30 /* mii */
65                                 0xE10B308 0x30 /* pmac */
66                         >;
67                         interrupt-parent = <&icu0>;
68                         interrupts = <73 72>;
69
70                         lan: interface@0 {
71                                 compatible = "lantiq,xrx200-pdi";
72                                 #address-cells = <1>;
73                                 #size-cells = <0>;
74                                 reg = <0>;
75                                 mtd-mac-address = <&ath9k_cal 0xf100>;
76                                 lantiq,switch;
77
78                                 ethernet@0 {
79                                         compatible = "lantiq,xrx200-pdi-port";
80                                         reg = <0>;
81                                         phy-mode = "rgmii";
82                                         phy-handle = <&phy0>;
83                                         // gpios = <&gpio 42 1>;
84                                 };
85                                 ethernet@5 {
86                                         compatible = "lantiq,xrx200-pdi-port";
87                                         reg = <5>;
88                                         phy-mode = "rgmii";
89                                         phy-handle = <&phy5>;
90                                 };
91                                 ethernet@2 {
92                                         compatible = "lantiq,xrx200-pdi-port";
93                                         reg = <2>;
94                                         phy-mode = "gmii";
95                                         phy-handle = <&phy11>;
96                                 };
97                                 ethernet@3 {
98                                         compatible = "lantiq,xrx200-pdi-port";
99                                         reg = <4>;
100                                         phy-mode = "gmii";
101                                         phy-handle = <&phy13>;
102                                 };
103                         };
104
105                         mdio@0 {
106                                 #address-cells = <1>;
107                                 #size-cells = <0>;
108                                 compatible = "lantiq,xrx200-mdio";
109                                 phy0: ethernet-phy@0 {
110                                         reg = <0x0>;
111                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
112                                 };
113                                 phy5: ethernet-phy@5 {
114                                         reg = <0x5>;
115                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
116                                 };
117                                 phy11: ethernet-phy@11 {
118                                         reg = <0x11>;
119                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
120                                 };
121                                 phy13: ethernet-phy@13 {
122                                         reg = <0x13>;
123                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
124                                 };
125                         };
126                 };
127
128                 ifxhcd@E101000 {
129                         status = "okay";
130                         gpios = <&gpio 33 0>;
131                         lantiq,portmask = <0x3>;
132                 };
133
134                 ifxhcd@E106000 {
135                         status = "okay";
136                         gpios = <&gpio 33 0>;
137                 };
138         };
139
140         gphy-xrx200 {
141                 compatible = "lantiq,phy-xrx200";
142                 firmware = "lantiq/vr9_phy11g_a2x.bin";
143                 phys = [ 00 01 ];
144         };
145
146         pcie {
147                 compatible = "lantiq,pcie-xway";
148         };
149
150         ath9k_eep {
151                 compatible = "ath9k,eeprom";
152                 ath,eep-flash = <&ath9k_cal 0x21000>;
153                 ath,mac-offset = <0xf100>;
154                 ath,mac-increment;
155                 ath,led-pin = <0>;
156                 ath,disable-5ghz;
157                 ath,led-active-high;
158         };
159
160         gpio-keys-polled {
161                 compatible = "gpio-keys-polled";
162                 #address-cells = <1>;
163                 #size-cells = <0>;
164                 poll-interval = <100>;
165                 reset {
166                         label = "reset";
167                         gpios = <&gpio 0 1>;
168                         linux,code = <0x198>;
169                 };
170
171                 wifi {
172                         label = "wifi";
173                         gpios = <&gpio 9 0>;
174                         linux,code = <0xf7>;
175                         linux,input-type = <5>; /* EV_SW */
176                 };
177
178                 wps {
179                         label = "wps";
180                         gpios = <&gpio 39 1>;
181                         linux,code = <0x211>;
182                 };
183         };
184
185         gpio-leds {
186                 compatible = "gpio-leds";
187                 /*
188                         power is not controllable via gpio
189         */
190                 dsl: dsl {
191                         label = "tdw89x0:green:dsl";
192                         gpios = <&gpio 4 0>;
193                 };
194                 internet: internet {
195                         label = "tdw89x0:green:internet";
196                         gpios = <&gpio 5 0>;
197                 };
198                 usb0: usb0 {
199                         label = "tdw89x0:green:usb";
200                         gpios = <&gpio 19 0>;
201                 };
202                 usb2: usb2 {
203                         label = "tdw89x0:green:usb2";
204                         gpios = <&gpio 20 0>;
205                 };
206                 wps: wps {
207                         label = "tdw89x0:green:wps";
208                         gpios = <&gpio 37 0>;
209                 };
210         };
211 };
212
213 &spi {
214         status = "ok";
215
216         m25p80@3 {
217                 #address-cells = <1>;
218                 #size-cells = <1>;
219                 compatible = "jedec,spi-nor";
220                 reg = <3 0>;
221                 spi-max-frequency = <33250000>;
222                 m25p,fast-read;
223
224                 partition@0 {
225                         reg = <0x0 0x20000>;
226                         label = "u-boot";
227                         read-only;
228                 };
229
230                 partition@20000 {
231                         reg = <0x20000 0x7a0000>;
232                         label = "firmware";
233                 };
234
235                 partition@7c0000 {
236                         reg = <0x7c0000 0x10000>;
237                         label = "config";
238                         read-only;
239                 };
240
241                 ath9k_cal: partition@7d0000 {
242                         reg = <0x7d0000 0x30000>;
243                         label = "boardconfig";
244                         read-only;
245                 };
246         };
247 };