bdaa4d7fa98048d40cf5ed78eaf9403a04091100
[openwrt/staging/wigyori.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 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/input.h>
17
18 / {
19 compatible = "linksys,e1700", "ralink,mt7620a-soc";
20 model = "Linksys E1700";
21
22 aliases {
23 led-boot = &led_power;
24 led-failsafe = &led_power;
25 led-running = &led_power;
26 led-upgrade = &led_power;
27 };
28
29 gpio-keys-polled {
30 compatible = "gpio-keys-polled";
31 poll-interval = <20>;
32
33 reset {
34 label = "reset";
35 gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
36 linux,code = <KEY_RESTART>;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44 };
45
46 gpio-leds {
47 compatible = "gpio-leds";
48
49 led_power: power {
50 label = "e1700:green:power";
51 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
52 };
53
54 wan {
55 label = "e1700:green:wps";
56 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 m25p80@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <10000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "config";
82 reg = <0x30000 0x10000>;
83 read-only;
84 };
85
86 factory: partition@40000 {
87 label = "factory";
88 reg = <0x40000 0x10000>;
89 read-only;
90 };
91
92 partition@50000 {
93 label = "firmware";
94 reg = <0x50000 0x7b0000>;
95 };
96 };
97 };
98 };
99
100 &pinctrl {
101 state_default: pinctrl0 {
102 gpio {
103 ralink,group = "i2c", "uartf";
104 ralink,function = "gpio";
105 };
106 };
107 };
108
109 &ethernet {
110 status = "okay";
111 mtd-mac-address = <&factory 0x28>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
114
115 port@5 {
116 status = "okay";
117 mediatek,fixed-link = <1000 1 1 1>;
118 phy-mode = "rgmii";
119 };
120
121 mdio-bus {
122 status = "okay";
123
124 phy0: ethernet-phy@0 {
125 reg = <0>;
126 phy-mode = "rgmii";
127 };
128
129 phy1: ethernet-phy@1 {
130 reg = <1>;
131 phy-mode = "rgmii";
132 };
133
134 phy2: ethernet-phy@2 {
135 reg = <2>;
136 phy-mode = "rgmii";
137 };
138
139 phy3: ethernet-phy@3 {
140 reg = <3>;
141 phy-mode = "rgmii";
142 };
143
144 phy4: ethernet-phy@4 {
145 reg = <4>;
146 phy-mode = "rgmii";
147 };
148
149 phy1f: ethernet-phy@1f {
150 reg = <0x1f>;
151 phy-mode = "rgmii";
152 };
153 };
154 };
155
156 &gsw {
157 mediatek,port4 = "gmac";
158 };
159
160 &wmac {
161 ralink,mtd-eeprom = <&factory 0>;
162 };