ramips: mt76x8: add support for Teltonika RUT200
authorSimonas Tamošaitis <simsasss@gmail.com>
Mon, 31 Mar 2025 15:30:07 +0000 (18:30 +0300)
committerDavid Bauer <mail@david-bauer.net>
Fri, 4 Apr 2025 13:21:36 +0000 (15:21 +0200)
Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB EtronTech EM68C16CWQG-25IH
Flash: 16MB Winbond W25Q128 SPI
Switch: MediaTek MT7628AN, 2 ports 100 Mbps
WiFi: MediaTek MT7628AN 2.4 GHz 802.11n
Modem: Quectel EC200A 4G, cat 4
GPIO:
  - 1 button (Reset)
  - 8 LEDs (2G, 3G, 4G, RSSI 1,2,3,4,5)
  - 2 Modem control (power button, reset)
  - 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

To enable mobile data connection send command to modem:
  echo -ne 'AT+QNETDEVCTL=3,1\r\n' > /dev/ttyUSB2

Create DHCP interface with usb0 device.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
target/linux/ramips/dts/mt7628an_teltonika_rut200.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_rut200.dts b/target/linux/ramips/dts/mt7628an_teltonika_rut200.dts
new file mode 100644 (file)
index 0000000..5556f8b
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_teltonika_rut2xx.dtsi"
+
+/ {
+       //hardware version up to 4
+       compatible = "teltonika,rut200", "mediatek,mt7628an-soc";
+       model = "Teltonika RUT200";
+};
index baf9d02576792add5337f4eb8b7083c361693495..4cbb111b7e18b892a4757d8c2f1325cac67a268d 100644 (file)
@@ -1268,6 +1268,19 @@ define Device/zyxel_keenetic-extra-ii
 endef
 TARGET_DEVICES += zyxel_keenetic-extra-ii
 
+define Device/teltonika_rut200
+  DEVICE_VENDOR := Teltonika
+  DEVICE_MODEL := RUT200
+  DEVICE_VARIANT := v1-v4
+  IMAGE_SIZE := 15424k
+  BLOCKSIZE := 64k
+  DEVICE_PACKAGES +=kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-serial-option 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 rut2m
+  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
+endef
+TARGET_DEVICES += teltonika_rut200
+
 define Device/teltonika_rut241
   DEVICE_VENDOR := Teltonika
   DEVICE_MODEL := RUT241
index d1cb7598266a708eb5a0a40829d8116141d0f59a..9c872b2c5db600a15e5c9a87731088846a6eeb3d 100644 (file)
@@ -77,6 +77,7 @@ tama,w06)
        ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
        ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
        ;;
+teltonika,rut200|\
 teltonika,rut241)
        ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x02"
        ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
index 93a5bdf981807838e032df352e446b62e8266c24..7ac6ad9acc0f53f5f3dba14ba4a99e0e1a5c2f7e 100644 (file)
@@ -109,6 +109,7 @@ ramips_setup_interfaces()
                ;;
        duzun,dm06|\
        glinet,gl-mt300n-v2|\
+       teltonika,rut200|\
        teltonika,rut241)
                ucidef_add_switch "switch0" \
                        "1:lan" "0:wan" "6@eth0"
index debbe84f357157591e932eb4ac87409be95d98cf..b8080a6ee210c7636b95b67652fa99e823e3e5da 100644 (file)
@@ -9,6 +9,7 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
+teltonika,rut200|\
 teltonika,rut241)
        ucidef_add_gpio_switch "digital_output" "Digital output" "digital_output" "0"
        ucidef_add_gpio_switch "modem_power" "Modem power" "modem_power" "1"