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