WIP: TP-Link EAP683-LR support eap683-lr
authorStijn Tintel <stijn@linux-ipv6.be>
Fri, 5 Apr 2024 22:45:25 +0000 (01:45 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 15 Apr 2024 11:06:53 +0000 (14:06 +0300)
commitd4a90511188aa3e4fde2dfb50a21a02a422dc99e
treef98f1ffb7632ea22b8dda891cc12f2468471ea79
parent6d025d24ee22f7955faee8263171d6570c1877c7
WIP: TP-Link EAP683-LR support

TODO:
* MAC address from ubi_factory_data on factory partition

Add support for the TP-Link EAP683-LR, an AX6000 Ceiling Mount WiFi 6
AP.

Hardware:
* SoC: MediaTek MT7896AV
* RAM: 1GiB DDR4 (Samsung K4A8G165WC-BCTD)
* Flash: 128MiB SPI-NAND (ESMT F50L1G41LB)
* Ethernet: 1x 10/100/1000/2500 Mbps PoE-PD (MaxLinear GPY211C)
* WiFi: MT7976AN/MT7976GN 2.4/5GHz 4T4R
* LEDS: 3x blue connected to a single GPIO line
* Buttons: 1x reset
* BLE/Thread/Zigbee: CC2652 (currently not supported)

Stock firmware uses a random MAC address for ethernet.

Installation via bootloader:
* Solder JST??? connector on J255, alternatively solder wires on the
  TP13-TP15 pads. Pinout: TP13: TX, TP14: RX, TP15: GND, TP16: VCC.
  This pins for J255 follow this order.
* Interrupt boot process by repeatedly pressing Ctrl+b during boot
* In the boot menu, select U-Boot console
* Ensure the U-Boot environment variable "tp_boot_idx" is not set:
  # setenv tp_boot_idx
  # saveenv
* Boot the OpenWrt initramfs:
  # tftpboot openwrt-mediatek-filogic-tplink_eap683-lr-initramfs-kernel.bin
  # bootm
* copy openwrt-mediatek-filogic-tplink_eap683-lr-squashfs-sysupgrade.bin
  to /tmp and install it using sysupgrade

Flashing via OEM firmware is currently not supported. The
tplink-safeloader utility does not recognize the OEM firmware:

  DEBUG: can not find fwuphdr
  Firmware image partitions:
  base     size     name
  Segmentation fault (core dumped)

To revert to the OEM firmware, you can set the U-Boot environment
variable "tp_boot_idx" to 1 via bootloader, or using fw_setenv via
OpenWrt. This should result in booting from the ubi1 partition, which
OpenWrt should not touch. Then use the web interface to upgrade
firmware: System > Firmware Update.

The OEM firmware uses 0x800000 for the runtime_backup partition size.
This causes the following warning:

  mtd: partition "runtime_backup" extends beyond the end of device "nmbm_spim_nand" -- size truncated to 0x600000

This is due to the NMBM reserved blocks. Use 0x600000 in our DTS.

Thanks to init Lab's user890104, who soldered jumper wires on the TTL
pads for me so I could have serial console. My soldering skills just
aren't good enough to pull that off without risk damaging things.
package/boot/uboot-envtools/files/mediatek_filogic
target/linux/mediatek/dts/mt7986a-tplink-eap683-lr.dts [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
target/linux/mediatek/image/filogic.mk