8b4361af87d2a87d9d9574c5ef12f4e100250e50
[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 = "jedec,spi-nor";
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                 mtd-mac-address = <&factory 0x28>;
69                 pinctrl-names = "default";
70                 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
71
72                 port@5 {
73                         status = "okay";
74                         mediatek,fixed-link = <1000 1 1 1>;
75                         phy-mode = "rgmii";
76                 };
77
78                 mdio-bus {
79                         status = "okay";
80
81                         phy0: ethernet-phy@0 {
82                                 reg = <0>;
83                                 phy-mode = "rgmii";
84                         };
85
86                         phy1: ethernet-phy@1 {
87                                 reg = <1>;
88                                 phy-mode = "rgmii";
89                         };
90
91                         phy2: ethernet-phy@2 {
92                                 reg = <2>;
93                                 phy-mode = "rgmii";
94                         };
95
96                         phy3: ethernet-phy@3 {
97                                 reg = <3>;
98                                 phy-mode = "rgmii";
99                         };
100
101                         phy4: ethernet-phy@4 {
102                                 reg = <4>;
103                                 phy-mode = "rgmii";
104                         };
105
106                         phy1f: ethernet-phy@1f {
107                                 reg = <0x1f>;
108                                 phy-mode = "rgmii";
109                         };
110                 };
111         };
112
113         gsw@10110000 {
114                 mediatek,port4 = "gmac";
115                 mediatek,mt7530 = <1>;
116         };
117
118         wmac@10180000 {
119                 ralink,mtd-eeprom = <&factory 0>;
120         };
121
122         gpio-keys-polled {
123                 compatible = "gpio-keys-polled";
124                 #address-cells = <1>;
125                 #size-cells = <0>;
126                 poll-interval = <20>;
127
128                 reset {
129                         label = "reset";
130                         gpios = <&gpio0 1 0>;
131                         linux,code = <0x198>;
132                 };
133
134                 wps {
135                         label = "wps";
136                         gpios = <&gpio0 2 0>;
137                         linux,code = <0x211>;
138                 };
139         };
140
141         gpio-leds {
142                 compatible = "gpio-leds";
143
144                 power {
145                         label = "e1700:green:power";
146                         gpios = <&gpio0 10 1>;
147                 };
148
149                 wan {
150                         label = "e1700:green:wps";
151                         gpios = <&gpio0 12 1>;
152                 };
153         };
154 };