aa6c308ffee3561b53853062fcfe13321e670ca0
[openwrt/staging/noltari.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_tplink_tdw89x0.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7 compatible = "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 /* the power led can't be controlled, use the wps led instead */
15 led-boot = &led_wps;
16 led-failsafe = &led_wps;
17
18 led-dsl = &led_dsl;
19 led-internet = &led_internet;
20 led-wifi = &led_wifi;
21 led-usb = &led_usb0;
22 led-usb2 = &led_usb2;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x4000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys-polled";
32 poll-interval = <100>;
33 reset {
34 label = "reset";
35 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38
39 wifi {
40 label = "wifi";
41 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
42 linux,code = <KEY_RFKILL>;
43 linux,input-type = <EV_SW>;
44 };
45
46 wps {
47 label = "wps";
48 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51 };
52
53 leds: leds {
54 compatible = "gpio-leds";
55
56 /*
57 power is not controllable via gpio
58 */
59
60 led_dsl: dsl {
61 label = "green:dsl";
62 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
63 };
64
65 led_internet: internet {
66 label = "green:internet";
67 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
68 };
69
70 led_usb0: usb0 {
71 label = "green:usb";
72 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
73 };
74
75 led_usb2: usb2 {
76 label = "green:usb2";
77 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
78 };
79
80 led_wps: wps {
81 label = "green:wps";
82 gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
83 };
84 };
85
86 ath9k-leds {
87 compatible = "gpio-leds";
88
89 led_wifi: wifi {
90 label = "green:wifi";
91 gpios = <&ath9k 0 GPIO_ACTIVE_HIGH>;
92 linux,default-trigger = "phy0tpt";
93 };
94 };
95
96
97 usb_vbus: regulator-usb-vbus {
98 compatible = "regulator-fixed";
99
100 regulator-name = "USB_VBUS";
101
102 regulator-min-microvolt = <5000000>;
103 regulator-max-microvolt = <5000000>;
104
105 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
106 enable-active-high;
107 };
108 };
109
110 &eth0 {
111 pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>;
112 pinctrl-names = "default";
113
114 interface@0 {
115 compatible = "lantiq,xrx200-pdi";
116 #address-cells = <1>;
117 #size-cells = <0>;
118 reg = <0>;
119 mtd-mac-address = <&ath9k_cal 0xf100>;
120 lantiq,switch;
121
122 ethernet@0 {
123 compatible = "lantiq,xrx200-pdi-port";
124 reg = <0>;
125 phy-mode = "rgmii";
126 phy-handle = <&phy0>;
127 // gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
128 };
129 ethernet@2 {
130 compatible = "lantiq,xrx200-pdi-port";
131 reg = <2>;
132 phy-mode = "gmii";
133 phy-handle = <&phy11>;
134 };
135 ethernet@4 {
136 compatible = "lantiq,xrx200-pdi-port";
137 reg = <4>;
138 phy-mode = "gmii";
139 phy-handle = <&phy13>;
140 };
141 ethernet@5 {
142 compatible = "lantiq,xrx200-pdi-port";
143 reg = <5>;
144 phy-mode = "rgmii";
145 phy-handle = <&phy5>;
146 };
147 };
148
149 mdio {
150 #address-cells = <1>;
151 #size-cells = <0>;
152 compatible = "lantiq,xrx200-mdio";
153
154 phy0: ethernet-phy@0 {
155 reg = <0x0>;
156 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
157 };
158 phy5: ethernet-phy@5 {
159 reg = <0x5>;
160 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
161 };
162 phy11: ethernet-phy@11 {
163 reg = <0x11>;
164 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
165 };
166 phy13: ethernet-phy@13 {
167 reg = <0x13>;
168 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
169 };
170 };
171 };
172
173 &gphy0 {
174 lantiq,gphy-mode = <GPHY_MODE_GE>;
175 };
176
177 &gphy1 {
178 lantiq,gphy-mode = <GPHY_MODE_GE>;
179 };
180
181 &gpio {
182 pinctrl-names = "default";
183 pinctrl-0 = <&state_default>;
184
185 state_default: pinmux {
186 phy-rst {
187 lantiq,pins = "io42";
188 lantiq,pull = <0>;
189 lantiq,open-drain = <0>;
190 lantiq,output = <1>;
191 };
192 pcie-rst {
193 lantiq,pins = "io38";
194 lantiq,pull = <0>;
195 lantiq,output = <1>;
196 };
197 };
198 };
199
200 &pcie0 {
201 pcie@0 {
202 reg = <0 0 0 0 0>;
203 #interrupt-cells = <1>;
204 #size-cells = <2>;
205 #address-cells = <3>;
206 device_type = "pci";
207
208 ath9k: wifi@168c,002e {
209 compatible = "pci168c,002e";
210 reg = <0 0 0 0 0>;
211 #gpio-cells = <2>;
212 gpio-controller;
213 qca,no-eeprom;
214 qca,disable-5ghz;
215 mtd-mac-address = <&ath9k_cal 0xf100>;
216 mtd-mac-address-increment = <2>;
217 };
218 };
219 };
220
221 &spi {
222 status = "okay";
223
224 flash@4 {
225 compatible = "jedec,spi-nor";
226 reg = <4>;
227 spi-max-frequency = <33250000>;
228 m25p,fast-read;
229
230 partitions {
231 compatible = "fixed-partitions";
232 #address-cells = <1>;
233 #size-cells = <1>;
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 };
259 };
260
261 &usb_phy0 {
262 status = "okay";
263 };
264
265 &usb_phy1 {
266 status = "okay";
267 };
268
269 &usb0 {
270 status = "okay";
271 vbus-supply = <&usb_vbus>;
272 };
273
274 &usb1 {
275 status = "okay";
276 vbus-supply = <&usb_vbus>;
277 };