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