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