ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / TEW-692GR.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-692gr", "ralink,rt3883-soc";
10 model = "TRENDnet TEW-692GR";
11
12 aliases {
13 led-boot = &led_wps_green;
14 led-failsafe = &led_wps_green;
15 led-running = &led_wps_green;
16 led-upgrade = &led_wps_green;
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
71 gpio-leds {
72 compatible = "gpio-leds";
73
74 wps {
75 label = "tew-692gr:orange:wps";
76 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
77 };
78
79 led_wps_green: wps2 {
80 label = "tew-692gr:green:wps";
81 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
82 };
83 };
84 };
85
86 &gpio1 {
87 status = "okay";
88 };
89
90 &pinctrl {
91 state_default: pinctrl0 {
92 gpio {
93 ralink,group = "spi", "i2c", "jtag", "uartf";
94 ralink,function = "gpio";
95 };
96 };
97 };
98
99 &ethernet {
100 status = "okay";
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 qca,ar8327-initvals = <
116 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
117 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
118 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
119 0x50 0xc437c437 /* LED Control Register 0 */
120 0x54 0xc337c337 /* LED Control Register 1 */
121 0x58 0x00000000 /* LED Control Register 2 */
122 0x5c 0x03ffff00 /* LED Control Register 3 */
123 0x7c 0x0000007e /* PORT0_STATUS */
124 0x94 0x0000007e /* PORT6 STATUS */
125 >;
126 };
127 };
128 };
129
130 &pci {
131 status = "okay";
132 };
133
134 &pci1 {
135 status = "okay";
136
137 wifi@0,0 {
138 compatible = "pci0,0";
139 reg = < 0x10000 0 0 0 0 >;
140 ralink,2ghz = <0>;
141 };
142 };
143
144 &wmac {
145 status = "okay";
146 ralink,mtd-eeprom = <&factory 0x0>;
147 ralink,5ghz = <0>;
148 mtd-mac-address = <&factory 0x4>;
149 mtd-mac-address-increment = <3>;
150 };