mediatek: add support for GL.iNet GL-MT2500
[openwrt/staging/jow.git] / target / linux / mediatek / dts / mt7981b-glinet-gl-mt2500.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2
3 /dts-v1/;
4 #include "mt7981.dtsi"
5
6 / {
7 model = "GL.iNet GL-MT2500";
8 compatible = "glinet,gl-mt2500", "mediatek,mt7981";
9
10 aliases {
11 label-mac-device = &gmac0;
12 led-boot = &led_sys_white;
13 led-failsafe = &led_sys_blue;
14 led-running = &led_sys_white;
15 led-upgrade = &led_sys_blue;
16 serial0 = &uart0;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 bootargs-append = " root=PARTLABEL=rootfs rootwait";
22 };
23
24 gpio-keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led-vpn {
38 label = "white:vpn";
39 gpios = <&pio 31 GPIO_ACTIVE_LOW>;
40 };
41
42 led_sys_white: led-system-white {
43 label = "white:system";
44 gpios = <&pio 30 GPIO_ACTIVE_LOW>;
45 };
46
47 led_sys_blue: led-system-blue {
48 label = "blue:system";
49 gpios = <&pio 29 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 usb_vbus: regulstor-usb {
54 compatible = "regulator-fixed";
55
56 regulator-name = "usb-vbus";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
59
60 gpio = <&pio 12 GPIO_ACTIVE_HIGH>;
61 enable-active-high;
62 regulator-boot-on;
63 };
64
65 reg_3p3v: regulator-3p3v {
66 compatible = "regulator-fixed";
67 regulator-name = "fixed-3.3V";
68 regulator-min-microvolt = <3300000>;
69 regulator-max-microvolt = <3300000>;
70 regulator-boot-on;
71 regulator-always-on;
72 };
73 };
74
75 &pio {
76 mmc0_pins_default: mmc0-pins-default {
77 mux {
78 function = "flash";
79 groups = "emmc_45";
80 };
81 };
82 mmc0_pins_uhs: mmc0-pins-uhs {
83 mux {
84 function = "flash";
85 groups = "emmc_45";
86 };
87 };
88 };
89
90 &uart0 {
91 status = "okay";
92 };
93
94 &watchdog {
95 status = "okay";
96 };
97
98 &eth {
99 status = "okay";
100
101 pinctrl-names = "default";
102 pinctrl-0 = <&mdio_pins>;
103
104 gmac0: mac@0 {
105 compatible = "mediatek,eth-mac";
106 reg = <0>;
107
108 phy-mode = "2500base-x";
109 phy-handle = <&phy5>;
110 };
111
112 gmac1: mac@1 {
113 compatible = "mediatek,eth-mac";
114 reg = <1>;
115 phy-mode = "gmii";
116 phy-handle = <&int_gbe_phy>;
117 };
118 };
119
120 &mdio_bus {
121 reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
122 reset-delay-us = <600>;
123 reset-post-delay-us = <20000>;
124
125 phy5: ethernet-phy@5 {
126 reg = <5>;
127 compatible = "ethernet-phy-ieee802.3-c45";
128 };
129 };
130
131 &usb_phy {
132 status = "okay";
133 };
134
135 &xhci {
136 status = "okay";
137 vbus-supply = <&usb_vbus>;
138 };
139
140 &mmc0 {
141 status = "okay";
142
143 pinctrl-names = "default", "state_uhs";
144 pinctrl-0 = <&mmc0_pins_default>;
145 pinctrl-1 = <&mmc0_pins_uhs>;
146 bus-width = <8>;
147 max-frequency = <52000000>;
148 vmmc-supply = <&reg_3p3v>;
149 cap-mmc-highspeed;
150 non-removable;
151 };