ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gst.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         aliases {
10                 led-boot = &led_power_green;
11                 led-failsafe = &led_power_green;
12                 led-running = &led_power_green;
13                 led-upgrade = &led_power_green;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600";
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 led_power_green: power_green {
24                         label = "wrc-gst:green:power";
25                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
26                 };
27
28                 power_blue {
29                         label = "wrc-gst:blue:power";
30                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
31                 };
32
33                 wps {
34                         label = "wrc-gst:red:wps";
35                         gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
36                 };
37
38                 power_red {
39                         label = "wrc-gst:red:power";
40                         gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
41                 };
42         };
43
44         keys {
45                 compatible = "gpio-keys";
46
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_RESTART>;
51                 };
52
53                 wps {
54                         label = "wps";
55                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
56                         linux,code = <KEY_WPS_BUTTON>;
57                 };
58
59                 client {
60                         label = "client";
61                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
62                         linux,code = <BTN_0>;
63                         linux,input-type = <EV_SW>;
64                 };
65
66                 ap {
67                         label = "ap";
68                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
69                         linux,code = <BTN_0>;
70                         linux,input-type = <EV_SW>;
71                 };
72
73                 extender {
74                         label = "extender";
75                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
76                         linux,code = <BTN_0>;
77                         linux,input-type = <EV_SW>;
78                 };
79
80                 router {
81                         label = "router";
82                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
83                         linux,code = <BTN_0>;
84                         linux,input-type = <EV_SW>;
85                 };
86         };
87 };
88
89 &ethernet {
90         mtd-mac-address = <&factory 0xe000>;
91 };
92
93 &spi0 {
94         status = "okay";
95
96         m25p80@0 {
97                 compatible = "jedec,spi-nor";
98                 reg = <0>;
99                 spi-max-frequency = <10000000>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x0 0x30000>;
109                                 read-only;
110                         };
111
112                         partition@30000 {
113                                 label = "u-boot-env";
114                                 reg = <0x30000 0x10000>;
115                                 read-only;
116                         };
117
118                         factory: partition@40000 {
119                                 label = "factory";
120                                 reg = <0x40000 0x10000>;
121                                 read-only;
122                         };
123
124                         partition@50000 {
125                                 compatible = "denx,uimage";
126                                 label = "firmware";
127                                 reg = <0x50000 0xb00000>;
128                         };
129
130                         partition@b50000 {
131                                 label = "tm_pattern";
132                                 reg = <0xb50000 0x380000>;
133                                 read-only;
134                         };
135
136                         partition@ed0000 {
137                                 label = "tm_key";
138                                 reg = <0xed0000 0x80000>;
139                                 read-only;
140                         };
141
142                         partition@f50000 {
143                                 label = "art_block";
144                                 reg = <0xf50000 0x30000>;
145                                 read-only;
146                         };
147
148                         partition@f80000 {
149                                 label = "user_data";
150                                 reg = <0xf80000 0x80000>;
151                                 read-only;
152                         };
153                 };
154         };
155 };
156
157 &state_default {
158         gpio {
159                 ralink,group = "uart3", "jtag", "wdt", "sdhci";
160                 ralink,function = "gpio";
161         };
162 };
163
164 &pcie {
165         status = "okay";
166         /* WRC-xxxxGST has MT7615 for 2.4/5 GHz wifi, but it's not supported */
167 };
168
169 &xhci {
170         status = "disabled";
171 };