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