8ffa9146d933679a0407bf5c5a5eb27e6fad59c4
[oweals/openwrt.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / VGV7519.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 = "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9";
8
9         chosen {
10                 bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp";
11         };
12
13         aliases {
14                 led-boot = &power_green;
15                 led-failsafe = &power_red;
16                 led-running = &power_green;
17                 led-upgrade = &power_green;
18
19                 led-dsl = &broadband_green;
20                 led-internet = &internet_green;
21                 led-wifi = &wireless_green;
22         };
23
24         memory@0 {
25                 reg = <0x0 0x4000000>;
26         };
27
28         gpio-keys-polled {
29                 compatible = "gpio-keys-polled";
30                 #address-cells = <1>;
31                 #size-cells = <0>;
32                 poll-interval = <100>;
33                 reset {
34                         label = "reset";
35                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_RESTART>;
37                 };
38                 eco {
39                         label = "eco";
40                         gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
41                         linux,code = <BTN_0>;
42                 };
43                 rfkill {
44                         label = "rfkill";
45                         gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RFKILL>;
47                 };
48                 wps {
49                         label = "wps";
50                         gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_WPS_BUTTON>;
52                 };
53         };
54
55         gpio-leds {
56                 compatible = "gpio-leds";
57
58                 eco {
59                         label = "vgv7519:blue:eco";
60                         gpios = <&stp 2 GPIO_ACTIVE_LOW>;
61                 };
62                 wps_red {
63                         label = "vgv7519:red:wps";
64                         gpios = <&stp 3 GPIO_ACTIVE_LOW>;
65                 };
66                 wps_green {
67                         label = "vgv7519:green:wps";
68                         gpios = <&stp 4 GPIO_ACTIVE_LOW>;
69                 };
70                 upgrade {
71                         label = "vgv7519:blue:upgrade";
72                         gpios = <&stp 5 GPIO_ACTIVE_LOW>;
73                 };
74                 tv {
75                         label = "vgv7519:green:tv";
76                         gpios = <&stp 6 GPIO_ACTIVE_LOW>;
77                 };
78                 internet_green: internet_green {
79                         label = "vgv7519:green:internet";
80                         gpios = <&stp 7 GPIO_ACTIVE_LOW>;
81                 };
82                 internet_red {
83                         label = "vgv7519:red:internet";
84                         gpios = <&stp 8 GPIO_ACTIVE_LOW>;
85                 };
86                 broadband_red {
87                         label = "vgv7519:red:broadband";
88                         gpios = <&stp 9 GPIO_ACTIVE_LOW>;
89                 };
90                 broadband_green: broadband_green {
91                         label = "vgv7519:green:broadband";
92                         gpios = <&stp 10 GPIO_ACTIVE_LOW>;
93                 };
94                 voice {
95                         label = "vgv7519:green:voice";
96                         gpios = <&stp 11 GPIO_ACTIVE_LOW>;
97                 };
98                 wireless_red {
99                         label = "vgv7519:red:wireless";
100                         gpios = <&stp 12 GPIO_ACTIVE_LOW>;
101                 };
102                 wireless_green: wireless_green {
103                         label = "vgv7519:green:wireless";
104                         gpios = <&stp 13 GPIO_ACTIVE_LOW>;
105                 };
106                 power_green: power2 {
107                         label = "vgv7519:green:power";
108                         gpios = <&stp 14 GPIO_ACTIVE_LOW>;
109                         default-state = "keep";
110                 };
111                 power_red: power {
112                         label = "vgv7519:red:power";
113                         gpios = <&stp 15 GPIO_ACTIVE_LOW>;
114                 };
115         };
116
117         usb_vbus: regulator-usb-vbus {
118                 compatible = "regulator-fixed";
119
120                 regulator-name = "USB_VBUS";
121
122                 regulator-min-microvolt = <5000000>;
123                 regulator-max-microvolt = <5000000>;
124
125                 gpio = <&gpio 32 GPIO_ACTIVE_HIGH>;
126                 enable-active-high;
127         };
128 };
129
130 &eth0 {
131         lan: interface@0 {
132                 compatible = "lantiq,xrx200-pdi";
133                 #address-cells = <1>;
134                 #size-cells = <0>;
135                 reg = <0>;
136                 mtd-mac-address = <&boardconfig 0x16>;
137                 mtd-mac-address-increment = <1>;
138                 lantiq,switch;
139
140                 ethernet@0 {
141                         compatible = "lantiq,xrx200-pdi-port";
142                         reg = <0>;
143                         phy-mode = "rgmii";
144                         phy-handle = <&phy0>;
145                 };
146                 ethernet@1 {
147                         compatible = "lantiq,xrx200-pdi-port";
148                         reg = <1>;
149                         phy-mode = "rgmii";
150                         phy-handle = <&phy1>;
151                 };
152                 ethernet@2 {
153                         compatible = "lantiq,xrx200-pdi-port";
154                         reg = <2>;
155                         phy-mode = "gmii";
156                         phy-handle = <&phy11>;
157                 };
158                 ethernet@4 {
159                         compatible = "lantiq,xrx200-pdi-port";
160                         reg = <4>;
161                         phy-mode = "gmii";
162                         phy-handle = <&phy13>;
163                 };
164                 ethernet@5 {
165                         compatible = "lantiq,xrx200-pdi-port";
166                         reg = <5>;
167                         phy-mode = "rgmii";
168                         phy-handle = <&phy5>;
169                 };
170         };
171
172         mdio@0 {
173                 #address-cells = <1>;
174                 #size-cells = <0>;
175                 compatible = "lantiq,xrx200-mdio";
176                 reg = <0>;
177
178                 phy0: ethernet-phy@0 {
179                         reg = <0x0>;
180                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
181                 };
182                 phy1: ethernet-phy@1 {
183                         reg = <0x1>;
184                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
185                 };
186                 phy5: ethernet-phy@5 {
187                         reg = <0x5>;
188                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
189                 };
190                 phy11: ethernet-phy@11 {
191                         reg = <0x11>;
192                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
193                 };
194                 phy13: ethernet-phy@13 {
195                         reg = <0x13>;
196                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
197                 };
198         };
199 };
200
201 &gphy0 {
202         lantiq,gphy-mode = <GPHY_MODE_GE>;
203 };
204
205 &gphy1 {
206         lantiq,gphy-mode = <GPHY_MODE_GE>;
207 };
208
209 &gpio {
210         pinctrl-names = "default";
211         pinctrl-0 = <&state_default>;
212
213         state_default: pinmux {
214                 stp {
215                         lantiq,groups = "stp";
216                         lantiq,function = "stp";
217                         lantiq,open-drain = <0>;
218                         lantiq,output = <1>;
219                         lantiq,pull = <0>;
220                 };
221                 mdio {
222                         lantiq,groups = "mdio";
223                         lantiq,function = "mdio";
224                 };
225                 pci-rst {
226                         lantiq,pins = "io21";
227                         lantiq,open-drain = <0>;
228                         lantiq,pull = <0>;
229                         lantiq,output = <1>;
230                 };
231                 gphy-leds {
232                         lantiq,groups = "gphy0 led1", "gphy1 led0";
233                         lantiq,function = "gphy";
234                         lantiq,open-drain = <0>;
235                         lantiq,pull = <0>;
236                         lantiq,output = <1>;
237                 };
238         };
239 };
240
241 &localbus {
242         nor@0 {
243                 compatible = "lantiq,nor";
244                 bank-width = <2>;
245                 reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
246                 #address-cells = <1>;
247                 #size-cells = <1>;
248
249                 partitions {
250                         compatible = "fixed-partitions";
251                         #address-cells = <1>;
252                         #size-cells = <1>;
253
254                         boardconfig: partition@40000 {
255                                 label = "board_config";
256                                 reg = <0x40000 0x10000>;
257                                 read-only;
258                         };
259                 };
260         };
261 };
262
263 &pci0 {
264         status = "okay";
265         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
266
267         wifi@1814,3091 {
268                 compatible = "pci1814,3091";
269                 reg = <0x7000 0 0 0 0>;
270                 ralink,mtd-eeprom = <&boardconfig 0x410>;
271                 ralink,mtd-eeprom-swap;
272                 mtd-mac-address = <&boardconfig 0x16>;
273                 mtd-mac-address-increment = <1>;
274         };
275 };
276
277 &pcie0 {
278         status = "disabled";
279 };
280
281 &stp {
282         lantiq,shadow = <0xffff>;
283         lantiq,groups = <0x3>;
284         lantiq,dsl = <0x0>;
285         lantiq,phy1 = <0x0>;
286         lantiq,phy2 = <0x0>;
287         /* lantiq,rising; */
288 };
289
290 &usb_phy0 {
291         status = "okay";
292 };
293
294 &usb_phy1 {
295         status = "okay";
296 };
297
298 &usb0 {
299         status = "okay";
300         vbus-supply = <&usb_vbus>;
301 };
302
303 &usb1 {
304         status = "okay";
305         vbus-supply = <&usb_vbus>;
306 };
307
308 &vmmc {
309         status = "okay";
310         gpios = <&gpio 30 GPIO_ACTIVE_HIGH  //fxs relay
311                  &gpio 31 GPIO_ACTIVE_HIGH  //still unknown
312                  &gpio 3  GPIO_ACTIVE_HIGH>; //reset_slic?
313 };