1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
10 model = "Confiabits MT7981";
11 compatible = "confiabits,mt7981", "mediatek,mt7981";
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
22 stdout-path = "serial0:115200n8";
26 compatible = "gpio-keys";
30 linux,input-type = <EV_SW>;
32 gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
33 debounce-interval = <60>;
38 linux,code = <KEY_RESTART>;
39 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
44 compatible = "gpio-leds";
47 color = <LED_COLOR_ID_RED>;
48 function = LED_FUNCTION_WLAN;
49 function-enumerator = <5>;
50 gpios = <&pio 5 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
55 color = <LED_COLOR_ID_RED>;
56 function = LED_FUNCTION_WAN;
57 gpios = <&pio 6 GPIO_ACTIVE_LOW>;
60 led_power: led-power {
61 label = "blue:power"; // can be removed once #13837 is merged
62 color = <LED_COLOR_ID_BLUE>;
63 function = LED_FUNCTION_POWER;
64 gpios = <&pio 7 GPIO_ACTIVE_LOW>;
68 color = <LED_COLOR_ID_BLUE>;
69 function = LED_FUNCTION_LAN;
70 function-enumerator = <1>;
71 gpios = <&pio 9 GPIO_ACTIVE_LOW>;
75 color = <LED_COLOR_ID_BLUE>;
76 function = LED_FUNCTION_LAN;
77 function-enumerator = <2>;
78 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
82 color = <LED_COLOR_ID_BLUE>;
83 function = LED_FUNCTION_LAN;
84 function-enumerator = <3>;
85 gpios = <&pio 11 GPIO_ACTIVE_LOW>;
89 color = <LED_COLOR_ID_BLUE>;
90 function = LED_FUNCTION_WAN;
91 gpios = <&pio 12 GPIO_ACTIVE_LOW>;
95 color = <LED_COLOR_ID_RED>;
96 function = LED_FUNCTION_WLAN;
97 function-enumerator = <2>;
98 gpios = <&pio 34 GPIO_ACTIVE_LOW>;
99 linux,default-trigger = "phy0tpt";
103 color = <LED_COLOR_ID_BLUE>;
104 function = "mesh"; // no LED_FUNCTION_MESH yet
105 gpios = <&pio 35 GPIO_ACTIVE_LOW>;
119 pinctrl-names = "default";
120 pinctrl-0 = <&mdio_pins>;
125 compatible = "mediatek,eth-mac";
127 phy-mode = "2500base-x";
129 nvmem-cell-names = "mac-address";
130 nvmem-cells = <&macaddr_factory_4 0>;
142 #address-cells = <1>;
146 compatible = "mediatek,mt7531";
148 reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
154 #address-cells = <1>;
176 nvmem-cell-names = "mac-address";
177 nvmem-cells = <&macaddr_factory_4 1>;
184 phy-mode = "2500base-x";
196 pinctrl-names = "default";
197 pinctrl-0 = <&spi0_flash_pins>;
201 #address-cells = <1>;
203 compatible = "spi-nand";
205 spi-max-frequency = <52000000>;
208 spi-cal-mode = "read-data";
209 spi-cal-datalen = <7>;
210 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
211 spi-cal-addrlen = <5>;
212 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
214 spi-tx-buswidth = <4>;
215 spi-rx-buswidth = <4>;
217 mediatek,bmt-max-ratio = <1>;
218 mediatek,bmt-max-reserved-blocks = <64>;
221 compatible = "fixed-partitions";
222 #address-cells = <1>;
227 reg = <0x00000 0x0100000>;
232 label = "u-boot-env";
233 reg = <0x0100000 0x0080000>;
237 factory: partition@180000 {
239 reg = <0x180000 0x0200000>;
243 compatible = "fixed-layout";
244 #address-cells = <1>;
247 eeprom_factory_0: eeprom@0 {
251 macaddr_factory_4: macaddr@4 {
252 compatible = "mac-base";
254 #nvmem-cell-cells = <1>;
261 reg = <0x380000 0x0200000>;
267 reg = <0x580000 0x4000000>;
268 compatible = "linux,ubi";
275 spi0_flash_pins: spi0-pins {
278 groups = "spi0", "spi0_wp_hold";
290 mediatek,u3p-dis-msk = <0x1>;
295 nvmem-cells = <&eeprom_factory_0>;
296 nvmem-cell-names = "eeprom";