From: Simonas Tamošaitis Date: Mon, 31 Mar 2025 15:30:07 +0000 (+0300) Subject: ramips: mt76x8: add support for Teltonika RUT200 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1227e5f54f087d733c05fd5d1dd2b62d12c2facf;p=openwrt%2Fstaging%2Fblocktrron.git ramips: mt76x8: add support for Teltonika RUT200 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 --- diff --git a/target/linux/ramips/dts/mt7628an_teltonika_rut200.dts b/target/linux/ramips/dts/mt7628an_teltonika_rut200.dts new file mode 100644 index 0000000000..5556f8bb8e --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_teltonika_rut200.dts @@ -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"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index e4fb47ed88..5020136017 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -1282,6 +1282,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 diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 3a9a1003a7..127c1a713f 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -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" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index c7d4ba8f07..db7a14cdcb 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -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" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches index debbe84f35..b8080a6ee2 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches @@ -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"