ramips/mt7621: Name DTS files based on scheme
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / mt7621_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 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 keys {
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
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 = "u-boot-env";
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 0xb00000>;
135 };
136
137 partition@b50000 {
138 label = "tm_pattern";
139 reg = <0xb50000 0x380000>;
140 read-only;
141 };
142
143 partition@ed0000 {
144 label = "tm_key";
145 reg = <0xed0000 0x80000>;
146 read-only;
147 };
148
149 partition@f50000 {
150 label = "art_block";
151 reg = <0xf50000 0x30000>;
152 read-only;
153 };
154
155 partition@f80000 {
156 label = "user_data";
157 reg = <0xf80000 0x80000>;
158 read-only;
159 };
160 };
161 };
162 };
163
164 &pinctrl {
165 state_default: pinctrl0 {
166 gpio {
167 ralink,group = "uart3", "jtag", "wdt", "sdhci";
168 ralink,function = "gpio";
169 };
170 };
171 };
172
173 &pcie {
174 status = "okay";
175 /* WRC-xxxxGST has MT7615 for 2.4/5 GHz wifi, but it's not supported */
176 };
177
178 &xhci {
179 status = "disabled";
180 };