[openwrt/openwrt] mediatek: filogic: add support for Totolink X6000R
LEDE Commits
lede-commits at lists.infradead.org
Sun Sep 21 06:50:02 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7cd10add2de3c8227cf7383c7ca5cf3b12eeb822
commit 7cd10add2de3c8227cf7383c7ca5cf3b12eeb822
Author: Ari Kurniawan <noobhek at gmail.com>
AuthorDate: Mon Sep 15 20:13:29 2025 +0700
mediatek: filogic: add support for Totolink X6000R
Specification :
- SOC : Mediatek MT7981B (1.3GHz)
- RAM : 256MB
- Flash : 16MB SPI NOR
- Ports : 4 LAN (1G) & 1 WAN (1G)
- WIFI : MediaTek dual-band WiFi 6
- 2.4 GHz : b/g/n/ax, MIMO 2x2
- 5 GHz : a/n/ac/ax, MIMO 2x2
- Buttons : Reset & WPS/Mesh
- LEDS : WAN (Green), Status (Red & Blue)
- Power : 12V1A
Install via OEM web ui:
Upload the sysupgrade image to firmware upgrade page on OEM web ui
Install via recovery / revert to stock firmware:
1. Unplug from power
2. Download the Sysupgrade (for openwrt installation) or OEM Factory image (for revert to stock firmware)
3. Set your computer ethernet IP to 192.168.1.X, subnet 255.255.255.0 (X=your chosen ip number ranging from 2-254)
4. Press and hold reset button while turn on / plug power adapter to the router. Wait untill ALL LAN green LED turn on, then release the reset button.
5. Plug the LAN cable from your computer into LAN 1 port then open web browser, and type in the address column : 192.168.1.1
6. Upload the sysupgrade / oem factory image
7. Wait until the router finished flashing (the router will reboot)
8. Set ethernet ip to dhcp
9. Open 192.168.1.1 (for openwrt install) / 192.168.0.1 (for OEM firmware)
Signed-off-by: Ari Kurniawan <noobhek at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20035
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../linux/mediatek/dts/mt7981b-totolink-x6000r.dts | 254 +++++++++++++++++++++
.../filogic/base-files/etc/board.d/01_leds | 3 +
target/linux/mediatek/image/filogic.mk | 11 +
3 files changed, 268 insertions(+)
diff --git a/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts b/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
new file mode 100644
index 0000000000..aebb3b9244
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-totolink-x6000r.dts
@@ -0,0 +1,254 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+ model = "TOTOLINK X6000R";
+ compatible = "totolink,x6000r", "mediatek,mt7981";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_status;
+ led-failsafe = &led_status_red;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory at 40000000 {
+ reg = <0 0x40000000 0 0x10000000>;
+ device_type = "memory";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_red: led-1 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&pio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&pio 15 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+ð {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio_pins &gbe_led0_pins &gbe_led1_pins>;
+ status = "okay";
+
+ gmac0: mac at 0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ phy-mode = "2500base-x";
+
+ nvmem-cells = <&macaddr_factory_14>;
+ nvmem-cell-names = "mac-address";
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ pause;
+ };
+ };
+
+ mac at 1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ phy-mode = "gmii";
+ phy-handle = <&int_gbe_phy>;
+ label = "wan";
+
+ nvmem-cells = <&macaddr_factory_1a>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&mdio_bus {
+ switch: switch at 1f {
+ compatible = "mediatek,mt7531";
+ reg = <31>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&pio>;
+ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 0 {
+ reg = <0>;
+ label = "lan4";
+ };
+
+ port at 1 {
+ reg = <1>;
+ label = "lan3";
+ };
+
+ port at 2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port at 3 {
+ reg = <3>;
+ label = "lan1";
+ };
+
+ port at 6 {
+ reg = <6>;
+ label = "cpu";
+ ethernet = <&gmac0>;
+ phy-mode = "2500base-x";
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ pause;
+ };
+ };
+ };
+ };
+};
+
+&spi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_flash_pins>;
+ status = "okay";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+
+ spi-max-frequency = <52000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition at 0 {
+ label = "BL2";
+ reg = <0x00000 0x40000>;
+ read-only;
+ };
+
+ partition at 40000 {
+ label = "u-boot-env";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition at 50000 {
+ label = "Factory";
+ reg = <0x50000 0xb0000>;
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom at 0 {
+ reg = <0x0 0x1000>;
+ };
+
+ macaddr_factory_14: macaddr at 14 {
+ reg = <0x14 0x6>;
+ };
+
+ macaddr_factory_1a: macaddr at 1a {
+ reg = <0x1a 0x6>;
+ };
+ };
+ };
+
+ partition at 100000 {
+ label = "FIP";
+ reg = <0x100000 0x80000>;
+ read-only;
+ };
+
+ partition at 180000 {
+ compatible = "denx,fit";
+ label = "firmware";
+ reg = <0x180000 0xe00000>;
+ };
+ };
+ };
+};
+
+&pio {
+ spi2_flash_pins: spi2-pins {
+ mux {
+ function = "spi";
+ groups = "spi2", "spi2_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&wifi {
+ status = "okay";
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 203f460aa2..7e4512f30f 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -207,6 +207,9 @@ teltonika,rutc50)
ucidef_set_led_netdev "wan-green" "WAN" "mdio-bus:00:green:wan" "wan" "link_1000 tx rx"
ucidef_set_led_netdev "wan-amber" "WAN" "mdio-bus:00:amber:wan" "wan" "link_100 link_10 tx rx"
;;
+totolink,x6000r)
+ ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx"
+ ;;
tplink,fr365-v1)
ucidef_set_led_netdev "port2-green-act" "port-2" "green:port2_act" "port2" "link tx rx"
ucidef_set_led_netdev "port1-green-act" "port-1" "green:sfp" "port1" "link tx rx"
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index b97586e094..6cd12bc300 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -2012,6 +2012,17 @@ define Device/tenbay_wr3000k
endef
TARGET_DEVICES += tenbay_wr3000k
+define Device/totolink_x6000r
+ DEVICE_VENDOR := TOTOLINK
+ DEVICE_MODEL := X6000R
+ DEVICE_DTS := mt7981b-totolink-x6000r
+ DEVICE_DTS_DIR := ../dts
+ IMAGES := sysupgrade.bin
+ IMAGE_SIZE := 14336k
+ DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += totolink_x6000r
+
define Device/tplink_archer-ax80-v1
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer AX80V1
More information about the lede-commits
mailing list