ramips: mt76x8: add Teltonika RUT951/RUT901 support
authorSimonas Tamošaitis <simsasss@gmail.com>
Wed, 4 Jun 2025 18:39:18 +0000 (21:39 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Jun 2025 15:10:03 +0000 (17:10 +0200)
Specification:
- MediaTek MT7628AN SoC
- 128 MB of RAM EtronTech EM68C16CWQG-25IH
- 16MB of Flash Winbond W25Q128 SPI
- 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1
- MediaTek MT7628AN 2.4 GHz 802.11n WiFi
- Quectel EC25-EUX 4G cat 4 modem (RUT951) or Quectel EC200A-EU 4G cat 4 modem (RUT901)
- 1x Digital input
- 1x Digital output
- 2x SIM slot (can be swapped via GPIO)
- eSIM (depends on hardware configuration, can be swapped via GPIO)

GPIO:
 - 1 button (Reset)
 - 7 LEDs (power, status green/red, RSSI 1,2,3,4,5)
 - 5 Modem control (power button, reset, status, SIM select, eSIM select)
 - 1 Digital input
 - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Mobile data connection:
Quectel EC200A-EU send command to modem:
    echo -ne 'AT+QNETDEVCTL=3,1\r\n' > /dev/ttyUSB2
    Create DHCP interface with usb0 device.
Quectel EC25-EUX create proto qmi interface.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18788
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7628an_teltonika_rut9x1.dts [new file with mode: 0644]
target/linux/ramips/image/mt76x8.mk
target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches

diff --git a/target/linux/ramips/dts/mt7628an_teltonika_rut9x1.dts b/target/linux/ramips/dts/mt7628an_teltonika_rut9x1.dts
new file mode 100644 (file)
index 0000000..4523be2
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_teltonika_rut9xx.dtsi"
+
+/ {
+       compatible = "teltonika,rut9x1", "mediatek,mt7628an-soc";
+       model = "Teltonika RUT951/RUT901";
+};
index fb5298cb6120309bc3b0f9be3a3aca110503e297..9826c3e9f79781e9e8875cd78899373b61ea6e1f 100644 (file)
@@ -638,6 +638,24 @@ define Device/tama_w06
 endef
 TARGET_DEVICES += tama_w06
 
+define Device/teltonika_rut9x1
+  DEVICE_VENDOR := Teltonika
+  DEVICE_MODEL := RUT951
+  DEVICE_ALT0_VENDOR := Teltonika
+  DEVICE_ALT0_MODEL := RUT901
+  IMAGE_SIZE := 15424k
+  BLOCKSIZE := 64k
+  DEVICE_PACKAGES := uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
+       kmod-usb-serial-option kmod-spi-gpio kmod-gpio-nxp-74hc164 \
+       kmod-i2c-mt7628 kmod-usb-net-cdc-ether
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+       append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut9m \
+       "mod1":"2c7c_6005" "mod2":"TLA2021" "mod3":"CH343" "mod4":"esim" "mod5":"ala440"
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
+endef
+TARGET_DEVICES += teltonika_rut9x1
+
 define Device/teltonika_rut9x6
   DEVICE_VENDOR := Teltonika
   DEVICE_MODEL := RUT956
index 67f9819083990dcb0282a4393c4479abae7bdc5a..ffa64f50f896ac19e41d17f9828e37a52d981694 100644 (file)
@@ -82,6 +82,7 @@ teltonika,rut241)
        ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x02"
        ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
        ;;
+teltonika,rut9x1|\
 teltonika,rut9x6)
        ucidef_set_led_switch "lan1" "lan1" "green:lan-1" "switch0" "0x1"
        ucidef_set_led_switch "lan2" "lan2" "green:lan-2" "switch0" "0x2"
index d8fcfc68b63a118dadd208d2fc5fd93ced9d8690..cd9199a7d13cc33628bc45f6d1aa847ae4f2d817 100644 (file)
@@ -179,6 +179,7 @@ ramips_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
                ;;
+       teltonika,rut9x1|\
        teltonika,rut9x6)
                ucidef_add_switch "switch0" \
                        "0:lan" "1:lan" "2:lan" "4:wan" "6t@eth0"
index 34d73da447a19f250a0d8cce134541cb87efc939..fc9f20d9d2c39745fe08a5914e35ca10a87d0819 100644 (file)
@@ -15,6 +15,13 @@ teltonika,rut241)
        ucidef_add_gpio_switch "modem_power" "Modem power" "modem_power" "1"
        ucidef_add_gpio_switch "modem_reset" "Modem reset" "modem_reset" "0"
        ;;
+teltonika,rut9x1)
+       ucidef_add_gpio_switch "digital_output" "Digital output 1" "digital_output1" "0"
+       ucidef_add_gpio_switch "modem_power" "Modem power button" "modem_power" "1"
+       ucidef_add_gpio_switch "modem_reset" "Modem reset" "modem_reset" "0"
+       ucidef_add_gpio_switch "sim_sel" "SIM select" "sim_sel" "0"
+       ucidef_add_gpio_switch "esim_sel" "eSIM select" "esim_sel" "0"
+       ;;
 teltonika,rut9x6)
        ucidef_add_gpio_switch "digital_output" "Digital output 1" "digital_output1" "0"
        ucidef_add_gpio_switch "digital_output" "Digital output 2" "digital_output2" "0"