ramips: mt7530 swconfig: fix race condition in register access
[openwrt/openwrt.git] / target / linux / ramips / dts / QUAD-E4G.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
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 compatible = "alfa-network,quad-e4g", "mediatek,mt7621-soc";
11 model = "ALFA Network Quad-E4G";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 gpio-export {
25 compatible = "gpio-export";
26 #size-cells = <0>;
27
28 m2-enable {
29 gpio-export,name = "m2-enable";
30 gpio-export,output = <1>;
31 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
32 };
33
34 minipcie0-enable {
35 gpio-export,name = "minipcie0-enable";
36 gpio-export,output = <1>;
37 gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
38 };
39
40 minipcie0-reset {
41 gpio-export,name = "minipcie0-reset";
42 gpio-export,output = <0>;
43 gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
44 };
45
46 minipcie1-enable {
47 gpio-export,name = "minipcie1-enable";
48 gpio-export,output = <1>;
49 gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
50 };
51
52 minipcie1-reset {
53 gpio-export,name = "minipcie1-reset";
54 gpio-export,output = <0>;
55 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
56 };
57
58 minipcie2-enable {
59 gpio-export,name = "minipcie2-enable";
60 gpio-export,output = <1>;
61 gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
62 };
63
64 minipcie2-reset {
65 gpio-export,name = "minipcie2-reset";
66 gpio-export,output = <0>;
67 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
68 };
69
70 pcie-perst-disable {
71 gpio-export,name = "pcie-perst-enable";
72 gpio-export,output = <0>;
73 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
74 };
75
76 sim-select {
77 gpio-export,name = "sim-select";
78 gpio-export,output = <1>;
79 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
80 };
81
82 watchdog-enable {
83 gpio-export,name = "watchdog-enable";
84 gpio-export,output = <1>;
85 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
86 };
87 };
88
89 keys {
90 compatible = "gpio-keys";
91
92 reset {
93 label = "reset";
94 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
95 linux,code = <KEY_RESTART>;
96 };
97
98 user1 {
99 label = "user1";
100 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
101 linux,code = <BTN_0>;
102 };
103
104 user2 {
105 label = "user2";
106 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
107 linux,code = <BTN_1>;
108 };
109 };
110
111 leds {
112 compatible = "gpio-leds";
113
114 led_system: system {
115 label = "quad-e4g:red:system";
116 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
117 default-state = "keep";
118 };
119
120 m2 {
121 label = "quad-e4g:orange:m2";
122 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
123 };
124
125 minipcie0 {
126 label = "quad-e4g:orange:minipcie0";
127 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
128 };
129
130 minipcie1 {
131 label = "quad-e4g:orange:minipcie1";
132 gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
133 };
134
135 minipcie2 {
136 label = "quad-e4g:orange:minipcie2";
137 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
138 };
139 };
140
141 memory@0 {
142 device_type = "memory";
143 reg = <0x0 0x10000000>;
144 };
145
146 watchdog {
147 compatible = "linux,wdt-gpio";
148 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
149 hw_algo = "toggle";
150 hw_margin_ms = <25000>;
151 always-running;
152 };
153 };
154
155 &ethernet {
156 mtd-mac-address = <&factory 0xe000>;
157 };
158
159 &i2c {
160 status = "okay";
161
162 rtc@68 {
163 compatible = "ti,bq32000";
164 reg = <0x68>;
165 };
166 };
167
168 &pcie {
169 status = "okay";
170 };
171
172 &pinctrl {
173 state_default: pinctrl0 {
174 gpio {
175 ralink,group = "jtag", "rgmii2", "wdt";
176 ralink,function = "gpio";
177 };
178 };
179 };
180
181 &sdhci {
182 status = "okay";
183 };
184
185 &spi0 {
186 status = "okay";
187
188 flash@0 {
189 compatible = "jedec,spi-nor";
190 reg = <0>;
191 spi-max-frequency = <50000000>;
192 m25p,fast-read;
193
194 partitions {
195 compatible = "fixed-partitions";
196 #address-cells = <1>;
197 #size-cells = <1>;
198
199 partition@0 {
200 label = "u-boot";
201 reg = <0x0 0x30000>;
202 };
203
204 partition@30000 {
205 label = "u-boot-env";
206 reg = <0x30000 0x1000>;
207 };
208
209 partition@31000 {
210 label = "config";
211 reg = <0x31000 0xf000>;
212 read-only;
213 };
214
215 factory: partition@40000 {
216 label = "factory";
217 reg = <0x40000 0x10000>;
218 read-only;
219 };
220
221 partition@50000 {
222 compatible = "denx,uimage";
223 label = "firmware";
224 reg = <0x50000 0xfb0000>;
225 };
226 };
227 };
228 };
229
230 &uartlite2 {
231 status = "okay";
232 };
233
234 &uartlite3 {
235 status = "okay";
236 };