mediatek/filogic: add Keenetic KN-3811 support

Specification:
 * Mediatek MT7981BA
 * 256 MB SPI-NAND
 * 512 MB DDR4 RAM
 * MT7976CN DBDC AX Wi-Fi
 * MediaTek MT7531AE (3x LAN Gigabit ports) + Internal Gbe Phy (1x WAN Gigabit port)
 * 4x LED (power, internet, fn, wifi)
 * 3x buttons (wps, fn, reset)
 * 1x USB 3.0 port

Serial Interface:
 * 3 Pins GND, RX, TX
 * Settings: 115200, 8N1

Notes:
 * The device supports dual boot mode
 * Fn led reassigned to wlan 2.4

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3811-squashfs-factory.bin"
   to "KN-3811_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17135
(cherry picked from commit d087a79b7b)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Maxim Anisimov
2024-11-13 17:17:17 +03:00
committed by Hauke Mehrtens
parent 895531f5c5
commit d7d560b84b
4 changed files with 390 additions and 0 deletions

View File

@@ -920,6 +920,26 @@ define Device/jdcloud_re-cp-03
endef
TARGET_DEVICES += jdcloud_re-cp-03
define Device/keenetic_kn-3811
DEVICE_VENDOR := Keenetic
DEVICE_MODEL := KN-3811
DEVICE_DTS := mt7981b-keenetic-kn-3811
DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 6144k
IMAGE_SIZE := 233984k
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \
append-squashfs4-fakeroot
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | \
append-ubi | check-size | zyimage -d 0x803811 -v "KN-3811"
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += keenetic_kn-3811
define Device/keenetic_kn-3911
DEVICE_VENDOR := Keenetic
DEVICE_MODEL := KN-3911