mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-17 17:44:06 +00:00
add support for 360t7
This commit is contained in:
parent
ac862d1317
commit
973a8f08ed
@ -1,365 +1,60 @@
|
|||||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-108M.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-108M.dts
|
From d5cd3a824cd58b2b9eec31a0407c23fa39540386 Mon Sep 17 00:00:00 2001
|
||||||
new file mode 100644
|
From: fujr <fjrcn@outlook.com>
|
||||||
index 0000000000..3be72d2960
|
Date: Mon, 27 Feb 2023 19:52:22 +0800
|
||||||
--- /dev/null
|
Subject: [PATCH] add gl config
|
||||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-108M.dts
|
|
||||||
@@ -0,0 +1,60 @@
|
---
|
||||||
+/dts-v1/;
|
.../boot/dts/mediatek/mt7981-360-t7-base.dtsi | 30 +++++++++++++++++++
|
||||||
+#include "mt7981-360-t7-base.dtsi"
|
1 file changed, 30 insertions(+)
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ nmbm_spim_nand {
|
|
||||||
+ compatible = "generic,nmbm";
|
|
||||||
+
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+
|
|
||||||
+ lower-mtd-device = <&spi_nand>;
|
|
||||||
+ forced-create;
|
|
||||||
+
|
|
||||||
+ partitions {
|
|
||||||
+ compatible = "fixed-partitions";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+
|
|
||||||
+ partition@0 {
|
|
||||||
+ label = "BL2";
|
|
||||||
+ reg = <0x00 0x100000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@100000 {
|
|
||||||
+ label = "u-boot-env";
|
|
||||||
+ reg = <0x100000 0x80000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@180000 {
|
|
||||||
+ label = "Factory";
|
|
||||||
+ reg = <0x180000 0x200000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@380000 {
|
|
||||||
+ label = "FIP";
|
|
||||||
+ reg = <0x380000 0x200000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@580000 {
|
|
||||||
+ label = "ubi";
|
|
||||||
+ reg = <0x580000 0x6c00000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7180000 {
|
|
||||||
+ label = "stock-config";
|
|
||||||
+ reg = <0x7180000 0x100000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7280000 {
|
|
||||||
+ label = "stock-factory";
|
|
||||||
+ reg = <0x7280000 0x80000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7300000 {
|
|
||||||
+ label = "stock-log";
|
|
||||||
+ reg = <0x7300000 0x400000>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi
|
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi
|
||||||
new file mode 100644
|
index 92a704e5e2..1f3ce6da9e 100644
|
||||||
index 0000000000..54be7d2ad4
|
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi
|
||||||
--- /dev/null
|
|
||||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi
|
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7-base.dtsi
|
||||||
@@ -0,0 +1,217 @@
|
@@ -12,6 +12,29 @@
|
||||||
+/dts-v1/;
|
led-upgrade = &green_led;
|
||||||
+#include "mt7981.dtsi"
|
};
|
||||||
|
|
||||||
+
|
+
|
||||||
+/ {
|
+ gl-hw {
|
||||||
+ model = "360 T7";
|
+ compatible = "gl-hw-info";
|
||||||
+ compatible = "360,t7", "mediatek,mt7981";
|
+ model = "mt3000";
|
||||||
|
+ wan = "eth0";
|
||||||
|
+ lan = "eth1";
|
||||||
|
+ temperature = "/sys/devices/virtual/thermal/thermal_zone0/temp";
|
||||||
|
+ switch-button = "gpio-455";
|
||||||
|
+ reset-button = "gpio-456";
|
||||||
|
+ radio = "mt798111 mt798112";
|
||||||
|
+ cfg-partition = "/dev/mtd7";
|
||||||
|
+ flash_size = <128>;
|
||||||
|
+ dfs;
|
||||||
|
+ factory_data {
|
||||||
|
+ device_mac = "stock-factory", "0xb0";
|
||||||
|
+ device_ddns = "stock-factory", "0xc0";
|
||||||
|
+ device_sn_bak = "stock-factory", "0xd0";
|
||||||
|
+ device_sn = "stock-factory", "0xe0";
|
||||||
|
+ country_code = "stock-factory", "0x7a";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
+
|
+
|
||||||
+ aliases {
|
|
||||||
+ led-boot = &red_led;
|
|
||||||
+ led-failsafe = &red_led;
|
|
||||||
+ led-running = &green_led;
|
|
||||||
+ led-upgrade = &green_led;
|
|
||||||
+ };
|
|
||||||
+
|
+
|
||||||
+ chosen {
|
chosen {
|
||||||
+ bootargs = "console=ttyS0,115200n1 loglevel=8 \
|
bootargs = "console=ttyS0,115200n1 loglevel=8 \
|
||||||
+ earlycon=uart8250,mmio32,0x11002000";
|
earlycon=uart8250,mmio32,0x11002000";
|
||||||
+ };
|
@@ -96,6 +119,13 @@
|
||||||
+
|
mdio: mdio-bus {
|
||||||
+ memory {
|
#address-cells = <1>;
|
||||||
+ reg = <0 0x40000000 0 0x10000000>;
|
#size-cells = <0>;
|
||||||
+ };
|
+ ethernet-phy@0 {
|
||||||
+
|
+ compatible = "ethernet-phy-id03a2.9461";
|
||||||
+ leds {
|
+ reg = <0x00>;
|
||||||
+ compatible = "gpio-leds";
|
+ phy-mode = "gmii";
|
||||||
+
|
+ nvmem-cells = <0x12>;
|
||||||
+ green_led: green {
|
+ nvmem-cell-names = "phy-cal-data";
|
||||||
+ label = "360t7:green";
|
+ };
|
||||||
+ gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
};
|
||||||
+ };
|
};
|
||||||
+
|
|
||||||
+ red_led: red {
|
--
|
||||||
+ label = "360t7:red";
|
2.25.1
|
||||||
+ gpios = <&pio 3 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gpio-keys {
|
|
||||||
+ compatible = "gpio-keys";
|
|
||||||
+ reset {
|
|
||||||
+ label = "reset";
|
|
||||||
+ linux,code = <KEY_RESTART>;
|
|
||||||
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wps {
|
|
||||||
+ label = "wps";
|
|
||||||
+ linux,code = <KEY_WPS_BUTTON>;
|
|
||||||
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gsw: gsw@0 {
|
|
||||||
+ compatible = "mediatek,mt753x";
|
|
||||||
+ mediatek,ethsys = <ðsys>;
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&uart0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&watchdog {
|
|
||||||
+ 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 = "2500base-x";
|
|
||||||
+
|
|
||||||
+ fixed-link {
|
|
||||||
+ speed = <2500>;
|
|
||||||
+ full-duplex;
|
|
||||||
+ pause;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ mdio: mdio-bus {
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&gsw {
|
|
||||||
+ mediatek,mdio = <&mdio>;
|
|
||||||
+ mediatek,mdio_master_pinmux = <0>;
|
|
||||||
+ reset-gpios = <&pio 39 0>;
|
|
||||||
+ interrupt-parent = <&pio>;
|
|
||||||
+ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ port5: port@5 {
|
|
||||||
+ compatible = "mediatek,mt753x-port";
|
|
||||||
+ reg = <5>;
|
|
||||||
+ phy-mode = "sgmii";
|
|
||||||
+
|
|
||||||
+ fixed-link {
|
|
||||||
+ speed = <2500>;
|
|
||||||
+ full-duplex;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ port6: port@6 {
|
|
||||||
+ compatible = "mediatek,mt753x-port";
|
|
||||||
+ mediatek,ssc-on;
|
|
||||||
+ reg = <6>;
|
|
||||||
+ phy-mode = "sgmii";
|
|
||||||
+
|
|
||||||
+ fixed-link {
|
|
||||||
+ speed = <2500>;
|
|
||||||
+ full-duplex;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&hnat {
|
|
||||||
+ mtketh-wan = "eth1";
|
|
||||||
+ mtketh-lan = "eth0";
|
|
||||||
+ mtketh-max-gmac = <2>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&spi0 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&spi0_flash_pins>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ spi_nand: spi_nand@0 {
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+ compatible = "spi-nand";
|
|
||||||
+ reg = <0>;
|
|
||||||
+ spi-max-frequency = <52000000>;
|
|
||||||
+ spi-tx-buswidth = <4>;
|
|
||||||
+ spi-rx-buswidth = <4>;
|
|
||||||
+ spi-cal-enable;
|
|
||||||
+ spi-cal-mode = "read-data";
|
|
||||||
+ spi-cal-datalen = <7>;
|
|
||||||
+ spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; /* 'SPINAND' */
|
|
||||||
+ spi-cal-addrlen = <5>;
|
|
||||||
+ spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pio {
|
|
||||||
+ pwm0_pin: pwm0-pin-g0 {
|
|
||||||
+ mux {
|
|
||||||
+ function = "pwm";
|
|
||||||
+ groups = "pwm0_0";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ pwm1_pin: pwm1-pin-g0 {
|
|
||||||
+ mux {
|
|
||||||
+ function = "pwm";
|
|
||||||
+ groups = "pwm1_0";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ pwm2_pin: pwm2-pin {
|
|
||||||
+ mux {
|
|
||||||
+ function = "pwm";
|
|
||||||
+ groups = "pwm2";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ spi0_flash_pins: spi0-pins {
|
|
||||||
+ mux {
|
|
||||||
+ function = "spi";
|
|
||||||
+ groups = "spi0", "spi0_wp_hold";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ conf-pu {
|
|
||||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
|
||||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
|
||||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ conf-pd {
|
|
||||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
|
||||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
|
||||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ uart1_pins: uart1-pins-g1 {
|
|
||||||
+ mux {
|
|
||||||
+ function = "uart";
|
|
||||||
+ groups = "uart1_1";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ uart2_pins: uart2-pins-g1 {
|
|
||||||
+ mux {
|
|
||||||
+ function = "uart";
|
|
||||||
+ groups = "uart2_1";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7.dts
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000..0fcb42ee28
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-360-t7.dts
|
|
||||||
@@ -0,0 +1,70 @@
|
|
||||||
+/dts-v1/;
|
|
||||||
+#include "mt7981-360-t7-base.dtsi"
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ nmbm_spim_nand {
|
|
||||||
+ compatible = "generic,nmbm";
|
|
||||||
+
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+
|
|
||||||
+ lower-mtd-device = <&spi_nand>;
|
|
||||||
+ forced-create;
|
|
||||||
+
|
|
||||||
+ partitions {
|
|
||||||
+ compatible = "fixed-partitions";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+
|
|
||||||
+ partition@0 {
|
|
||||||
+ label = "BL2";
|
|
||||||
+ reg = <0x00 0x100000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@100000 {
|
|
||||||
+ label = "u-boot-env";
|
|
||||||
+ reg = <0x100000 0x80000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@180000 {
|
|
||||||
+ label = "Factory";
|
|
||||||
+ reg = <0x180000 0x200000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@380000 {
|
|
||||||
+ label = "FIP";
|
|
||||||
+ reg = <0x380000 0x200000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@580000 {
|
|
||||||
+ label = "ubi";
|
|
||||||
+ reg = <0x580000 0x2400000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@2980000 {
|
|
||||||
+ label = "firmware-1";
|
|
||||||
+ reg = <0x2980000 0x2400000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@4D80000 {
|
|
||||||
+ label = "plugin";
|
|
||||||
+ reg = <0x4d80000 0x2400000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7180000 {
|
|
||||||
+ label = "stock-config";
|
|
||||||
+ reg = <0x7180000 0x100000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7280000 {
|
|
||||||
+ label = "stock-factory";
|
|
||||||
+ reg = <0x7280000 0x80000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ partition@7300000 {
|
|
||||||
+ label = "stock-log";
|
|
||||||
+ reg = <0x7300000 0x400000>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user