aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds5
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network2
-rw-r--r--target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom1
-rw-r--r--target/linux/ramips/dts/DWR-922-E2.dts154
-rw-r--r--target/linux/ramips/image/mt7620.mk16
5 files changed, 177 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 2e62073d3f..35a28174cc 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -124,9 +124,12 @@ dlink,dwr-118-a2)
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
set_wifi_led "$boardname:green:wlan2g" "wlan1"
;;
-dlink,dwr-921-c1)
+dlink,dwr-921-c1|\
+dlink,dwr-922-e2)
set_wifi_led "$boardname:green:wifi"
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f"
+ ucidef_set_led_netdev "signalstrength" "signalstrength" "$boardname:green:sigstrength" "wwan0" "link"
+ ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx"
;;
dir-860l-b1)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 797490aed4..f958ac2bd0 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -90,6 +90,7 @@ ramips_setup_interfaces()
dir-810l|\
dlink,dwr-116-a1|\
dlink,dwr-921-c1|\
+ dlink,dwr-922-e2|\
ew1200|\
firewrt|\
hc5661a|\
@@ -488,6 +489,7 @@ ramips_setup_macs()
dlink,dwr-118-a1|\
dlink,dwr-118-a2|\
dlink,dwr-921-c1|\
+ dlink,dwr-922-e2|\
lava,lr-25g001)
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
lan_mac=$(macaddr_add "$wan_mac" 1)
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 1d9de2d503..13a4687251 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -58,6 +58,7 @@ case "$FIRMWARE" in
dlink,dwr-118-a1|\
dlink,dwr-118-a2|\
dlink,dwr-921-c1|\
+ dlink,dwr-922-e2|\
lava,lr-25g001)
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
wifi_mac=$(macaddr_add "$wan_mac" 1)
diff --git a/target/linux/ramips/dts/DWR-922-E2.dts b/target/linux/ramips/dts/DWR-922-E2.dts
new file mode 100644
index 0000000000..c2dd26a09d
--- /dev/null
+++ b/target/linux/ramips/dts/DWR-922-E2.dts
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-922-e2", "ralink,mt7620n-soc";
+ model = "D-Link DWR-922 E2";
+
+ aliases {
+ led-boot = &sstrengthg;
+ led-failsafe = &sstrengthg;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ led-boot = &sstrengthg;
+
+ sms {
+ label = "dwr-922-e2:green:sms";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "dwr-922-e2:green:lan";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ sstrengthg: sstrengthg {
+ label = "dwr-922-e2:green:sigstrength";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ sstrengthr {
+ label = "dwr-922-e2:red:sigstrength";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g {
+ label = "dwr-922-e2:green:4g";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "dwr-922-e2:green:3g";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "dwr-922-e2:green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ lte_modem_enable {
+ gpio-export,name = "lte_modem_enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&ethernet {
+ port@4 {
+ status = "okay";
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "spi refclk", "i2c", "ephy", "wled";
+ ralink,function = "gpio";
+ };
+ };
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 2f733b2ed9..6b65856281 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -228,6 +228,22 @@ define Device/dlink_dwr-921-c3
endef
TARGET_DEVICES += dlink_dwr-921-c3
+define Device/dlink_dwr-922-e2
+ DTS := DWR-922-E2
+ IMAGE_SIZE := $(ralink_default_fw_size_16M)
+ DEVICE_TITLE := D-Link DWR-922 E2
+ DLINK_ROM_ID := DLK6E2414005
+ DLINK_FAMILY_MEMBER := 0x6E24
+ DLINK_FIRMWARE_SIZE := 0xFE0000
+ KERNEL := $(KERNEL_DTB)
+ IMAGES += factory.bin
+ IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata
+ IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory
+ DEVICE_PACKAGES := jboot-tools \
+ kmod-usb2 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
+endef
+TARGET_DEVICES += dlink_dwr-922-e2
+
define Device/e1700
DTS := E1700
IMAGES += factory.bin