b7be27e101267f88ba6434ea1425c9b1007ce5c9
[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 ath9k_eep {
155 compatible = "ath9k,eeprom";
156 ath,eep-flash = <&ath9k_cal 0x21000>;
157 ath,mac-offset = <0xf100>;
158 ath,mac-increment;
159 ath,led-pin = <0>;
160 ath,disable-5ghz;
161 ath,led-active-high;
162 };
163
164 gpio-keys-polled {
165 compatible = "gpio-keys-polled";
166 #address-cells = <1>;
167 #size-cells = <0>;
168 poll-interval = <100>;
169 reset {
170 label = "reset";
171 gpios = <&gpio 0 1>;
172 linux,code = <0x198>;
173 };
174
175 wifi {
176 label = "wifi";
177 gpios = <&gpio 9 0>;
178 linux,code = <0xf7>;
179 linux,input-type = <5>; /* EV_SW */
180 };
181
182 wps {
183 label = "wps";
184 gpios = <&gpio 39 1>;
185 linux,code = <0x211>;
186 };
187 };
188
189 gpio-leds {
190 compatible = "gpio-leds";
191 /*
192 power is not controllable via gpio
193 */
194 dsl: dsl {
195 label = "tdw89x0:green:dsl";
196 gpios = <&gpio 4 0>;
197 };
198 internet: internet {
199 label = "tdw89x0:green:internet";
200 gpios = <&gpio 5 0>;
201 };
202 usb0: usb0 {
203 label = "tdw89x0:green:usb";
204 gpios = <&gpio 19 0>;
205 };
206 usb2: usb2 {
207 label = "tdw89x0:green:usb2";
208 gpios = <&gpio 20 0>;
209 };
210 wps: wps {
211 label = "tdw89x0:green:wps";
212 gpios = <&gpio 37 0>;
213 };
214 };
215 };
216
217 &spi {
218 pinctrl-names = "default";
219 pinctrl-0 = <&pins_spi_default>;
220
221 status = "ok";
222
223 m25p80@4 {
224 #address-cells = <1>;
225 #size-cells = <1>;
226 compatible = "jedec,spi-nor";
227 reg = <4 0>;
228 spi-max-frequency = <33250000>;
229 m25p,fast-read;
230
231 partition@0 {
232 reg = <0x0 0x20000>;
233 label = "u-boot";
234 read-only;
235 };
236
237 partition@20000 {
238 reg = <0x20000 0x7a0000>;
239 label = "firmware";
240 };
241
242 partition@7c0000 {
243 reg = <0x7c0000 0x10000>;
244 label = "config";
245 read-only;
246 };
247
248 ath9k_cal: partition@7d0000 {
249 reg = <0x7d0000 0x30000>;
250 label = "boardconfig";
251 read-only;
252 };
253 };
254 };