aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/boot/uboot-envtools/files/ramips1
-rw-r--r--target/linux/ramips/dts/mt7628an_kroks.dtsi116
-rw-r--r--target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts64
-rw-r--r--target/linux/ramips/image/mt76x8.mk11
-rw-r--r--target/linux/ramips/mt76x8/base-files/etc/board.d/02_network1
5 files changed, 193 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
index 597baef6cd..e27fed7b69 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,kndrt31r19|\
mediatek,linkit-smart-7688|\
samknows,whitebox-v8|\
xiaomi,mi-router-4c|\
diff --git a/target/linux/ramips/dts/mt7628an_kroks.dtsi b/target/linux/ramips/dts/mt7628an_kroks.dtsi
new file mode 100644
index 0000000000..dc1eee9cca
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_kroks.dtsi
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ serial1 = &uart1;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "led:status";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "led:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ m25p,fast-read;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio_reset {
+ groups = "wdt";
+ function = "gpio";
+ };
+
+ p0led_an {
+ groups = "p0led_an";
+ function = "p0led_an";
+ };
+};
+
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x4 0x6>;
+ };
+};
+
+&ethernet {
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+ status = "okay";
+
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+};
+
+&uart1 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts
new file mode 100644
index 0000000000..eb36c986f6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_kroks.dtsi"
+
+/ {
+ compatible = "kroks,kndrt31r19", "mediatek,mt7628an-soc";
+ model = "Kroks KNdRt31R19";
+
+ leds {
+ status {
+ label = "red:status";
+ };
+
+ wifi {
+ label = "yellow:wifi";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ modem1power {
+ gpio-export,name = "modem1power";
+ gpio-export,output = <0>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ };
+
+ modem1sim1 {
+ gpio-export,name = "modem1sim1";
+ gpio-export,output = <1>;
+ gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem1sim2 {
+ gpio-export,name = "modem1sim2";
+ gpio-export,output = <0>;
+ gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem1rsim1 {
+ gpio-export,name = "modem1rsim1";
+ gpio-export,output = <0>;
+ gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem1rsim2 {
+ gpio-export,name = "modem1rsim2";
+ gpio-export,output = <0>;
+ gpios = <&gpio 40 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2s", "i2c", "p4led_an", "p3led_an", "wled_an";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 21126c32d9..ecb4075d62 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_kndrt31r19
+ IMAGE_SIZE := 16064k
+ DEVICE_VENDOR := Kroks
+ DEVICE_MODEL := Rt-Pot mXw DS RSIM
+ DEVICE_ALT0_VENDOR := Kroks
+ DEVICE_ALT0_MODEL := KNdRt31R19
+ DEVICE_PACKAGES := kmod-usb2 uqmi
+ SUPPORTED_DEVICES += kndrt31r19
+endef
+TARGET_DEVICES += kroks_kndrt31r19
+
define Device/mediatek_linkit-smart-7688
IMAGE_SIZE := 32448k
DEVICE_VENDOR := MediaTek
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 1c3d43d821..5c63f1e1b6 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
@@ -131,6 +131,7 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
;;
+ kroks,kndrt31r19|\
tplink,tl-mr3020-v3)
ucidef_add_switch "switch0" \
"0:lan" "6@eth0"