ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620a_alfa-network_tube-e4g.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc";
11 model = "ALFA Network Tube-E4G";
12
13 aliases {
14 label-mac-device = &ethernet;
15 led-boot = &power;
16 led-failsafe = &power;
17 led-running = &power;
18 led-upgrade = &power;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 gpio-export {
26 compatible = "gpio-export";
27 #size-cells = <0>;
28
29 modem-enable {
30 gpio-export,name = "modem-enable";
31 gpio-export,output = <1>;
32 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
33 };
34
35 modem-rf-enable {
36 gpio-export,name = "modem-rf-enable";
37 gpio-export,output = <1>;
38 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
39 };
40
41 sim-select {
42 gpio-export,name = "sim-select";
43 gpio-export,output = <0>;
44 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
45 };
46
47 sim1-detect {
48 gpio-export,name = "sim1-detect";
49 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
50 };
51
52 sim2-detect {
53 gpio-export,name = "sim2-detect";
54 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
55 };
56 };
57
58 keys {
59 compatible = "gpio-keys";
60
61 reset {
62 label = "reset";
63 linux,code = <KEY_RESTART>;
64 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
65 debounce-interval = <60>;
66 };
67 };
68
69 leds {
70 compatible = "gpio-leds";
71
72 4g {
73 label = "tube-e4g:green:4g";
74 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
75 };
76
77 lan {
78 label = "tube-e4g:blue:lan";
79 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
80 };
81
82 power: power {
83 label = "tube-e4g:green:power";
84 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
85 default-state = "keep";
86 };
87
88 sim1 {
89 label = "tube-e4g:green:sim1";
90 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
91 default-state = "keep";
92 };
93
94 sim2 {
95 label = "tube-e4g:green:sim2";
96 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
97 default-state = "keep";
98 };
99 };
100 };
101
102 &ehci {
103 status = "okay";
104 };
105
106 &ethernet {
107 mtd-mac-address = <&factory 0x28>;
108 };
109
110 &gpio0 {
111 status = "okay";
112 };
113
114 &gpio1 {
115 status = "okay";
116 };
117
118 &gpio2 {
119 status = "okay";
120 };
121
122 &gsw {
123 mediatek,port4 = "ephy";
124 };
125
126 &ohci {
127 status = "okay";
128 };
129
130 &pcie {
131 status = "disabled";
132 };
133
134 &state_default {
135 gpio {
136 ralink,group = "ephy", "nd_sd", "pcie", "uartf";
137 ralink,function = "gpio";
138 };
139 };
140
141 &spi0 {
142 status = "okay";
143
144 flash@0 {
145 compatible = "jedec,spi-nor";
146 reg = <0>;
147 spi-max-frequency = <50000000>;
148 m25p,fast-read;
149
150 partitions {
151 compatible = "fixed-partitions";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 partition@0 {
156 label = "u-boot";
157 reg = <0x0 0x30000>;
158 read-only;
159 };
160
161 partition@30000 {
162 label = "u-boot-env";
163 reg = <0x30000 0x1000>;
164 };
165
166 partition@31000 {
167 label = "config";
168 reg = <0x31000 0xf000>;
169 read-only;
170 };
171
172 factory: partition@40000 {
173 label = "factory";
174 reg = <0x40000 0x10000>;
175 read-only;
176 };
177
178 partition@50000 {
179 compatible = "denx,uimage";
180 label = "firmware";
181 reg = <0x50000 0xfb0000>;
182 };
183 };
184 };
185 };
186
187 &wmac {
188 status = "disabled";
189 };