lantiq: enable switch on td8970
[openwrt/openwrt.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";
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 gphy-leds {
27 lantiq,groups = "gphy0 led1", "gphy1 led1";
28 lantiq,function = "gphy";
29 lantiq,pull = <2>;
30 lantiq,open-drain = <0>;
31 lantiq,output = <1>;
32 };
33 phy-rst {
34 lantiq,pins = "io42";
35 lantiq,pull = <0>;
36 lantiq,open-drain = <0>;
37 lantiq,output = <1>;
38 };
39 spi-in {
40 lantiq,pins = "io16";
41 lantiq,open-drain = <1>;
42 lantiq,pull = <2>;
43 };
44 spi-out {
45 lantiq,pins = "io10", "io17", "io18", "io21";
46 lantiq,open-drain = <0>;
47 lantiq,pull = <2>;
48 };
49 pcie-rst {
50 lantiq,pins = "io38";
51 lantiq,pull = <0>;
52 lantiq,output = <1>;
53 };
54 };
55 };
56
57 eth@E108000 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "lantiq,xrx200-net";
61 reg = < 0xE108000 0x3000 /* switch */
62 0xE10B100 0x70 /* mdio */
63 0xE10B1D8 0x30 /* mii */
64 0xE10B308 0x30 /* pmac */
65 >;
66 interrupt-parent = <&icu0>;
67 interrupts = <73 72>;
68 lantiq,switch;
69
70 lan: interface@0 {
71 compatible = "lantiq,xrx200-pdi";
72 #address-cells = <1>;
73 #size-cells = <0>;
74 reg = <0>;
75 mac-address = [ 00 11 22 33 44 55 ];
76
77 ethernet@0 {
78 compatible = "lantiq,xrx200-pdi-port";
79 reg = <0>;
80 phy-mode = "rgmii";
81 phy-handle = <&phy0>;
82 // gpios = <&gpio 42 1>;
83 };
84 ethernet@5 {
85 compatible = "lantiq,xrx200-pdi-port";
86 reg = <5>;
87 phy-mode = "rgmii";
88 phy-handle = <&phy5>;
89 };
90 ethernet@2 {
91 compatible = "lantiq,xrx200-pdi-port";
92 reg = <2>;
93 phy-mode = "gmii";
94 phy-handle = <&phy11>;
95 };
96 ethernet@3 {
97 compatible = "lantiq,xrx200-pdi-port";
98 reg = <4>;
99 phy-mode = "gmii";
100 phy-handle = <&phy13>;
101 };
102 };
103
104 mdio@0 {
105 #address-cells = <1>;
106 #size-cells = <0>;
107 compatible = "lantiq,xrx200-mdio";
108 phy0: ethernet-phy@0 {
109 reg = <0x0>;
110 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
111 };
112 phy5: ethernet-phy@5 {
113 reg = <0x5>;
114 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
115 };
116 phy11: ethernet-phy@11 {
117 reg = <0x11>;
118 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
119 };
120 phy13: ethernet-phy@13 {
121 reg = <0x13>;
122 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
123 };
124 };
125 };
126
127 ifxhcd@E101000 {
128 status = "okay";
129 gpios = <&gpio 33 0>;
130 lantiq,portmask = <0x3>;
131 };
132 };
133
134 gphy-xrx200 {
135 compatible = "lantiq,phy-xrx200";
136 firmware = "lantiq/vr9_phy11g_a2x.bin";
137 phys = [ 00 01 ];
138 };
139
140 pcie {
141 compatible = "lantiq,pcie-xway";
142 };
143
144 spi {
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 compatible = "spi-gpio";
149
150 gpio-miso = <&gpio 16 0>;
151 gpio-mosi = <&gpio 17 0>;
152 gpio-sck = <&gpio 18 0>;
153 num-chipselects = <1>;
154 cs-gpios = <&gpio 10 1>;
155
156 m25p80@0 {
157 #address-cells = <1>;
158 #size-cells = <1>;
159 compatible = "en25q64", "m25p80";
160 reg = <0 0>;
161 linux,modalias = "en25q64";
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,led-pin = <0>;
198 };
199
200 gpio-keys-polled {
201 compatible = "gpio-keys-polled";
202 #address-cells = <1>;
203 #size-cells = <0>;
204 poll-interval = <100>;
205 power {
206 label = "reset";
207 gpios = <&gpio 0 1>;
208 linux,code = <0x100>;
209 };
210
211 wifi {
212 label = "wifi";
213 gpios = <&gpio 9 0>;
214 linux,code = <0xf7>;
215 linux,input-type = <5>; /* EV_SW */
216 };
217
218 wps {
219 label = "wps";
220 gpios = <&gpio 39 1>;
221 linux,code = <0x211>;
222 };
223 };
224
225 gpio-leds {
226 compatible = "gpio-leds";
227
228 dsl {
229 label = "dsl";
230 gpios = <&gpio 4 0>;
231 };
232 internet {
233 label = "internet";
234 gpios = <&gpio 5 0>;
235 };
236 usb0 {
237 label = "usb";
238 gpios = <&gpio 19 0>;
239 };
240 usb2 {
241 label = "usb2";
242 gpios = <&gpio 20 0>;
243 };
244 wps {
245 label = "wps";
246 gpios = <&gpio 37 0>;
247 };
248 };
249 };