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