ramips: dts: Unify naming of gpio-led nodes
[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 keys {
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 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 compatible = "denx,uimage";
94 label = "firmware";
95 reg = <0x50000 0x7b0000>;
96 };
97 };
98 };
99 };
100
101 &pinctrl {
102 state_default: pinctrl0 {
103 gpio {
104 ralink,group = "i2c", "uartf";
105 ralink,function = "gpio";
106 };
107 };
108 };
109
110 &ethernet {
111 status = "okay";
112 mtd-mac-address = <&factory 0x28>;
113 pinctrl-names = "default";
114 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
115
116 port@5 {
117 status = "okay";
118 mediatek,fixed-link = <1000 1 1 1>;
119 phy-mode = "rgmii";
120 };
121
122 mdio-bus {
123 status = "okay";
124
125 phy0: ethernet-phy@0 {
126 reg = <0>;
127 phy-mode = "rgmii";
128 };
129
130 phy1: ethernet-phy@1 {
131 reg = <1>;
132 phy-mode = "rgmii";
133 };
134
135 phy2: ethernet-phy@2 {
136 reg = <2>;
137 phy-mode = "rgmii";
138 };
139
140 phy3: ethernet-phy@3 {
141 reg = <3>;
142 phy-mode = "rgmii";
143 };
144
145 phy4: ethernet-phy@4 {
146 reg = <4>;
147 phy-mode = "rgmii";
148 };
149
150 phy1f: ethernet-phy@1f {
151 reg = <0x1f>;
152 phy-mode = "rgmii";
153 };
154 };
155 };
156
157 &gsw {
158 mediatek,port4 = "gmac";
159 };
160
161 &wmac {
162 ralink,mtd-eeprom = <&factory 0>;
163 };