6447451d183fdeb3a9285e2d2f384732c989a5ba
[openwrt/openwrt.git] / target / linux / lantiq / dts / TDW89X0.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 chosen {
7 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
8 };
9
10 aliases {
11 /* the power led can't be controlled, use the wps led instead */
12 led-boot = &wps;
13 led-failsafe = &wps;
14
15 led-dsl = &dsl;
16 led-internet = &internet;
17 led-usb = &usb0;
18 led-usb2 = &usb2;
19 };
20
21 memory@0 {
22 reg = <0x0 0x4000000>;
23 };
24
25 fpi@10000000 {
26 gpio: pinmux@E100B10 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&state_default>;
29
30 state_default: pinmux {
31 mdio {
32 lantiq,groups = "mdio";
33 lantiq,function = "mdio";
34 };
35 gphy-leds {
36 lantiq,groups = "gphy0 led1", "gphy1 led1";
37 lantiq,function = "gphy";
38 lantiq,pull = <2>;
39 lantiq,open-drain = <0>;
40 lantiq,output = <1>;
41 };
42 phy-rst {
43 lantiq,pins = "io42";
44 lantiq,pull = <0>;
45 lantiq,open-drain = <0>;
46 lantiq,output = <1>;
47 };
48 pcie-rst {
49 lantiq,pins = "io38";
50 lantiq,pull = <0>;
51 lantiq,output = <1>;
52 };
53 };
54 pins_spi_default: pins_spi_default {
55 spi_in {
56 lantiq,groups = "spi_di";
57 lantiq,function = "spi";
58 };
59 spi_out {
60 lantiq,groups = "spi_do", "spi_clk",
61 "spi_cs4";
62 lantiq,function = "spi";
63 lantiq,output = <1>;
64 };
65 };
66 };
67
68 ifxhcd@E101000 {
69 status = "okay";
70 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
71 lantiq,portmask = <0x3>;
72 };
73
74 ifxhcd@E106000 {
75 status = "okay";
76 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
77 };
78 };
79
80 gphy-xrx200 {
81 compatible = "lantiq,phy-xrx200";
82 firmware = "lantiq/vr9_phy11g_a2x.bin";
83 phys = [ 00 01 ];
84 };
85
86 ath9k_eep {
87 compatible = "ath9k,eeprom";
88 ath,eep-flash = <&ath9k_cal 0x21000>;
89 ath,mac-offset = <0xf100>;
90 ath,mac-increment = <2>;
91 ath,led-pin = <0>;
92 ath,disable-5ghz;
93 ath,led-active-high;
94 };
95
96 gpio-keys-polled {
97 compatible = "gpio-keys-polled";
98 #address-cells = <1>;
99 #size-cells = <0>;
100 poll-interval = <100>;
101 reset {
102 label = "reset";
103 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
104 linux,code = <KEY_RESTART>;
105 };
106
107 wifi {
108 label = "wifi";
109 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
110 linux,code = <KEY_RFKILL>;
111 linux,input-type = <EV_SW>;
112 };
113
114 wps {
115 label = "wps";
116 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
117 linux,code = <KEY_WPS_BUTTON>;
118 };
119 };
120
121 gpio-leds {
122 compatible = "gpio-leds";
123 /*
124 power is not controllable via gpio
125 */
126 dsl: dsl {
127 label = "tdw89x0:green:dsl";
128 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
129 };
130 internet: internet {
131 label = "tdw89x0:green:internet";
132 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
133 };
134 usb0: usb0 {
135 label = "tdw89x0:green:usb";
136 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
137 };
138 usb2: usb2 {
139 label = "tdw89x0:green:usb2";
140 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
141 };
142 wps: wps {
143 label = "tdw89x0:green:wps";
144 gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
145 };
146 };
147 };
148
149 &spi {
150 pinctrl-names = "default";
151 pinctrl-0 = <&pins_spi_default>;
152
153 status = "ok";
154
155 m25p80@4 {
156 #address-cells = <1>;
157 #size-cells = <1>;
158 compatible = "jedec,spi-nor";
159 reg = <4 0>;
160 spi-max-frequency = <33250000>;
161 m25p,fast-read;
162
163 partitions {
164 compatible = "fixed-partitions";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 partition@0 {
169 reg = <0x0 0x20000>;
170 label = "u-boot";
171 read-only;
172 };
173
174 partition@20000 {
175 reg = <0x20000 0x7a0000>;
176 label = "firmware";
177 };
178
179 partition@7c0000 {
180 reg = <0x7c0000 0x10000>;
181 label = "config";
182 read-only;
183 };
184
185 ath9k_cal: partition@7d0000 {
186 reg = <0x7d0000 0x30000>;
187 label = "boardconfig";
188 read-only;
189 };
190 };
191 };
192 };
193
194 &eth0 {
195 lan: interface@0 {
196 compatible = "lantiq,xrx200-pdi";
197 #address-cells = <1>;
198 #size-cells = <0>;
199 reg = <0>;
200 mtd-mac-address = <&ath9k_cal 0xf100>;
201 lantiq,switch;
202
203 ethernet@0 {
204 compatible = "lantiq,xrx200-pdi-port";
205 reg = <0>;
206 phy-mode = "rgmii";
207 phy-handle = <&phy0>;
208 // gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
209 };
210 ethernet@5 {
211 compatible = "lantiq,xrx200-pdi-port";
212 reg = <5>;
213 phy-mode = "rgmii";
214 phy-handle = <&phy5>;
215 };
216 ethernet@2 {
217 compatible = "lantiq,xrx200-pdi-port";
218 reg = <2>;
219 phy-mode = "gmii";
220 phy-handle = <&phy11>;
221 };
222 ethernet@3 {
223 compatible = "lantiq,xrx200-pdi-port";
224 reg = <4>;
225 phy-mode = "gmii";
226 phy-handle = <&phy13>;
227 };
228 };
229
230 mdio@0 {
231 #address-cells = <1>;
232 #size-cells = <0>;
233 compatible = "lantiq,xrx200-mdio";
234 phy0: ethernet-phy@0 {
235 reg = <0x0>;
236 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
237 };
238 phy5: ethernet-phy@5 {
239 reg = <0x5>;
240 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
241 };
242 phy11: ethernet-phy@11 {
243 reg = <0x11>;
244 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
245 };
246 phy13: ethernet-phy@13 {
247 reg = <0x13>;
248 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
249 };
250 };
251 };