ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xzwifi_creativebox-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 = "xzwifi,creativebox-v1", "mediatek,mt7621-soc";
11 model = "CreativeBox v1";
12
13 aliases {
14 led-boot = &led_sys;
15 led-failsafe = &led_sys;
16 led-running = &led_sys;
17 led-upgrade = &led_sys;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power {
28 function = LED_FUNCTION_POWER;
29 color = <LED_COLOR_ID_BLUE>;
30 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 led_sys: sys {
35 label = "blue:sys";
36 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
37 };
38
39 internet {
40 label = "blue:internet";
41 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "blue:wlan2g";
46 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 wlan5g {
51 label = "blue:wlan5g";
52 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "phy1tpt";
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys";
59
60 reset {
61 label = "reset";
62 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66
67 gpio_export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70
71 power_usb2 {
72 gpio-export,name = "power_usb2";
73 gpio-export,output = <1>;
74 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
75 };
76
77 power_usb3 {
78 gpio-export,name = "power_usb3";
79 gpio-export,output = <1>;
80 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
81 };
82
83 power_sata {
84 gpio-export,name = "power_sata";
85 gpio-export,output = <1>;
86 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
87 };
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <40000000>;
98 broken-flash-reset;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x30000>;
108 read-only;
109 };
110
111 partition@30000 {
112 label = "u-boot-env";
113 reg = <0x30000 0x10000>;
114 read-only;
115 };
116
117 partition@40000 {
118 label = "factory";
119 reg = <0x40000 0x10000>;
120 read-only;
121
122 nvmem-layout {
123 compatible = "fixed-layout";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 eeprom_factory_0: eeprom@0 {
128 reg = <0x0 0x400>;
129 };
130
131 eeprom_factory_8000: eeprom@8000 {
132 reg = <0x8000 0x200>;
133 };
134
135 macaddr_factory_e000: macaddr@e000 {
136 compatible = "mac-base";
137 reg = <0xe000 0x6>;
138 #nvmem-cell-cells = <1>;
139 };
140 };
141 };
142
143 partition@50000 {
144 compatible = "denx,uimage";
145 label = "firmware";
146 reg = <0x50000 0x1fb0000>;
147 };
148 };
149 };
150 };
151
152 &sdhci {
153 status = "okay";
154 };
155
156 &pcie {
157 status = "okay";
158 };
159
160 &pcie0 {
161 wifi@0,0 {
162 compatible = "pci1400,7603";
163 reg = <0x0000 0 0 0 0>;
164 nvmem-cells = <&eeprom_factory_0>;
165 nvmem-cell-names = "eeprom";
166 };
167 };
168
169 &pcie1 {
170 wifi@0,0 {
171 compatible = "pci14c3,7662";
172 reg = <0x0000 0 0 0 0>;
173 nvmem-cells = <&eeprom_factory_8000>;
174 nvmem-cell-names = "eeprom";
175 ieee80211-freq-limit = <5000000 6000000>;
176 };
177 };
178
179 &ethernet {
180 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
181 };
182
183 &gmac0 {
184 nvmem-cells = <&macaddr_factory_e000 0>;
185 nvmem-cell-names = "mac-address";
186 };
187
188 &switch0 {
189 ports {
190 port@0 {
191 status = "okay";
192 label = "lan1";
193 };
194
195 port@1 {
196 status = "okay";
197 label = "lan2";
198 };
199
200 port@2 {
201 status = "okay";
202 label = "lan3";
203 };
204
205 port@3 {
206 status = "okay";
207 label = "lan4";
208 };
209
210 port@4 {
211 status = "okay";
212 label = "wan";
213 nvmem-cells = <&macaddr_factory_e000 1>;
214 nvmem-cell-names = "mac-address";
215 };
216 };
217 };
218
219 &state_default {
220 gpio {
221 groups = "wdt", "rgmii2";
222 function = "gpio";
223 };
224 };