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