ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_snr_snr-cpe-me1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 #include "mt7621.dtsi"
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7
8 / {
9 compatible = "snr,snr-cpe-me1", "mediatek,mt7621-soc";
10 model = "SNR-CPE-ME1";
11
12 aliases {
13 label-mac-device = &gmac1;
14
15 led-boot = &led_usb;
16 led-failsafe = &led_vpn;
17 led-running = &led_green;
18 led-upgrade = &led_sys;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_usb: led-0 { // USB Activity
25 color = <LED_COLOR_ID_GREEN>;
26 function = LED_FUNCTION_USB;
27 gpios = <&gpio 13 GPIO_ACTIVE_LOW>; // [JTAG] JTDO
28 };
29
30 led_vpn: led-1 { // VPN Activity
31 color = <LED_COLOR_ID_GREEN>;
32 function = LED_FUNCTION_INDICATOR;
33 gpios = <&gpio 16 GPIO_ACTIVE_LOW>; // [JTAG] JTCLK
34 };
35
36 led_sys: led-2 { // System config
37 color = <LED_COLOR_ID_GREEN>;
38 function = LED_FUNCTION_STATUS;
39 gpios = <&gpio 3 GPIO_ACTIVE_LOW>; // [I2C] I2C_SD
40 panic-indicator;
41 };
42
43 led_green: led-3 { // ? LED
44 color = <LED_COLOR_ID_GREEN>;
45 function = LED_FUNCTION_HEARTBEAT;
46 gpios = <&gpio 15 GPIO_ACTIVE_LOW>; // [JTAG] JTMS
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 reset {
54 label = "Reset Button";
55 gpios = <&gpio 14 GPIO_ACTIVE_LOW>; // [JTAG] JTDI
56 linux,code = <KEY_RESTART>;
57 };
58 };
59
60 reg_usb_vbus: regulator {
61 compatible = "regulator-fixed";
62 regulator-name = "usb_vbus";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;
66 enable-active-high;
67 };
68
69 reg_3p3v: regulator-3p3v {
70 compatible = "regulator-fixed";
71 regulator-name = "fixed-3.3V";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 regulator-boot-on;
75 regulator-always-on;
76 };
77 };
78
79 &gmac0 {
80 nvmem-cells = <&macaddr_factory_e000>;
81 nvmem-cell-names = "mac-address";
82 };
83
84 &gmac1 {
85 status = "okay";
86 label = "wan";
87 phy-handle = <&ethphy4>;
88
89 nvmem-cells = <&macaddr_factory_e006>;
90 nvmem-cell-names = "mac-address";
91 };
92
93 &mdio {
94 ethphy4: ethernet-phy@4 {
95 reg = <4>;
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &pcie0 { // MT7603EN
104 wifi@0,0 {
105 compatible = "mediatek,mt76";
106 reg = <0x0000 0 0 0 0>;
107 nvmem-cells = <&eeprom_factory_0>;
108 nvmem-cell-names = "eeprom";
109 ieee80211-freq-limit = <2400000 2500000>;
110 };
111 };
112
113 &pcie1 { // MT7610EN
114 wifi@0,0 {
115 compatible = "mediatek,mt76";
116 reg = <0x0000 0 0 0 0>;
117 nvmem-cells = <&eeprom_factory_8000>;
118 nvmem-cell-names = "eeprom";
119 ieee80211-freq-limit = <5000000 6000000>;
120 };
121 };
122
123 &spi0 {
124 status = "okay";
125
126 flash@0 { // GD25Q128CSIG
127 compatible = "jedec,spi-nor";
128 reg = <0>;
129 spi-max-frequency = <44000000>; // 44 MHz
130
131 partitions {
132 compatible = "fixed-partitions";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 partition@0 {
137 label = "Bootloader";
138 reg = <0x0 0x30000>;
139 read-only;
140 };
141
142 partition@30000 {
143 label = "Config";
144 reg = <0x30000 0x10000>;
145 read-only;
146 };
147
148 partition@40000 {
149 label = "Factory";
150 reg = <0x40000 0x10000>;
151 read-only;
152
153 nvmem-layout {
154 compatible = "fixed-layout";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 eeprom_factory_0: eeprom@0 {
159 reg = <0x0 0x400>;
160 };
161
162 eeprom_factory_8000: eeprom@8000 {
163 reg = <0x8000 0x200>;
164 };
165
166 macaddr_factory_e000: macaddr@e000 {
167 reg = <0xe000 0x6>;
168 };
169
170 macaddr_factory_e006: macaddr@e006 {
171 reg = <0xe006 0x6>;
172 };
173 };
174 };
175
176 partition@50000 {
177 compatible = "openwrt,uimage", "denx,uimage";
178 label = "firmware";
179 reg = <0x50000 0xfb0000>;
180 };
181
182 partition@30001 {
183 label = "uboot-env";
184 reg = <0x30000 0x1000>;
185 };
186 };
187 };
188 };
189
190 &state_default {
191 gpio {
192 groups = "i2c", "jtag";
193 function = "gpio";
194 };
195 };
196
197 &switch0 {
198 ports {
199 port@0 {
200 status = "okay";
201 label = "lan4";
202 };
203
204 port@1 {
205 status = "okay";
206 label = "lan3";
207 };
208
209 port@2 {
210 status = "okay";
211 label = "lan2";
212 };
213
214 port@3 {
215 status = "okay";
216 label = "lan1";
217 };
218 };
219 };
220
221 &xhci {
222 vbus-supply = <&reg_usb_vbus>;
223 vusb33-supply = <&reg_3p3v>;
224 };