[openwrt/openwrt] ramips: add support for D-Link DIR-878 R1

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 19 12:22:57 PDT 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/42626aef676d2ca1ea1577b7a47ba8e4135f1a4c

commit 42626aef676d2ca1ea1577b7a47ba8e4135f1a4c
Author: Igor Nazarov <tigron.dev at gmail.com>
AuthorDate: Thu Mar 17 00:51:35 2022 +0300

    ramips: add support for D-Link DIR-878 R1
    
    Specifications:
    - SoC: MediaTek MT7621AT
    - RAM: 128 MB (DDR3)
    - Flash: 16 MB (SPI NOR)
    - WiFi: MT7615N (2.4GHz) and MT7615N (5Ghz)
    - Switch: 1 WAN, 4 LAN (Gigabit)
    - Buttons: Reset, WiFi Toggle, WPS
    - LEDs: Power, Internet, WiFi 2.4G WiFi 5G
    
    The R1 revision is identical to the A1 revision except
    - No Config2 Parition, therefore
    - factory partition resized to 64k from 128K
    - Firmware partition offset is 0x50000 not 0x60000
    - Firmware partitions size increased by 64K
    - Firmware partition type is "denx,uimage", not "sge,uimage"
    - Padding of image creation "uimage-padhdr 96" removed
    
    Installation:
    Update to the last D-Link firmware through web-ui before OpenWRT
    installation then follow the instructions to patch your device using
    D-Link FailsafeUI.
    
    - D-Link FailsafeUI:
    Power down the router, press and hold the reset button, then
    re-plug it. Keep the reset button pressed until the internet LED stops
    flashing, then jack into any lan port and manually assign a static IP
    address in 192.168.0.0/24 other than 192.168.0.1 (e.g. 192.168.0.2)
    and go to http://192.168.0.1
    Flash with the factory image.
    
    Signed-off-by: Igor Nazarov <tigron.dev at gmail.com>
---
 .../linux/ramips/dts/mt7621_dlink_dir-878-r1.dts   | 37 ++++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                | 11 +++++++
 2 files changed, 48 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts
new file mode 100644
index 0000000000..b6453bdd21
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx.dtsi"
+#include "mt7621_dlink_flash-16m-r1.dtsi"
+
+/ {
+	compatible = "dlink,dir-878-r1", "mediatek,mt7621-soc";
+	model = "D-Link DIR-878 R1";
+
+	aliases {
+		label-mac-device = &gmac0;
+	};
+};
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 8bef3a1bfb..cd28e36917 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -409,6 +409,17 @@ define Device/dlink_dir-878-a1
 endef
 TARGET_DEVICES += dlink_dir-878-a1
 
+define Device/dlink_dir-878-r1
+  $(Device/dlink_dir-8xx-r1)
+  DEVICE_MODEL := DIR-878
+  DEVICE_VARIANT := R1
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-kernel | append-rootfs | check-size | \
+	sign-dlink-ru 57c5375741c30ca9ebcb36713db4ba51 \
+	ab0dff19af8842cdb70a86b4b68d23f7
+endef
+TARGET_DEVICES += dlink_dir-878-r1
+
 define Device/dlink_dir-882-a1
   $(Device/dlink_dir-8xx-a1)
   DEVICE_MODEL := DIR-882




More information about the lede-commits mailing list