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