ramips: mt7620: simplify DTS properties for GMAC
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_alfa-network_r36m-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,r36m-e4g", "ralink,mt7620a-soc";
10 model = "ALFA Network R36M-E4G";
11
12 aliases {
13 label-mac-device = &wmac;
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=ttyS1,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 = <&gpio1 1 GPIO_ACTIVE_HIGH>;
38 };
39
40 rtc-enable {
41 gpio-export,name = "rtc-enable";
42 gpio-export,output = <1>;
43 gpio-export,direction_may_change = <1>;
44 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
45 };
46
47 sim-select {
48 gpio-export,name = "sim-select";
49 gpio-export,output = <0>;
50 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
51 };
52
53 sim1-detect {
54 gpio-export,name = "sim1-detect";
55 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
56 };
57
58 sim2-detect {
59 gpio-export,name = "sim2-detect";
60 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66
67 reset {
68 label = "reset";
69 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RESTART>;
71 };
72
73 rfkill {
74 label = "rfkill";
75 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_RFKILL>;
77 };
78 };
79
80 leds {
81 compatible = "gpio-leds";
82
83 4g {
84 label = "orange:4g";
85 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
86 };
87
88 lan {
89 label = "green:lan";
90 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
91 };
92
93 led_system: system {
94 label = "green:system";
95 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
96 default-state = "keep";
97 };
98
99 sim1 {
100 label = "green:sim1";
101 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
102 default-state = "keep";
103 };
104
105 sim2 {
106 label = "green:sim2";
107 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
108 default-state = "keep";
109 };
110
111 wan {
112 label = "green:wan";
113 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
114 };
115
116 wlan {
117 label = "orange:wlan";
118 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
119 linux,default-trigger = "phy0radio";
120 };
121 };
122 };
123
124 &ehci {
125 status = "okay";
126 };
127
128 &ethernet {
129 mtd-mac-address = <&factory 0x28>;
130 };
131
132 &gpio1 {
133 status = "okay";
134 };
135
136 &gpio2 {
137 status = "okay";
138 };
139
140 &gpio3 {
141 status = "okay";
142 };
143
144 &i2c {
145 status = "okay";
146 };
147
148 &ohci {
149 status = "okay";
150 };
151
152 &state_default {
153 gpio {
154 groups = "ephy", "pcie", "rgmii1", "wled";
155 function = "gpio";
156 };
157 };
158
159 &spi0 {
160 status = "okay";
161
162 flash@0 {
163 compatible = "jedec,spi-nor";
164 reg = <0>;
165 spi-max-frequency = <50000000>;
166 m25p,fast-read;
167
168 partitions {
169 compatible = "fixed-partitions";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 partition@0 {
174 label = "u-boot";
175 reg = <0x0 0x30000>;
176 read-only;
177 };
178
179 partition@30000 {
180 label = "u-boot-env";
181 reg = <0x30000 0x1000>;
182 };
183
184 partition@31000 {
185 label = "config";
186 reg = <0x31000 0xf000>;
187 read-only;
188 };
189
190 factory: partition@40000 {
191 label = "factory";
192 reg = <0x40000 0x10000>;
193 read-only;
194 };
195
196 partition@50000 {
197 compatible = "denx,uimage";
198 label = "firmware";
199 reg = <0x50000 0xfb0000>;
200 };
201 };
202 };
203 };
204
205 &uart {
206 status = "okay";
207 };
208
209 &wmac {
210 ralink,mtd-eeprom = <&factory 0x0>;
211 };