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