mediatek: drop redundant label with new LED color/function format
[openwrt/openwrt.git] / target / linux / mediatek / dts / mt7981a-comfast-cf-e393ax.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include "mt7981.dtsi"
5
6 / {
7 model = "COMFAST CF-E393AX";
8 compatible = "comfast,cf-e393ax", "mediatek,mt7981";
9
10 aliases {
11 serial0 = &uart0;
12 led-boot = &led_red;
13 led-failsafe = &led_red;
14 led-running = &led_blue;
15 led-upgrade = &led_green;
16 };
17
18 chosen {
19 bootargs-override = "console=ttyS0,115200n8";
20 stdout-path = "serial0:115200n8";
21 };
22
23 memory {
24 reg = <0 0x40000000 0 0x10000000>; // 256mb
25 };
26
27 gpio-keys {
28 compatible = "gpio-keys";
29
30 reset {
31 label = "reset";
32 linux,code = <KEY_RESTART>;
33 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_blue: blue {
41 gpios = <&pio 8 GPIO_ACTIVE_LOW>;
42 color = <LED_COLOR_ID_BLUE>;
43 function = LED_FUNCTION_STATUS;
44 };
45
46 led_red: red {
47 gpios = <&pio 34 GPIO_ACTIVE_LOW>;
48 color = <LED_COLOR_ID_RED>;
49 function = LED_FUNCTION_STATUS;
50 };
51
52 led_green: green {
53 gpios = <&pio 35 GPIO_ACTIVE_LOW>;
54 color = <LED_COLOR_ID_GREEN>;
55 function = LED_FUNCTION_STATUS;
56 };
57 };
58 };
59
60 &eth {
61 status = "okay";
62
63 gmac0: mac@0 {
64 /* LAN */
65 compatible = "mediatek,eth-mac";
66 reg = <0>;
67 phy-mode = "2500base-x";
68 nvmem-cells = <&macaddr_factory_e000 0>;
69 nvmem-cell-names = "mac-address";
70
71 fixed-link {
72 speed = <2500>;
73 full-duplex;
74 pause;
75 };
76 };
77
78 gmac1: mac@1 {
79 /* WAN */
80 compatible = "mediatek,eth-mac";
81 reg = <1>;
82 phy-mode = "gmii";
83 phy-handle = <&int_gbe_phy>;
84 nvmem-cells = <&macaddr_factory_e000 1>;
85 nvmem-cell-names = "mac-address";
86 };
87 };
88
89 &mdio_bus {
90 switch: switch@1f {
91 compatible = "mediatek,mt7531";
92 reg = <31>;
93 interrupt-controller;
94 #interrupt-cells = <1>;
95 interrupt-parent = <&pio>;
96 interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
97 reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
98 };
99 };
100
101 &crypto {
102 status = "okay";
103 };
104
105 &pio {
106 spi0_flash_pins: spi0-pins {
107 mux {
108 function = "spi";
109 groups = "spi0", "spi0_wp_hold";
110 };
111 conf-pu {
112 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
113 drive-strength = <MTK_DRIVE_8mA>;
114 bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
115 };
116 conf-pd {
117 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
118 drive-strength = <MTK_DRIVE_8mA>;
119 bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
120 };
121 };
122
123 };
124
125 &spi0 {
126 pinctrl-names = "default";
127 pinctrl-0 = <&spi0_flash_pins>;
128 cs-gpios = <0>, <0>;
129 #address-cells = <1>;
130 #size-cells = <0>;
131 status = "okay";
132 #address-cells = <1>;
133 #size-cells = <0>;
134
135 spi_nand: spi_nand@0 {
136 #address-cells = <1>;
137 #size-cells = <1>;
138 compatible = "spi-nand";
139 reg = <1>;
140 spi-max-frequency = <52000000>;
141
142 spi-cal-enable;
143 spi-cal-mode = "read-data";
144 spi-cal-datalen = <7>;
145 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
146 spi-cal-addrlen = <5>;
147 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
148
149 spi-tx-bus-width = <4>;
150 spi-rx-bus-width = <4>;
151 mediatek,nmbm;
152 mediatek,bmt-max-ratio = <1>;
153 mediatek,bmt-max-reserved-blocks = <64>;
154
155 partitions {
156 compatible = "fixed-partitions";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 partition@0 {
161 label = "BL2";
162 reg = <0x00000 0x0100000>;
163 read-only;
164 };
165
166 partition@100000 {
167 label = "u-boot-env";
168 reg = <0x0100000 0x0080000>;
169 read-only;
170 };
171
172 factory: partition@180000 {
173 label = "Factory";
174 reg = <0x180000 0x0200000>;
175 read-only;
176
177 nvmem-layout {
178 compatible = "fixed-layout";
179 #address-cells = <1>;
180 #size-cells = <1>;
181
182 eeprom_factory_0: eeprom@0 {
183 reg = <0x0 0x1000>;
184 };
185
186 macaddr_factory_e000: macaddr@e000 {
187 compatible = "mac-base";
188 reg = <0xe000 0x6>;
189 #nvmem-cell-cells = <1>;
190 };
191 };
192 };
193
194 partition@380000 {
195 label = "FIP";
196 reg = <0x380000 0x0200000>;
197 read-only;
198 };
199
200 partition@580000 {
201 label = "ubi";
202 reg = <0x580000 0x4000000>;
203 compatible = "linux,ubi";
204 };
205 };
206 };
207 };
208
209 &switch {
210 ports {
211 #address-cells = <1>;
212 #size-cells = <0>;
213
214 port@0 {
215 reg = <0>;
216 label = "lan1";
217 };
218
219 port@6 {
220 reg = <6>;
221 label = "cpu";
222 ethernet = <&gmac0>;
223 phy-mode = "2500base-x";
224
225 fixed-link {
226 speed = <2500>;
227 full-duplex;
228 pause;
229 };
230 };
231 };
232 };
233
234 &uart0 {
235 status = "okay";
236 };
237
238 &watchdog {
239 status = "okay";
240 };
241
242 &wifi {
243 status = "okay";
244 nvmem-cells = <&eeprom_factory_0>;
245 nvmem-cell-names = "eeprom";
246 };
247