ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_archer-c6u-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.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 = "tplink,archer-c6u-v1", "mediatek,mt7621-soc";
11 model = "TP-Link Archer C6U v1";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33
34 wps {
35 label = "wps";
36 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_WPS_BUTTON>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_power: power {
45 function = LED_FUNCTION_POWER;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 };
49
50 usb {
51 function = LED_FUNCTION_USB;
52 color = <LED_COLOR_ID_GREEN>;
53 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
54 trigger-sources = <&ehci_port2>;
55 linux,default-trigger = "usbport";
56 };
57
58 wan-orange {
59 function = LED_FUNCTION_WAN;
60 color = <LED_COLOR_ID_ORANGE>;
61 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
62 };
63
64 lan {
65 function = LED_FUNCTION_LAN;
66 color = <LED_COLOR_ID_GREEN>;
67 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
68 };
69
70 wifi5g {
71 label = "green:wifi5g";
72 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
73 linux,default-trigger = "phy1tpt";
74 };
75
76 wifi2g {
77 label = "green:wifi2g";
78 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "phy0tpt";
80 };
81
82 wan-green {
83 function = LED_FUNCTION_WAN;
84 color = <LED_COLOR_ID_GREEN>;
85 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
86 };
87 };
88
89 reg_usb_vbus: regulator {
90 compatible = "regulator-fixed";
91 regulator-name = "usb_vbus";
92 regulator-min-microvolt = <5000000>;
93 regulator-max-microvolt = <5000000>;
94 gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
95 enable-active-high;
96 };
97 };
98
99 &spi0 {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <80000000>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x000000 0x040000>;
115 read-only;
116 };
117
118 partition@40000 {
119 compatible = "denx,uimage";
120 label = "firmware";
121 reg = <0x040000 0xf60000>;
122 };
123
124 partition@fa0000 {
125 label = "config";
126 reg = <0xfa0000 0x010000>;
127 read-only;
128
129 nvmem-layout {
130 compatible = "fixed-layout";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 macaddr_config_8: macaddr@8 {
135 compatible = "mac-base";
136 reg = <0x8 0x6>;
137 #nvmem-cell-cells = <1>;
138 };
139 };
140 };
141
142 partition@fb0000 {
143 label = "tplink";
144 reg = <0xfb0000 0x040000>;
145 read-only;
146 };
147
148 partition@ff0000 {
149 label = "radio";
150 reg = <0xff0000 0x010000>;
151 read-only;
152
153 nvmem-layout {
154 compatible = "fixed-layout";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 eeprom_radio_0: eeprom@0 {
159 reg = <0x0 0x400>;
160 };
161
162 eeprom_radio_8000: eeprom@8000 {
163 reg = <0x8000 0x4da8>;
164 };
165 };
166 };
167 };
168 };
169 };
170
171 &pcie {
172 status = "okay";
173 };
174
175 &pcie0 {
176 mt76@0,0 {
177 compatible = "mediatek,mt76";
178 reg = <0x0000 0 0 0 0>;
179 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 0>;
180 nvmem-cell-names = "eeprom", "mac-address";
181 ieee80211-freq-limit = <2400000 2500000>;
182 };
183 };
184
185 &pcie1 {
186 mt76@0,0 {
187 compatible = "mediatek,mt76";
188 reg = <0x0000 0 0 0 0>;
189 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8 (-1)>;
190 nvmem-cell-names = "eeprom", "mac-address";
191 ieee80211-freq-limit = <5000000 6000000>;
192 };
193 };
194
195 &gmac0 {
196 nvmem-cells = <&macaddr_config_8 0>;
197 nvmem-cell-names = "mac-address";
198 };
199
200 &gmac1 {
201 status = "okay";
202 label = "wan";
203 phy-handle = <&ethphy0>;
204
205 nvmem-cells = <&macaddr_config_8 1>;
206 nvmem-cell-names = "mac-address";
207 };
208
209 &mdio {
210 ethphy0: ethernet-phy@0 {
211 reg = <0>;
212 };
213 };
214
215 &switch0 {
216 ports {
217 port@1 {
218 status = "okay";
219 label = "lan1";
220 };
221
222 port@2 {
223 status = "okay";
224 label = "lan2";
225 };
226
227 port@3 {
228 status = "okay";
229 label = "lan3";
230 };
231
232 port@4 {
233 status = "okay";
234 label = "lan4";
235 };
236 };
237 };
238
239 &state_default {
240 gpio {
241 groups = "i2c", "uart2", "uart3", "jtag", "wdt", "sdhci";
242 function = "gpio";
243 };
244 };
245
246 &xhci {
247 vbus-supply = <&reg_usb_vbus>;
248 };