ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[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
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.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 = "green:4g";
74 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
75 };
76
77 lan {
78 function = LED_FUNCTION_LAN;
79 color = <LED_COLOR_ID_BLUE>;
80 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
81 };
82
83 power: power {
84 function = LED_FUNCTION_POWER;
85 color = <LED_COLOR_ID_GREEN>;
86 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
87 default-state = "keep";
88 };
89
90 sim1 {
91 label = "green:sim1";
92 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
93 default-state = "keep";
94 };
95
96 sim2 {
97 label = "green:sim2";
98 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
99 default-state = "keep";
100 };
101 };
102 };
103
104 &ehci {
105 status = "okay";
106 };
107
108 &ethernet {
109 nvmem-cells = <&macaddr_factory_28>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &gpio1 {
114 status = "okay";
115 };
116
117 &gpio2 {
118 status = "okay";
119 };
120
121 &ohci {
122 status = "okay";
123 };
124
125 &pcie {
126 status = "disabled";
127 };
128
129 &state_default {
130 gpio {
131 groups = "ephy", "nd_sd", "pcie", "uartf";
132 function = "gpio";
133 };
134 };
135
136 &spi0 {
137 status = "okay";
138
139 flash@0 {
140 compatible = "jedec,spi-nor";
141 reg = <0>;
142 spi-max-frequency = <50000000>;
143 m25p,fast-read;
144
145 partitions {
146 compatible = "fixed-partitions";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 partition@0 {
151 label = "u-boot";
152 reg = <0x0 0x30000>;
153 read-only;
154 };
155
156 partition@30000 {
157 label = "u-boot-env";
158 reg = <0x30000 0x1000>;
159 };
160
161 partition@31000 {
162 label = "config";
163 reg = <0x31000 0xf000>;
164 read-only;
165 };
166
167 factory: partition@40000 {
168 label = "factory";
169 reg = <0x40000 0x10000>;
170 read-only;
171
172 nvmem-layout {
173 compatible = "fixed-layout";
174 #address-cells = <1>;
175 #size-cells = <1>;
176
177 macaddr_factory_28: macaddr@28 {
178 reg = <0x28 0x6>;
179 };
180 };
181 };
182
183 partition@50000 {
184 compatible = "denx,uimage";
185 label = "firmware";
186 reg = <0x50000 0xfb0000>;
187 };
188 };
189 };
190 };
191
192 &wmac {
193 status = "disabled";
194 };