ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / rt3883_trendnet_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                                 compatible = "denx,uimage";
49                                 reg = <0x00050000 0x007b0000>;
50                                 label = "firmware";
51                         };
52                 };
53         };
54
55         keys {
56                 compatible = "gpio-keys-polled";
57                 poll-interval = <100>;
58
59                 reset {
60                         label = "reset";
61                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
62                         linux,code = <KEY_RESTART>;
63                 };
64
65                 wps {
66                         label = "wps";
67                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
68                         linux,code = <KEY_WPS_BUTTON>;
69                 };
70         };
71
72         leds {
73                 compatible = "gpio-leds";
74
75                 wps {
76                         label = "tew-692gr:orange:wps";
77                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
78                 };
79
80                 led_wps_green: wps2 {
81                         label = "tew-692gr:green:wps";
82                         gpios = <&gpio1 4 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         status = "okay";
102         mtd-mac-address = <&factory 0x4>;
103
104         port@0 {
105                 phy-handle = <&phy0>;
106                 phy-mode = "rgmii";
107         };
108
109         mdio-bus {
110                 status = "okay";
111
112                 phy0: ethernet-phy@0 {
113                         reg = <0>;
114                         phy-mode = "rgmii";
115
116                         qca,ar8327-initvals = <
117                                 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
118                                 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
119                                 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
120                                 0x50 0xc437c437 /* LED Control Register 0 */
121                                 0x54 0xc337c337 /* LED Control Register 1 */
122                                 0x58 0x00000000 /* LED Control Register 2 */
123                                 0x5c 0x03ffff00 /* LED Control Register 3 */
124                                 0x7c 0x0000007e /* PORT0_STATUS */
125                                 0x94 0x0000007e /* PORT6 STATUS */
126                         >;
127                 };
128         };
129 };
130
131 &pci {
132         status = "okay";
133 };
134
135 &pci1 {
136         status = "okay";
137
138         wifi@0,0 {
139                 compatible = "pci0,0";
140                 reg = < 0x10000 0 0 0 0 >;
141                 ralink,2ghz = <0>;
142         };
143 };
144
145 &wmac {
146         status = "okay";
147         ralink,mtd-eeprom = <&factory 0x0>;
148         ralink,5ghz = <0>;
149         mtd-mac-address = <&factory 0x4>;
150         mtd-mac-address-increment = <3>;
151 };