From: Andrey Butirsky Date: Tue, 7 Dec 2021 14:37:48 +0000 (+0300) Subject: ramips: add support for Kroks Rt-Cse SIM Injector DS X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5806914794b22cd7ff6c47bed9b54e0a5c4234f3;p=openwrt%2Fstaging%2Fmans0n.git ramips: add support for Kroks Rt-Cse SIM Injector DS Aka Kroks Rt-Cse5 UW DRSIM (KNdRt31R16), ID 1958: https://kroks.ru/search/?text=1958 See Kroks OpenWrt fork for support of other models: https://github.com/kroks-free/openwrt Device specs: - CPU: MediaTek MT7628AN - Flash: 16MB SPI NOR - RAM: 64MB - Bootloader: U-Boot - Ethernet: 5x 10/100 Mbps - 2.4 GHz: b/g/n SoC - USB: 1x - SIM-reader: 2x (driven by a dedicated chip with it's own firmware) - Buttons: reset - LEDs: 1x Power, 1x Wi-Fi, 12x others (SIM status, Internet, etc.) Flashing: - sysupgrade image via stock firmware WEB interface, IP: 192.168.1.254 - U-Boot launches a WEB server if Reset button is held during power up, IP: 192.168.1.1 MAC addresses as verified by OEM firmware: vendor OpenWrt source LAN eth0 factory 0x4 (label) 2g wlan0 label Signed-off-by: Andrey Butirsky --- diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index e27fed7b69..3f36cd6d68 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -37,6 +37,7 @@ beeline,smartbox-turbo) ;; buffalo,wsr-1166dhp|\ buffalo,wsr-600dhp|\ +kroks,kndrt31r16|\ kroks,kndrt31r19|\ mediatek,linkit-smart-7688|\ samknows,whitebox-v8|\ diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts new file mode 100644 index 0000000000..b0b41f0420 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an_kroks.dtsi" + +/ { + compatible = "kroks,kndrt31r16", "mediatek,mt7628an-soc"; + model = "Kroks KNdRt31R16"; + + leds { + status { + label = "green:status"; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + + wifi { + label = "blue:wifi"; + }; + }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb1power { + gpio-export,name = "usb1power"; + gpio-export,output = <1>; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&state_default { + gpio { + groups = "i2s", "wled_an"; + function = "gpio"; + }; + + p1led_an { + groups = "p1led_an"; + function = "p1led_an"; + }; + + p2led_an { + groups = "p2led_an"; + function = "p2led_an"; + }; + + p3led_an { + groups = "p3led_an"; + function = "p3led_an"; + }; + + p4led_an { + groups = "p4led_an"; + function = "p4led_an"; + }; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index ecb4075d62..69815f1858 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -310,6 +310,17 @@ define Device/jotale_js76x8-32m endef TARGET_DEVICES += jotale_js76x8-32m +define Device/kroks_kndrt31r16 + IMAGE_SIZE := 16064k + DEVICE_VENDOR := Kroks + DEVICE_MODEL := Rt-Cse5 UW DRSIM + DEVICE_ALT0_VENDOR := Kroks + DEVICE_ALT0_MODEL := KNdRt31R16 + DEVICE_PACKAGES := kmod-usb2 + SUPPORTED_DEVICES += kndrt31r16 +endef +TARGET_DEVICES += kroks_kndrt31r16 + define Device/kroks_kndrt31r19 IMAGE_SIZE := 16064k DEVICE_VENDOR := Kroks 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 5c63f1e1b6..963a20c653 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 @@ -39,6 +39,7 @@ ramips_setup_interfaces() hilink,hlk-7628n|\ hilink,hlk-7688a|\ hiwifi,hc5861b|\ + kroks,kndrt31r16|\ skylab,skw92a|\ tplink,archer-c20-v4|\ tplink,archer-c20-v5|\