ramips: mt76x8: add Teltonika RUT951/RUT901 support

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>
This commit is contained in:
Simonas Tamošaitis 2025-06-04 21:39:18 +03:00 committed by Hauke Mehrtens
parent 85e300c93d
commit 7264a913a3
5 changed files with 35 additions and 0 deletions

View file

@ -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";
};

View 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

View 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"

View 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"

View 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"