summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/dts
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2023-04-20 19:49:55 +0200
committerDavid Bauer <mail@david-bauer.net>2023-11-27 08:02:41 +0100
commit12396686484a488dff1c4a1ee8b5197c552572fe (patch)
tree03e2ef88424ec973192c03f63e026bd7fac23051 /target/linux/mediatek/dts
parent54e52fdacbbff30ec16fea60c2c7a13d4d3c31d3 (diff)
mediatek: add support for GL.iNet GL-MT2500
Hardware -------- SoC: MediaTek MT7981BA RAM: 1GB DDR4 (NANYA NT5AD512M16C4-JR) MMC: 8GB eMMC (Samsung 8GTF4R) ETH: 1000Base-T LAN (ePHY) 2500Base-T WAN (MaxLinear GPY211C) BTN: 1x Reset Button LED: System (blue/white) VPN (white) USB: 1x USB-A (USB 3.0) UART: 115200 8N1 - Pinout on board next to LAN port Don't connect 3.3V! Known Issues ------------ U-Boot vendor recovery does not seem to accept any images, neither GL.iNet images nor OpenWrt images. Recovery requires serial access! Installation ------------ Upload the OpenWrt sysupgrade image to the Gl.iNet Web-UI. Make sure to not retain existing settings. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/mediatek/dts')
-rw-r--r--target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts151
1 files changed, 151 insertions, 0 deletions
diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts
new file mode 100644
index 0000000000..068dd0f236
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts
@@ -0,0 +1,151 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include "mt7981.dtsi"
+
+/ {
+ model = "GL.iNet GL-MT2500";
+ compatible = "glinet,gl-mt2500", "mediatek,mt7981";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_sys_white;
+ led-failsafe = &led_sys_blue;
+ led-running = &led_sys_white;
+ led-upgrade = &led_sys_blue;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ bootargs-append = " root=PARTLABEL=rootfs rootwait";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-vpn {
+ label = "white:vpn";
+ gpios = <&pio 31 GPIO_ACTIVE_LOW>;
+ };
+
+ led_sys_white: led-system-white {
+ label = "white:system";
+ gpios = <&pio 30 GPIO_ACTIVE_LOW>;
+ };
+
+ led_sys_blue: led-system-blue {
+ label = "blue:system";
+ gpios = <&pio 29 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ usb_vbus: regulstor-usb {
+ compatible = "regulator-fixed";
+
+ regulator-name = "usb-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+
+ gpio = <&pio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ };
+
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
+
+&pio {
+ mmc0_pins_default: mmc0-pins-default {
+ mux {
+ function = "flash";
+ groups = "emmc_45";
+ };
+ };
+ mmc0_pins_uhs: mmc0-pins-uhs {
+ mux {
+ function = "flash";
+ groups = "emmc_45";
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&watchdog {
+ status = "okay";
+};
+
+&eth {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio_pins>;
+
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+
+ phy-mode = "2500base-x";
+ phy-handle = <&phy5>;
+ };
+
+ gmac1: mac@1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ phy-mode = "gmii";
+ phy-handle = <&int_gbe_phy>;
+ };
+};
+
+&mdio_bus {
+ reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
+ reset-delay-us = <600>;
+ reset-post-delay-us = <20000>;
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ };
+};
+
+&usb_phy {
+ status = "okay";
+};
+
+&xhci {
+ status = "okay";
+ vbus-supply = <&usb_vbus>;
+};
+
+&mmc0 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_pins_default>;
+ pinctrl-1 = <&mmc0_pins_uhs>;
+ bus-width = <8>;
+ max-frequency = <52000000>;
+ vmmc-supply = <&reg_3p3v>;
+ cap-mmc-highspeed;
+ non-removable;
+};