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