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