ramips: provide label MAC for ALFA Network Tube-E4G
[openwrt/staging/mkresin.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 &pinctrl {
135 state_default: pinctrl0 {
136 gpio {
137 ralink,group = "ephy", "nd_sd", "pcie", "uartf";
138 ralink,function = "gpio";
139 };
140 };
141 };
142
143 &spi0 {
144 status = "okay";
145
146 flash@0 {
147 compatible = "jedec,spi-nor";
148 reg = <0>;
149 spi-max-frequency = <50000000>;
150 m25p,fast-read;
151
152 partitions {
153 compatible = "fixed-partitions";
154 #address-cells = <1>;
155 #size-cells = <1>;
156
157 partition@0 {
158 label = "u-boot";
159 reg = <0x0 0x30000>;
160 read-only;
161 };
162
163 partition@30000 {
164 label = "u-boot-env";
165 reg = <0x30000 0x1000>;
166 };
167
168 partition@31000 {
169 label = "config";
170 reg = <0x31000 0xf000>;
171 read-only;
172 };
173
174 factory: partition@40000 {
175 label = "factory";
176 reg = <0x40000 0x10000>;
177 read-only;
178 };
179
180 partition@50000 {
181 compatible = "denx,uimage";
182 label = "firmware";
183 reg = <0x50000 0xfb0000>;
184 };
185 };
186 };
187 };
188
189 &wmac {
190 status = "disabled";
191 };