ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_ex6150.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "netgear,ex6150", "mediatek,mt7621-soc";
11         model = "Netgear EX6150";
12
13         aliases {
14                 led-boot = &power_green;
15                 led-failsafe = &power_amber;
16                 led-running = &power_green;
17                 led-upgrade = &power_amber;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 power_amber: power_amber {
28                         label = "ex6150:amber:power";
29                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
30                 };
31
32                 power_green: power_green {
33                         label = "ex6150:green:power";
34                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
35                 };
36
37                 wps {
38                         label = "ex6150:green:wps";
39                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
40                 };
41
42                 rightarrow {
43                         label = "ex6150:blue:rightarrow";
44                         gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
45                 };
46
47                 leftarrow {
48                         label = "ex6150:blue:leftarrow";
49                         gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
50                 };
51
52                 router_green {
53                         label = "ex6150:green:router";
54                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
55                         linux,default-trigger = "phy1tpt";
56                 };
57
58                 router_red {
59                         label = "ex6150:red:router";
60                         gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
61                 };
62
63                 client_green {
64                         label = "ex6150:green:client";
65                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
66                         linux,default-trigger = "phy0tpt";
67                 };
68
69                 client_red {
70                         label = "ex6150:red:client";
71                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
72                 };
73         };
74
75         keys {
76                 compatible = "gpio-keys";
77
78                 wps {
79                         label = "wps";
80                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
81                         linux,code = <KEY_WPS_BUTTON>;
82                 };
83
84                 reset {
85                         label = "reset";
86                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
87                         linux,code = <KEY_RESTART>;
88                 };
89
90                 toggle {
91                         label = "AP/Extender toggle";
92                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
93                         linux,code = <BTN_0>;
94                         /* Active when switch is set to "Access Point" */
95                 };
96         };
97 };
98
99 &spi0 {
100         status = "okay";
101
102         flash@0 {
103                 compatible = "jedec,spi-nor";
104                 reg = <0>;
105                 spi-max-frequency = <10000000>;
106
107                 partitions {
108                         compatible = "fixed-partitions";
109                         #address-cells = <1>;
110                         #size-cells = <1>;
111
112                         partition@0 {
113                                 label = "u-boot";
114                                 reg = <0x0 0x30000>;
115                                 read-only;
116                         };
117
118                         partition@30000 {
119                                 label = "config";
120                                 reg = <0x30000 0x10000>;
121                                 read-only;
122                         };
123
124                         factory: partition@40000 {
125                                 label = "factory";
126                                 reg = <0x40000 0x10000>;
127                                 read-only;
128                         };
129
130                         partition@50000 {
131                                 compatible = "denx,uimage";
132                                 label = "firmware";
133                                 reg = <0x50000 0xe80000>;
134                         };
135
136                         partition@ed0000 {
137                                 label = "ML1";
138                                 reg = <0xed0000 0x10000>;
139                                 read-only;
140                         };
141
142                         partition@ef0000 {
143                                 label = "ML2";
144                                 reg = <0xef0000 0x20000>;
145                                 read-only;
146                         };
147
148                         partition@f10000 {
149                                 label = "ML3";
150                                 reg = <0xf10000 0x20000>;
151                                 read-only;
152                         };
153
154                         partition@f30000 {
155                                 label = "ML4";
156                                 reg = <0xf30000 0x20000>;
157                                 read-only;
158                         };
159
160                         partition@f50000 {
161                                 label = "ML5";
162                                 reg = <0xf50000 0x20000>;
163                                 read-only;
164                         };
165
166                         partition@f70000 {
167                                 label = "ML6";
168                                 reg = <0xf70000 0x20000>;
169                                 read-only;
170                         };
171
172                         partition@f90000 {
173                                 label = "ML7";
174                                 reg = <0xf90000 0x20000>;
175                                 read-only;
176                         };
177
178                         partition@fb0000 {
179                                 label = "T_Meter1";
180                                 reg = <0xfb0000 0x10000>;
181                                 read-only;
182                         };
183
184                         partition@fc0000 {
185                                 label = "T_Meter2";
186                                 reg = <0xfc0000 0x10000>;
187                                 read-only;
188                         };
189
190                         partition@fd0000 {
191                                 label = "POT";
192                                 reg = <0xfd0000 0x10000>;
193                                 read-only;
194                         };
195
196                         partition@fe0000 {
197                                 label = "board_data";
198                                 reg = <0xfe0000 0x10000>;
199                                 read-only;
200                         };
201
202                         partition@ff0000 {
203                                 label = "nvram";
204                                 reg = <0xff0000 0x10000>;
205                                 read-only;
206                         };
207                 };
208         };
209 };
210
211 &pcie {
212         status = "okay";
213 };
214
215 &pcie0 {
216         wifi@0,0 {
217                 reg = <0x0000 0 0 0 0>;
218                 mediatek,mtd-eeprom = <&factory 0x8000>;
219                 ieee80211-freq-limit = <5000000 6000000>;
220         };
221 };
222
223 &pcie1 {
224         wifi@0,0 {
225                 reg = <0x0000 0 0 0 0>;
226                 mediatek,mtd-eeprom = <&factory 0x0000>;
227                 ieee80211-freq-limit = <2400000 2500000>;
228         };
229 };
230
231 &ethernet {
232         mtd-mac-address = <&factory 0x00000004>;
233 };
234
235 &pinctrl {
236         state_default: pinctrl0 {
237                 gpio {
238                         ralink,group = "sdhci", "rgmii2", "jtag";
239                         ralink,function = "gpio";
240                 };
241         };
242 };