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