ramips: clean up useless dts partition labels
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_tplink_archer-x6-v3.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
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 aliases {
11 label-mac-device = &gmac0;
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200n8";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 button-wps {
26 label = "wps";
27 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 button-reset {
33 label = "reset";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power: led-power {
44 color = <LED_COLOR_ID_GREEN>;
45 function = LED_FUNCTION_POWER;
46 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
47 };
48
49 led-wan-amber {
50 color = <LED_COLOR_ID_AMBER>;
51 function = LED_FUNCTION_WAN;
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 };
54
55 led-lan {
56 color = <LED_COLOR_ID_GREEN>;
57 function = LED_FUNCTION_LAN;
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60
61 led-wifi5g {
62 color = <LED_COLOR_ID_GREEN>;
63 function = LED_FUNCTION_WLAN;
64 function-enumerator = <5>;
65 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
66 linux,default-trigger = "phy1tpt";
67 };
68
69 led-wifi2g {
70 color = <LED_COLOR_ID_GREEN>;
71 function = LED_FUNCTION_WLAN;
72 function-enumerator = <2>;
73 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "phy0tpt";
75 };
76
77 led-wan-green {
78 color = <LED_COLOR_ID_GREEN>;
79 function = LED_FUNCTION_WAN;
80 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <40000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x40000>;
101 read-only;
102 };
103
104 partition@40000 {
105 label = "firmware";
106 compatible = "denx,uimage";
107 reg = <0x40000 0xf60000>;
108 };
109
110 partition@fa0000 {
111 label = "config";
112 reg = <0xfa0000 0x50000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 macaddr_config_8: macaddr@8 {
121 compatible = "mac-base";
122 reg = <0x8 0x6>;
123 #nvmem-cell-cells = <1>;
124 };
125 };
126 };
127
128 partition@ff0000 {
129 label = "radio";
130 reg = <0xff0000 0x10000>;
131 read-only;
132
133 nvmem-layout {
134 compatible = "fixed-layout";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 eeprom_radio_0: eeprom@0 {
139 reg = <0x0 0x400>;
140 };
141
142 eeprom_radio_8000: eeprom@8000 {
143 reg = <0x8000 0x4da8>;
144 };
145 };
146 };
147 };
148 };
149 };
150
151 &state_default {
152 gpio {
153 groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt";
154 function = "gpio";
155 };
156 };
157
158 &pcie {
159 status = "okay";
160 };
161
162 &pcie0 {
163 wifi@0,0 {
164 compatible = "mediatek,mt76";
165 reg = <0x0000 0 0 0 0>;
166 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 1>;
167 nvmem-cell-names = "eeprom", "mac-address";
168 ieee80211-freq-limit = <2400000 2500000>;
169 };
170 };
171
172 &pcie1 {
173 wifi@0,0 {
174 compatible = "mediatek,mt76";
175 reg = <0x0000 0 0 0 0>;
176 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8 2>;
177 nvmem-cell-names = "eeprom", "mac-address";
178 ieee80211-freq-limit = <5000000 6000000>;
179 };
180 };
181
182 &ethernet {
183 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
184 };
185
186 &gmac0 {
187 nvmem-cells = <&macaddr_config_8 0>;
188 nvmem-cell-names = "mac-address";
189 };
190
191 &switch0 {
192 ports {
193 port@0 {
194 status = "okay";
195 label = "wan";
196 };
197
198 port@1 {
199 status = "okay";
200 label = "lan1";
201 };
202
203 port@2 {
204 status = "okay";
205 label = "lan2";
206 };
207
208 port@3 {
209 status = "okay";
210 label = "lan3";
211 };
212
213 port@4 {
214 status = "okay";
215 label = "lan4";
216 };
217 };
218 };