ramips: add support for Kroks Rt-Cse SIM Injector DS
authorAndrey Butirsky <butirsky@gmail.com>
Tue, 7 Dec 2021 14:37:48 +0000 (17:37 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 10 Sep 2022 23:30:11 +0000 (01:30 +0200)
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 <butirsky@gmail.com>
package/boot/uboot-envtools/files/ramips
target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts [new file with mode: 0644]
target/linux/ramips/image/mt76x8.mk
target/linux/ramips/mt76x8/base-files/etc/board.d/02_network

index e27fed7b69f08929bcc2f18ec73580e3200d1e86..3f36cd6d6822131f5e51726988119cfe49ddd8dd 100644 (file)
@@ -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 (file)
index 0000000..b0b41f0
--- /dev/null
@@ -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";
+       };
+};
index ecb4075d625728389814c695dc9d9dc3b1fcc8db..69815f1858a7a631d66b1dd8d5f432a8e49969a4 100644 (file)
@@ -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
index 5c63f1e1b646bfd120b47cadaa3c55e85a718e8b..963a20c653a3f8295440bd2126d5c7b244f1fa2a 100644 (file)
@@ -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|\