ramips: add support for XiaoYu XY-C5
[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-polled";
77                 poll-interval = <20>;
78
79                 wps {
80                         label = "wps";
81                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
82                         linux,code = <KEY_WPS_BUTTON>;
83                 };
84
85                 reset {
86                         label = "reset";
87                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
88                         linux,code = <KEY_RESTART>;
89                 };
90
91                 toggle {
92                         label = "AP/Extender toggle";
93                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
94                         linux,code = <BTN_0>;
95                         /* Active when switch is set to "Access Point" */
96                 };
97         };
98 };
99
100 &spi0 {
101         status = "okay";
102
103         flash@0 {
104                 compatible = "jedec,spi-nor";
105                 reg = <0>;
106                 spi-max-frequency = <10000000>;
107
108                 partitions {
109                         compatible = "fixed-partitions";
110                         #address-cells = <1>;
111                         #size-cells = <1>;
112
113                         partition@0 {
114                                 label = "u-boot";
115                                 reg = <0x0 0x30000>;
116                                 read-only;
117                         };
118
119                         partition@30000 {
120                                 label = "config";
121                                 reg = <0x30000 0x10000>;
122                                 read-only;
123                         };
124
125                         factory: partition@40000 {
126                                 label = "factory";
127                                 reg = <0x40000 0x10000>;
128                                 read-only;
129                         };
130
131                         partition@50000 {
132                                 compatible = "denx,uimage";
133                                 label = "firmware";
134                                 reg = <0x50000 0xe80000>;
135                         };
136
137                         partition@ed0000 {
138                                 label = "ML1";
139                                 reg = <0xed0000 0x10000>;
140                                 read-only;
141                         };
142
143                         partition@ef0000 {
144                                 label = "ML2";
145                                 reg = <0xef0000 0x20000>;
146                                 read-only;
147                         };
148
149                         partition@f10000 {
150                                 label = "ML3";
151                                 reg = <0xf10000 0x20000>;
152                                 read-only;
153                         };
154
155                         partition@f30000 {
156                                 label = "ML4";
157                                 reg = <0xf30000 0x20000>;
158                                 read-only;
159                         };
160
161                         partition@f50000 {
162                                 label = "ML5";
163                                 reg = <0xf50000 0x20000>;
164                                 read-only;
165                         };
166
167                         partition@f70000 {
168                                 label = "ML6";
169                                 reg = <0xf70000 0x20000>;
170                                 read-only;
171                         };
172
173                         partition@f90000 {
174                                 label = "ML7";
175                                 reg = <0xf90000 0x20000>;
176                                 read-only;
177                         };
178
179                         partition@fb0000 {
180                                 label = "T_Meter1";
181                                 reg = <0xfb0000 0x10000>;
182                                 read-only;
183                         };
184
185                         partition@fc0000 {
186                                 label = "T_Meter2";
187                                 reg = <0xfc0000 0x10000>;
188                                 read-only;
189                         };
190
191                         partition@fd0000 {
192                                 label = "POT";
193                                 reg = <0xfd0000 0x10000>;
194                                 read-only;
195                         };
196
197                         partition@fe0000 {
198                                 label = "board_data";
199                                 reg = <0xfe0000 0x10000>;
200                                 read-only;
201                         };
202
203                         partition@ff0000 {
204                                 label = "nvram";
205                                 reg = <0xff0000 0x10000>;
206                                 read-only;
207                         };
208                 };
209         };
210 };
211
212 &pcie {
213         status = "okay";
214 };
215
216 &pcie0 {
217         wifi@0,0 {
218                 reg = <0x0000 0 0 0 0>;
219                 mediatek,mtd-eeprom = <&factory 0x8000>;
220                 ieee80211-freq-limit = <5000000 6000000>;
221         };
222 };
223
224 &pcie1 {
225         wifi@0,0 {
226                 reg = <0x0000 0 0 0 0>;
227                 mediatek,mtd-eeprom = <&factory 0x0000>;
228                 ieee80211-freq-limit = <2400000 2500000>;
229         };
230 };
231
232 &ethernet {
233         mtd-mac-address = <&factory 0x00000004>;
234 };
235
236 &pinctrl {
237         state_default: pinctrl0 {
238                 gpio {
239                         ralink,group = "sdhci", "rgmii2", "jtag";
240                         ralink,function = "gpio";
241                 };
242         };
243 };