ramips: add support for 7Links WLR-1240
authorSebastian Schaper <openwrt@sebastianschaper.net>
Mon, 20 May 2024 21:44:30 +0000 (23:44 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 10 Jun 2024 22:09:06 +0000 (00:09 +0200)
The WLR-1240 (ZX-5434) is an AC1200 Wave 2 outdoor repeater
with omnidirectional antennas for wall or pole mounting.
The device is manufactured by Todaair and meant to be used with
a tuya-based app, there is no webinterface for configuration.

Specifications:
- MT7628AN, 8 MiB SPI NOR flash, 64 MiB RAM, 2x2 802.11n
- MT7613 2x2 802.11ac Wave 2
- 802.3af PoE or 12V 1A 5.5x2.1 power supply (included)
- top RGB LED ring

TFTP installation:
- rename sysupgrade to `firmware_auto.bin`
- provide at 192.168.1.10 during boot

HTTP installation:
- keep reset button pressed for 5 seconds during power on (light blue
  LED flashes slowly, then quickly to confirm, then remains steady on)
- recovery web interface is at 192.168.1.1, upload sysupgrade

Opening the device
- use suction cup to remove top cap within LED ring
- two screws are located in holes underneath silicone sealant
- two further screws are located at the bottom

initramfs boot
- open device, connect serial console (pins are labelled)
- keep pressing `4` during second tftp attempt to enter uboot shell
- run `tftpboot 82000000` to avoid memory overlap, then `bootm`

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
target/linux/ramips/dts/mt7628an_7links_wlr-1240.dts [new file with mode: 0644]
target/linux/ramips/image/mt76x8.mk
target/linux/ramips/mt76x8/base-files/etc/board.d/02_network

diff --git a/target/linux/ramips/dts/mt7628an_7links_wlr-1240.dts b/target/linux/ramips/dts/mt7628an_7links_wlr-1240.dts
new file mode 100644 (file)
index 0000000..a9bf4eb
--- /dev/null
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_7links_wlr-12xx.dtsi"
+
+/ {
+       compatible = "7links,wlr-1240", "mediatek,mt7628an-soc";
+       model = "7Links WLR-1240";
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_status_red: status_red {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RED>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_status_blue: status_blue {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+
+               led_status_green: status_green {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+       };
+
+       aliases {
+               led-boot = &led_status_green;
+               led-failsafe = &led_status_red;
+               led-running = &led_status_blue;
+               led-upgrade = &led_status_red;
+               label-mac-device = &ethernet;
+       };
+};
index aa547e81a7e45884cef4c8b4f1e2d6f4f0d9da72..07000a1a117fd00e2076babc0559b0c0e5f9f7f8 100644 (file)
@@ -43,6 +43,12 @@ define Device/7links_wlr-1230
 endef
 TARGET_DEVICES += 7links_wlr-1230
 
+define Device/7links_wlr-1240
+  $(Device/7links_wlr-12xx)
+  DEVICE_MODEL := WLR-1240
+endef
+TARGET_DEVICES += 7links_wlr-1240
+
 define Device/alfa-network_awusfree1
   IMAGE_SIZE := 7872k
   DEVICE_VENDOR := ALFA Network
index 3eca7e61e8e2f88a6ca1a4f34d3794a3e93a766f..c44361a439db27426dd133769bb6d807fcbcc452 100644 (file)
@@ -9,6 +9,7 @@ ramips_setup_interfaces()
 
        case $board in
        7links,wlr-1230|\
+       7links,wlr-1240|\
        alfa-network,awusfree1|\
        d-team,pbr-d1|\
        dlink,dap-1325-a1|\