ixp4xx: Update to 4.9 kernel, refresh patches. Remove kmod-spi-gpio-old usage.
[oweals/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";
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                 pci0: pci@E105400 {
83                         status = "okay";
84                         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
85                 };
86         };
87
88         gphy-xrx200 {
89                 compatible = "lantiq,phy-xrx200";
90                 firmware = "lantiq/vr9_phy11g_a2x.bin";
91                 phys = [ 00 01 ];
92         };
93
94         gpio-keys-polled {
95                 compatible = "gpio-keys-polled";
96                 #address-cells = <1>;
97                 #size-cells = <0>;
98                 poll-interval = <100>;
99                 reset {
100                         label = "reset";
101                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
102                         linux,code = <KEY_RESTART>;
103                 };
104
105                 wifi {
106                         label = "wifi";
107                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
108                         linux,code = <KEY_RFKILL>;
109                         linux,input-type = <EV_SW>;
110                 };
111
112                 wps {
113                         label = "wps";
114                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
115                         linux,code = <KEY_WPS_BUTTON>;
116                 };
117
118                 dect_paging {
119                         label = "dect_paging";
120                         gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
121                         linux,code = <KEY_PHONE>;
122                 };
123         };
124
125         gpio-leds {
126                 compatible = "gpio-leds";
127                 power: power {
128                         label = "vr200v:blue:power";
129                         gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
130                 };
131                 dsl: dsl {
132                         label = "vr200v:blue:dsl";
133                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
134                 };
135                 internet: internet {
136                         label = "vr200v:blue:internet";
137                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
138                 };
139                 usb: usb {
140                         label = "vr200v:blue:usb";
141                         gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
142                 };
143                 eth {
144                         label = "vr200v:blue:lan";
145                         gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
146                 };
147                 wlan {
148                         label = "vr200v:blue:wlan";
149                         gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
150                 };
151                 wlan5g {
152                         label = "vr200v:blue:wlan5g";
153                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
154                 };
155                 phone {
156                         label = "vr200v:blue:phone";
157                         gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
158                 };
159         };
160 };
161
162 &spi {
163         pinctrl-names = "default";
164         pinctrl-0 = <&pins_spi_default>;
165
166         status = "ok";
167
168         m25p80@4 {
169                 #address-cells = <1>;
170                 #size-cells = <1>;
171                 compatible = "jedec,spi-nor";
172                 reg = <4 0>;
173                 spi-max-frequency = <33250000>;
174                 m25p,fast-read;
175
176                 partitions {
177                         compatible = "fixed-partitions";
178                         #address-cells = <1>;
179                         #size-cells = <1>;
180
181                         partition@0 {
182                                 reg = <0x0 0x20000>;
183                                 label = "u-boot";
184                                 read-only;
185                         };
186
187                         partition@20000 {
188                                 reg = <0x20000 0xf90000>;
189                                 label = "firmware";
190                         };
191
192                         partition@fb0000 {
193                                 reg = <0xfb0000 0x10000>;
194                                 label = "radioDECT";
195                                 read-only;
196                         };
197
198                         partition@fc0000 {
199                                 reg = <0xfc0000 0x10000>;
200                                 label = "config";
201                                 read-only;
202                         };
203
204                         romfile: partition@fd0000 {
205                                 reg = <0xfd0000 0x10000>;
206                                 label = "romfile";
207                                 read-only;
208                         };
209
210                         partition@fe0000 {
211                                 reg = <0xfe0000 0x10000>;
212                                 label = "rom";
213                                 read-only;
214                         };
215
216                         partition@ff0000 {
217                                 reg = <0xff0000 0x10000>;
218                                 label = "radio";
219                                 read-only;
220                         };
221                 };
222         };
223 };
224
225 &eth0 {
226         lan: interface@0 {
227                 compatible = "lantiq,xrx200-pdi";
228                 #address-cells = <1>;
229                 #size-cells = <0>;
230                 reg = <0>;
231                 mtd-mac-address = <&romfile 0xf100>;
232                 lantiq,switch;
233
234                 ethernet@0 {
235                         compatible = "lantiq,xrx200-pdi-port";
236                         reg = <0>;
237                         phy-mode = "rgmii";
238                         phy-handle = <&phy0>;
239                         // gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
240                 };
241                 ethernet@5 {
242                         compatible = "lantiq,xrx200-pdi-port";
243                         reg = <5>;
244                         phy-mode = "rgmii";
245                         phy-handle = <&phy5>;
246                 };
247                 ethernet@2 {
248                         compatible = "lantiq,xrx200-pdi-port";
249                         reg = <2>;
250                         phy-mode = "gmii";
251                         phy-handle = <&phy11>;
252                 };
253                 ethernet@3 {
254                         compatible = "lantiq,xrx200-pdi-port";
255                         reg = <4>;
256                         phy-mode = "gmii";
257                         phy-handle = <&phy13>;
258                 };
259         };
260
261         mdio@0 {
262                 #address-cells = <1>;
263                 #size-cells = <0>;
264                 compatible = "lantiq,xrx200-mdio";
265                 phy0: ethernet-phy@0 {
266                         reg = <0x0>;
267                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
268                 };
269                 phy5: ethernet-phy@5 {
270                         reg = <0x5>;
271                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
272                 };
273                 phy11: ethernet-phy@11 {
274                         reg = <0x11>;
275                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
276                 };
277                 phy13: ethernet-phy@13 {
278                         reg = <0x13>;
279                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
280                 };
281         };
282 };