lantiq: xrx200: switch the subtarget to the mainline DSA driver
[openwrt/openwrt.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 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <100>;
31 reset {
32 label = "reset";
33 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36
37 wifi {
38 label = "wifi";
39 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
40 linux,code = <KEY_RFKILL>;
41 linux,input-type = <EV_SW>;
42 };
43
44 wps {
45 label = "wps";
46 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_WPS_BUTTON>;
48 };
49 };
50
51 leds: leds {
52 compatible = "gpio-leds";
53
54 /*
55 power is not controllable via gpio
56 */
57
58 led_dsl: dsl {
59 label = "green:dsl";
60 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
61 };
62
63 led_internet: internet {
64 label = "green:internet";
65 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
66 };
67
68 usb0 {
69 label = "green:usb";
70 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
71 trigger-sources = <&ehci_port1>;
72 linux,default-trigger = "usbport";
73 };
74
75 usb2 {
76 label = "green:usb2";
77 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
78 trigger-sources = <&ehci_port2>;
79 linux,default-trigger = "usbport";
80 };
81
82 led_wps: wps {
83 label = "green:wps";
84 gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
85 };
86 };
87
88 ath9k-leds {
89 compatible = "gpio-leds";
90
91 led_wifi: wifi {
92 label = "green:wifi";
93 gpios = <&ath9k 0 GPIO_ACTIVE_HIGH>;
94 linux,default-trigger = "phy0tpt";
95 };
96 };
97
98
99 usb_vbus: regulator-usb-vbus {
100 compatible = "regulator-fixed";
101
102 regulator-name = "USB_VBUS";
103
104 regulator-min-microvolt = <5000000>;
105 regulator-max-microvolt = <5000000>;
106
107 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
108 enable-active-high;
109 };
110 };
111
112 &eth0 {
113 mtd-mac-address = <&ath9k_cal 0xf100>;
114 };
115
116 &gphy0 {
117 lantiq,gphy-mode = <GPHY_MODE_GE>;
118 };
119
120 &gphy1 {
121 lantiq,gphy-mode = <GPHY_MODE_GE>;
122 };
123
124 &gpio {
125 pinctrl-names = "default";
126 pinctrl-0 = <&state_default>;
127
128 state_default: pinmux {
129 phy-rst {
130 lantiq,pins = "io42";
131 lantiq,pull = <0>;
132 lantiq,open-drain = <0>;
133 lantiq,output = <1>;
134 };
135 pcie-rst {
136 lantiq,pins = "io38";
137 lantiq,pull = <0>;
138 lantiq,output = <1>;
139 };
140 };
141 };
142
143 &gswip {
144 pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>;
145 pinctrl-names = "default";
146 };
147
148 &gswip_mdio {
149 phy0: ethernet-phy@0 {
150 reg = <0x0>;
151 // reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
152 };
153 phy5: ethernet-phy@5 {
154 reg = <0x5>;
155 };
156 phy11: ethernet-phy@11 {
157 reg = <0x11>;
158 };
159 phy13: ethernet-phy@13 {
160 reg = <0x13>;
161 };
162 };
163
164 &gswip_ports {
165 port@0 {
166 reg = <0>;
167 label = "lan2";
168 phy-mode = "rgmii";
169 phy-handle = <&phy0>;
170 };
171 port@2 {
172 reg = <2>;
173 label = "lan3";
174 phy-mode = "internal";
175 phy-handle = <&phy11>;
176 };
177 port@4 {
178 reg = <4>;
179 label = "lan4";
180 phy-mode = "internal";
181 phy-handle = <&phy13>;
182 };
183 port@5 {
184 reg = <5>;
185 label = "lan1";
186 phy-mode = "rgmii";
187 phy-handle = <&phy5>;
188 };
189 };
190
191 &pcie0 {
192 pcie@0 {
193 reg = <0 0 0 0 0>;
194 #interrupt-cells = <1>;
195 #size-cells = <2>;
196 #address-cells = <3>;
197 device_type = "pci";
198
199 ath9k: wifi@168c,002e {
200 compatible = "pci168c,002e";
201 reg = <0 0 0 0 0>;
202 #gpio-cells = <2>;
203 gpio-controller;
204 qca,no-eeprom;
205 qca,disable-5ghz;
206 mtd-mac-address = <&ath9k_cal 0xf100>;
207 mtd-mac-address-increment = <2>;
208 };
209 };
210 };
211
212 &spi {
213 status = "okay";
214
215 flash@4 {
216 compatible = "jedec,spi-nor";
217 reg = <4>;
218 spi-max-frequency = <33250000>;
219 m25p,fast-read;
220
221 partitions {
222 compatible = "fixed-partitions";
223 #address-cells = <1>;
224 #size-cells = <1>;
225
226 partition@0 {
227 reg = <0x0 0x20000>;
228 label = "u-boot";
229 read-only;
230 };
231
232 partition@20000 {
233 reg = <0x20000 0x7a0000>;
234 label = "firmware";
235 };
236
237 partition@7c0000 {
238 reg = <0x7c0000 0x10000>;
239 label = "config";
240 read-only;
241 };
242
243 ath9k_cal: partition@7d0000 {
244 reg = <0x7d0000 0x30000>;
245 label = "boardconfig";
246 read-only;
247 };
248 };
249 };
250 };
251
252 &usb_phy0 {
253 status = "okay";
254 };
255
256 &usb_phy1 {
257 status = "okay";
258 };
259
260 &usb0 {
261 status = "okay";
262 vbus-supply = <&usb_vbus>;
263 };
264
265 &usb1 {
266 status = "okay";
267 vbus-supply = <&usb_vbus>;
268 };