ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_buffalo_wcr-1166ds.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc";
10         model = "Buffalo WCR-1166DS";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         keys {
20                 compatible = "gpio-keys-polled";
21                 poll-interval = <20>;
22
23                 aoss {
24                         label = "aoss";
25                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_WPS_BUTTON>;
27                 };
28
29                 ap {
30                         label = "ap";
31                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
32                         linux,code = <BTN_0>;
33                         linux,input-type = <EV_SW>;
34                 };
35
36                 reset {
37                         label = "reset";
38                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_RESTART>;
40                 };
41         };
42
43         leds {
44                 compatible = "gpio-leds";
45
46                 router_o {
47                         label = "wcr-1166ds:orange:router";
48                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
49                 };
50
51                 router_g {
52                         label = "wcr-1166ds:green:router";
53                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
54                 };
55
56                 internet_o {
57                         label = "wcr-1166ds:orange:internet";
58                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
59                 };
60
61                 internet_g {
62                         label = "wcr-1166ds:green:internet";
63                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
64                 };
65
66                 wireless_o {
67                         label = "wcr-1166ds:orange:wireless";
68                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
69                 };
70
71                 wireless_g {
72                         label = "wcr-1166ds:green:wireless";
73                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
74                 };
75
76                 diag {
77                         label = "wcr-1166ds:orange:diag";
78                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
79                 };
80
81                 led_power: power {
82                         label = "wcr-1166ds:green:power";
83                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
84                 };
85         };
86 };
87
88 &ehci {
89         status = "disabled";
90 };
91
92 &esw {
93         mediatek,portmap = <0x2f>;
94         mediatek,portdisable = <0x27>;
95 };
96
97 &ohci {
98         status = "disabled";
99 };
100
101 &pcie {
102         status = "okay";
103 };
104
105 &pcie0 {
106         mt76@0,0 {
107                 reg = <0x0000 0 0 0 0>;
108                 mediatek,mtd-eeprom = <&factory 0x8000>;
109                 ieee80211-freq-limit = <5000000 6000000>;
110         };
111 };
112
113 &pinctrl {
114         state_default: pinctrl0 {
115                 gpio {
116                         ralink,group = "uart1", "wled_an", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt", "refclk", "gpio", "i2s";
117                         ralink,function = "gpio";
118                 };
119         };
120 };
121
122 &spi0 {
123         status = "okay";
124
125         m25p80@0 {
126                 compatible = "jedec,spi-nor";
127                 reg = <0>;
128                 spi-max-frequency = <10000000>;
129
130                 partitions {
131                         compatible = "fixed-partitions";
132                         #address-cells = <1>;
133                         #size-cells = <1>;
134
135                         partition@0 {
136                                 label = "u-boot";
137                                 reg = <0x0 0x30000>;
138                                 read-only;
139                         };
140
141                         partition@30000 {
142                                 label = "u-boot-env";
143                                 reg = <0x30000 0x10000>;
144                                 read-only;
145                         };
146
147                         factory: partition@40000 {
148                                 label = "factory";
149                                 reg = <0x40000 0x10000>;
150                                 read-only;
151                         };
152
153                         partition@50000 {
154                                 compatible = "openwrt,trx";
155                                 label = "firmware";
156                                 reg = <0x50000 0x7c0000>;
157                         };
158
159                         partition@810000 {
160                                 label = "firmware2";
161                                 reg = <0x810000 0x7c0000>;
162                         };
163
164                         partition@fd0000 {
165                                 label = "glbcfg";
166                                 reg = <0xfd0000 0x10000>;
167                                 read-only;
168                         };
169
170                         partition@fe0000 {
171                                 label = "board_data";
172                                 reg = <0xfe0000 0x10000>;
173                                 read-only;
174                         };
175                 };
176         };
177 };
178
179 &wmac {
180         status = "okay";
181 };