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