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