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