mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 17:15:08 +00:00
add mt2500 target
This commit is contained in:
parent
4c75975f44
commit
e21434bc3e
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,6 @@ allpkg
|
||||
gl-axt1800
|
||||
qsdk*
|
||||
wlan-ap
|
||||
mt7981
|
||||
feeds/dl
|
||||
feeds/glinet
|
||||
|
||||
187
patches-mt7981-21.02.3/0101-add-mt2500-target.patch
Normal file
187
patches-mt7981-21.02.3/0101-add-mt2500-target.patch
Normal file
@ -0,0 +1,187 @@
|
||||
From 95881402e8dcaefca8abaefa4192fee593ca8fd8 Mon Sep 17 00:00:00 2001
|
||||
From: gl-luochongjun <luochongjun@gl-inet.com>
|
||||
Date: Thu, 28 Jul 2022 12:21:41 +0800
|
||||
Subject: [PATCH] add mt2500 target
|
||||
|
||||
---
|
||||
.../boot/dts/mediatek/mt7981-gl-mt2500.dts | 131 ++++++++++++++++++
|
||||
target/linux/mediatek/image/mt7981.mk | 13 ++
|
||||
.../mt7981/base-files/etc/board.d/02_network | 3 +
|
||||
3 files changed, 147 insertions(+)
|
||||
create mode 100755 target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt2500.dts
|
||||
|
||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt2500.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt2500.dts
|
||||
new file mode 100755
|
||||
index 0000000000..a4bd5f1e21
|
||||
--- /dev/null
|
||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt2500.dts
|
||||
@@ -0,0 +1,131 @@
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+/ {
|
||||
+ model = "GL.iNet GL-MT2500";
|
||||
+ compatible = "glinet,mt2500-emmc", "mediatek,mt7981";
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n1 loglevel=8 \
|
||||
+ earlycon=uart8250,mmio32,0x11002000 \
|
||||
+ root=PARTLABEL=rootfs rootfstype=squashfs,f2fs";
|
||||
+ };
|
||||
+ memory {
|
||||
+ // fpga ddr2: 128MB*2
|
||||
+ reg = <0 0x40000000 0 0x10000000>;
|
||||
+ };
|
||||
+ 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;
|
||||
+ };
|
||||
+ gl-hw {
|
||||
+ compatible = "gl-hw-info";
|
||||
+ model = "mt2500";
|
||||
+ wan = "eth0";
|
||||
+ lan = "eth1";
|
||||
+ usb-port = "1-1";
|
||||
+ flash_size = <4096>;
|
||||
+ factory_data {
|
||||
+ device_mac = "Factory", "0x0a";
|
||||
+ device_ddns = "Factory", "0x10";
|
||||
+ device_sn_bak = "Factory", "0x20";
|
||||
+ device_sn = "Factory", "0x30";
|
||||
+ country_code = "Factory", "0x88";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&watchdog {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default", "state_uhs";
|
||||
+ pinctrl-0 = <&mmc0_pins_default>;
|
||||
+ pinctrl-1 = <&mmc0_pins_uhs>;
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <52000000>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ gmac0: mac@0 {
|
||||
+ compatible = "mediatek,eth-mac";
|
||||
+ reg = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ pause;
|
||||
+ };
|
||||
+ };
|
||||
+ gmac1: mac@1 {
|
||||
+ compatible = "mediatek,eth-mac";
|
||||
+ reg = <1>;
|
||||
+ phy-mode = "gmii";
|
||||
+ phy-handle = <&phy0>;
|
||||
+ };
|
||||
+ mdio: mdio-bus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ phy0: ethernet-phy@0 {
|
||||
+ compatible = "ethernet-phy-id03a2.9461";
|
||||
+ reg = <0>;
|
||||
+ phy-mode = "gmii";
|
||||
+ nvmem-cells = <&phy_calibration>;
|
||||
+ nvmem-cell-names = "phy-cal-data";
|
||||
+ };
|
||||
+ phy5: phy@5 {
|
||||
+ compatible = "ethernet-phy-id67c9.de0a";
|
||||
+ reg = <5>;
|
||||
+ reset-gpios = <&pio 14 1>;
|
||||
+ reset-assert-us = <600>;
|
||||
+ reset-deassert-us = <20000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+&hnat {
|
||||
+ mtketh-wan = "eth1";
|
||||
+ mtketh-lan = "eth1";
|
||||
+ mtketh-ppd = "eth1";
|
||||
+ mtketh-max-gmac = <2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&spi1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spic_pins>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+&pio {
|
||||
+ spic_pins: spi1-pins {
|
||||
+ mux {
|
||||
+ function = "spi";
|
||||
+ groups = "spi1_1";
|
||||
+ };
|
||||
+ };
|
||||
+ mmc0_pins_default: mmc0-pins-default {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "emmc_45";
|
||||
+ };
|
||||
+ };
|
||||
+ mmc0_pins_uhs: mmc0-pins-uhs {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "emmc_45";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+&xhci {
|
||||
+ mediatek,u3p-dis-msk = <0x0>;
|
||||
+ phys = <&u2port0 PHY_TYPE_USB2>,
|
||||
+ <&u3port0 PHY_TYPE_USB3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/target/linux/mediatek/image/mt7981.mk b/target/linux/mediatek/image/mt7981.mk
|
||||
index 3e47d600b5..b95df58f8b 100755
|
||||
--- a/target/linux/mediatek/image/mt7981.mk
|
||||
+++ b/target/linux/mediatek/image/mt7981.mk
|
||||
@@ -189,3 +189,16 @@ define Device/glinet_gl-mt3000
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-gl-metadata
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-mt3000
|
||||
+
|
||||
+define Device/glinet_gl-mt2500
|
||||
+ DEVICE_VENDOR := GL.iNet
|
||||
+ DEVICE_MODEL := GL-MT2500
|
||||
+ DEVICE_DTS := mt7981-gl-mt2500
|
||||
+ SUPPORTED_DEVICES := glinet,mt2500-emmc
|
||||
+ DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
+ DEVICE_PACKAGES := mkf2fs e2fsprogs blkid blockdev losetup kmod-fs-ext4 \
|
||||
+ kmod-mmc kmod-fs-f2fs kmod-fs-vfat kmod-nls-cp437 \
|
||||
+ kmod-nls-iso8859-1
|
||||
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-gl-metadata
|
||||
+endef
|
||||
+TARGET_DEVICES += glinet_gl-mt2500
|
||||
diff --git a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
||||
index 1a5cdf0df3..4652f3eaf4 100755
|
||||
--- a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
||||
+++ b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network
|
||||
@@ -22,6 +22,9 @@ mediatek_setup_interfaces()
|
||||
*2500wan-p5*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
;;
|
||||
+ *mt2500*)
|
||||
+ ucidef_set_interfaces_lan_wan eth1 eth0
|
||||
+ ;;
|
||||
*mt3000*)
|
||||
ucidef_set_interfaces_lan_wan eth1 eth0
|
||||
;;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user