[ramips]: add support for the Linksys E1700
[15.05/openwrt.git] / target / linux / ramips / dts / E1700.dts
1 /*
2  * Device Tree file for the Linksys E1700
3  *
4  * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10
11 /dts-v1/;
12
13 /include/ "mt7620a.dtsi"
14
15 / {
16         compatible = "linksys,e1700", "ralink,mt7620a-soc";
17         model = "Linksys E1700";
18
19         palmbus@10000000 {
20                 spi@b00 {
21                         status = "okay";
22
23                         m25p80@0 {
24                                 #address-cells = <1>;
25                                 #size-cells = <1>;
26                                 compatible = "mx25l6405d";
27                                 reg = <0 0>;
28                                 linux,modalias = "m25p80", "mx25l6405d";
29                                 spi-max-frequency = <10000000>;
30
31                                 partition@0 {
32                                         label = "u-boot";
33                                         reg = <0x0 0x30000>;
34                                         read-only;
35                                 };
36
37                                 partition@30000 {
38                                         label = "config";
39                                         reg = <0x30000 0x10000>;
40                                         read-only;
41                                 };
42
43                                 factory: partition@40000 {
44                                         label = "factory";
45                                         reg = <0x40000 0x10000>;
46                                         read-only;
47                                 };
48
49                                 partition@50000 {
50                                         label = "firmware";
51                                         reg = <0x50000 0x7b0000>;
52                                 };
53                         };
54                 };
55         };
56
57         pinctrl {
58                 state_default: pinctrl0 {
59                         gpio {
60                                 ralink,group = "i2c", "uartf";
61                                 ralink,function = "gpio";
62                         };
63                 };
64         };
65
66         ethernet@10100000 {
67                 status = "okay";
68
69                 mtd-mac-address = <&factory 0x28>;
70
71                 pinctrl-names = "default";
72                 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
73
74                 ralink,port-map = "llllw";
75
76                 port@5 {
77                         status = "okay";
78                         ralink,fixed-link = <1000 1 1 1>;
79                         phy-mode = "rgmii";
80                 };
81
82                 mdio-bus {
83                         status = "okay";
84
85                         phy0: ethernet-phy@0 {
86                                 reg = <0>;
87                                 phy-mode = "rgmii";
88                         };
89                         phy1: ethernet-phy@1 {
90                                 reg = <1>;
91                                 phy-mode = "rgmii";
92                         };
93                         phy2: ethernet-phy@2 {
94                                 reg = <2>;
95                                 phy-mode = "rgmii";
96                         };
97                         phy3: ethernet-phy@3 {
98                                 reg = <3>;
99                                 phy-mode = "rgmii";
100                         };
101                         phy4: ethernet-phy@4 {
102                                 reg = <4>;
103                                 phy-mode = "rgmii";
104                         };
105                         phy1f: ethernet-phy@1f {
106                                 reg = <0x1f>;
107                                 phy-mode = "rgmii";
108                         };
109                 };
110         };
111
112         gsw@10110000 {
113                 ralink,port4 = "gmac";
114         };
115
116         wmac@10180000 {
117                 ralink,mtd-eeprom = <&factory 0>;
118         };
119
120         gpio-keys-polled {
121                 compatible = "gpio-keys-polled";
122                 #address-cells = <1>;
123                 #size-cells = <0>;
124                 poll-interval = <20>;
125                 reset {
126                         label = "reset";
127                         gpios = <&gpio0 1 0>;
128                         linux,code = <0x198>;
129                 };
130                 wps {
131                         label = "wps";
132                         gpios = <&gpio0 2 0>;
133                         linux,code = <0x211>;
134                 };
135         };
136
137         gpio-leds {
138                 compatible = "gpio-leds";
139                 power {
140                         label = "linksys:green:power";
141                         gpios = <&gpio0 10 1>;
142                 };
143                 wan {
144                         label = "linksys:green:wps";
145                         gpios = <&gpio0 12 1>;
146                 };
147         };
148 };