ramips: set F5D8235 v1 usb led trigger via devicetree
[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-status = &led_wps_green;
14 };
15
16 nor-flash@1c000000 {
17 compatible = "cfi-flash";
18 reg = <0x1c000000 0x800000>;
19 bank-width = <2>;
20
21 partitions {
22 compatible = "fixed-partitions";
23 #address-cells = <1>;
24 #size-cells = <1>;
25
26 partition@0 {
27 reg = <0x0 0x0030000>;
28 label = "u-boot";
29 read-only;
30 };
31
32 partition@30000 {
33 reg = <0x00030000 0x00010000>;
34 label = "u-boot-env";
35 read-only;
36 };
37
38 factory: partition@40000 {
39 reg = <0x00040000 0x00010000>;
40 label = "factory";
41 read-only;
42 };
43
44 partition@50000 {
45 reg = <0x00050000 0x007b0000>;
46 label = "firmware";
47 };
48 };
49 };
50
51 gpio-keys-polled {
52 compatible = "gpio-keys-polled";
53 poll-interval = <100>;
54
55 reset {
56 label = "reset";
57 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60
61 wps {
62 label = "wps";
63 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_WPS_BUTTON>;
65 };
66 };
67
68 gpio-leds {
69 compatible = "gpio-leds";
70
71 wps {
72 label = "tew-692gr:orange:wps";
73 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
74 };
75
76 led_wps_green: wps2 {
77 label = "tew-692gr:green:wps";
78 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
79 };
80 };
81 };
82
83 &gpio1 {
84 status = "okay";
85 };
86
87 &pinctrl {
88 state_default: pinctrl0 {
89 gpio {
90 ralink,group = "spi", "i2c", "jtag", "uartf";
91 ralink,function = "gpio";
92 };
93 };
94 };
95
96 &ethernet {
97 status = "okay";
98 mtd-mac-address = <&factory 0x4>;
99
100 port@0 {
101 phy-handle = <&phy0>;
102 phy-mode = "rgmii";
103 };
104
105 mdio-bus {
106 status = "okay";
107
108 phy0: ethernet-phy@0 {
109 reg = <0>;
110 phy-mode = "rgmii";
111
112 qca,ar8327-initvals = <
113 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
114 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
115 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
116 0x50 0xc437c437 /* LED Control Register 0 */
117 0x54 0xc337c337 /* LED Control Register 1 */
118 0x58 0x00000000 /* LED Control Register 2 */
119 0x5c 0x03ffff00 /* LED Control Register 3 */
120 0x7c 0x0000007e /* PORT0_STATUS */
121 0x94 0x0000007e /* PORT6 STATUS */
122 >;
123 };
124 };
125 };
126
127 &pci {
128 status = "okay";
129 };
130
131 &pci1 {
132 status = "okay";
133
134 wifi@0,0 {
135 compatible = "pci0,0";
136 reg = < 0x10000 0 0 0 0 >;
137 ralink,2ghz = <0>;
138 };
139 };
140
141 &wmac {
142 status = "okay";
143 ralink,mtd-eeprom = <&factory 0x0>;
144 ralink,5ghz = <0>;
145 mtd-mac-address = <&factory 0x4>;
146 mtd-mac-address-increment = <3>;
147 };