ramips: add support for indicating the boot state using multiple leds
[oweals/openwrt.git] / target / linux / ramips / dts / TEW-691GR.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "trendnet,tew-691gr", "ralink,rt3883-soc";
10         model = "TRENDnet TEW-691GR";
11
12         aliases {
13                 led-boot = &led_wps;
14                 led-failsafe = &led_wps;
15                 led-running = &led_wps;
16                 led-upgrade = &led_wps;
17         };
18
19         nor-flash@1c000000 {
20                 compatible = "cfi-flash";
21                 reg = <0x1c000000 0x800000>;
22                 bank-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 reg = <0x0 0x0030000>;
31                                 label = "u-boot";
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 reg = <0x00030000 0x00010000>;
37                                 label = "u-boot-env";
38                                 read-only;
39                         };
40
41                         factory: partition@40000 {
42                                 reg = <0x00040000 0x00010000>;
43                                 label = "factory";
44                                 read-only;
45                         };
46
47                         partition@50000 {
48                                 reg = <0x00050000 0x007b0000>;
49                                 label = "firmware";
50                         };
51                 };
52         };
53
54         gpio-keys-polled {
55                 compatible = "gpio-keys-polled";
56                 poll-interval = <100>;
57
58                 reset {
59                         label = "reset";
60                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
61                         linux,code = <KEY_RESTART>;
62                 };
63
64                 wps {
65                         label = "wps";
66                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
67                         linux,code = <KEY_WPS_BUTTON>;
68                 };
69
70                 rfkill {
71                         label = "rfkill";
72                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
73                         linux,code = <KEY_RFKILL>;
74                 };
75         };
76
77         gpio-leds {
78                 compatible = "gpio-leds";
79
80                 led_wps: wps {
81                         label = "tew-691gr:green:wps";
82                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
83                 };
84         };
85 };
86
87 &gpio1 {
88         status = "okay";
89 };
90
91 &pinctrl {
92         state_default: pinctrl0 {
93                 gpio {
94                         ralink,group = "spi", "i2c", "jtag", "uartf";
95                         ralink,function = "gpio";
96                 };
97         };
98 };
99
100 &ethernet {
101         mtd-mac-address = <&factory 0x4>;
102
103         port@0 {
104                 phy-handle = <&phy0>;
105                 phy-mode = "rgmii";
106         };
107
108         mdio-bus {
109                 status = "okay";
110
111                 phy0: ethernet-phy@0 {
112                         reg = <0>;
113                         phy-mode = "rgmii";
114                 };
115         };
116 };
117
118 &wmac {
119         status = "okay";
120         ralink,mtd-eeprom = <&factory 0x0>;
121         ralink,5ghz = <0>;
122         mtd-mac-address = <&factory 0x4>;
123         mtd-mac-address-increment = <1>;
124 };